lkml.org 
[lkml]   [2017]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] staging: rtl8192u: Fix type mismatch warnings reported by sparse
On Tue, May 09, 2017 at 03:17:56PM +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 type.
>
> Signed-off-by: Suniel Mahesh <suniel.spartan@gmail.com>
> ---
> .../rtl8192u/ieee80211/ieee80211_crypt_tkip.c | 22 +++++++++++-----------
> 1 file changed, 11 insertions(+), 11 deletions(-)

Is this a resend?

> 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);
> }

Just use the real function here and delete this "odd" one.

thanks,

greg k-h

\
 
 \ /
  Last update: 2017-05-12 11:08    [W:0.045 / U:3.716 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site