diff options
author | Luca Ceresoli <luca@lucaceresoli.net> | 2015-09-22 23:50:36 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-09-29 04:27:22 +0200 |
commit | 3441d08ca20a390ab0484c11bd69f2a75e702774 (patch) | |
tree | 892baaf0274d93feaacff1b41e38ebf448ca56d1 | |
parent | f22c2468b6ff8542453b5d9e7f3b8ddbbb4bcef4 (diff) | |
download | lwn-3441d08ca20a390ab0484c11bd69f2a75e702774.tar.gz lwn-3441d08ca20a390ab0484c11bd69f2a75e702774.zip |
staging: rtl8188eu: rtw_set_fixed_ie(): accept void* parameters
rtw_set_ie() is a memcpy-like function, taking addresses of memory buffers
among its parameters. Similarly to memcpy, change the parameters to be
void*. This will allow to get rid of typecasts whenever it is called.
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 8 | ||||
-rw-r--r-- | drivers/staging/rtl8188eu/include/ieee80211.h | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/drivers/staging/rtl8188eu/core/rtw_ieee80211.c b/drivers/staging/rtl8188eu/core/rtw_ieee80211.c index c3c582881a09..39325a3a2fa2 100644 --- a/drivers/staging/rtl8188eu/core/rtw_ieee80211.c +++ b/drivers/staging/rtl8188eu/core/rtw_ieee80211.c @@ -130,12 +130,12 @@ int rtw_check_network_type(unsigned char *rate, int ratelen, int channel) } } -u8 *rtw_set_fixed_ie(unsigned char *pbuf, unsigned int len, unsigned char *source, - unsigned int *frlen) +u8 *rtw_set_fixed_ie(void *pbuf, unsigned int len, void *source, + unsigned int *frlen) { - memcpy((void *)pbuf, (void *)source, len); + memcpy(pbuf, source, len); *frlen = *frlen + len; - return pbuf + len; + return ((u8 *)pbuf) + len; } /* rtw_set_ie will update frame length */ diff --git a/drivers/staging/rtl8188eu/include/ieee80211.h b/drivers/staging/rtl8188eu/include/ieee80211.h index 6400f75707bd..f8f5eb6b7976 100644 --- a/drivers/staging/rtl8188eu/include/ieee80211.h +++ b/drivers/staging/rtl8188eu/include/ieee80211.h @@ -1092,8 +1092,8 @@ enum parse_res rtw_ieee802_11_parse_elems(u8 *start, uint len, struct rtw_ieee802_11_elems *elems, int show_errors); -u8 *rtw_set_fixed_ie(unsigned char *pbuf, unsigned int len, - unsigned char *source, unsigned int *frlen); +u8 *rtw_set_fixed_ie(void *pbuf, unsigned int len, + void *source, unsigned int *frlen); u8 *rtw_set_ie(u8 *pbuf, int index, uint len, u8 *source, uint *frlen); enum secondary_ch_offset { |