Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1640332
| From | Greg KH <gregkh@linuxfoundation.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] staging: rtl8192u: Fix type mismatch warnings reported by sparse |
| Date | 2017-05-12 11:10 +0200 |
| Message-ID | <tGeKe-2eI-21@gated-at.bofh.it> (permalink) |
| References | <tCeps-6id-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, May 01, 2017 at 01:19:24PM +0530, suniel.spartan@gmail.com wrote:
> From: Suniel Mahesh <suniel.spartan@gmail.com>
>
> The function Mk16_le() is calling le16_to_cpu() internally.
> le16_to_cpu() takes an argument of type (__le *) but the argument
> passed is of type (u16 *). Fixed it by passing the correct argument.
>
> Signed-off-by: Suniel Mahesh <suniel.spartan@gmail.com>
> ---
> .../rtl8192u/ieee80211/ieee80211_crypt_tkip.c | 22 +++++++++++-----------
> 1 file changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c
> index 5039172..11ddf30 100644
> --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c
> +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c
> @@ -172,7 +172,7 @@ static inline u16 Mk16(u8 hi, u8 lo)
> }
>
>
> -static inline u16 Mk16_le(u16 *v)
> +static inline u16 Mk16_le(__le16 *v)
> {
> return le16_to_cpu(*v);
> }
Ick, no, just replace all usages of this function with the "real"
le16_to_cpu() call.
thanks,
greg k-h
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] staging: rtl8192u: Fix type mismatch warnings reported by sparse suniel.spartan@gmail.com - 2017-05-01 10:00 +0200
Re: [PATCH] staging: rtl8192u: Fix type mismatch warnings reported by sparse Greg KH <gregkh@linuxfoundation.org> - 2017-05-12 11:10 +0200
[PATCH v2] staging: rtl8192u: Fix type mismatch warnings reported by sparse suniel.spartan@gmail.com - 2017-05-12 18:00 +0200
csiph-web