public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: suniel.spartan@gmail.com
Cc: linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org,
	sunil.m@techveda.org
Subject: Re: [PATCH] staging: rtl8192u: Fix type mismatch warnings reported by sparse
Date: Fri, 12 May 2017 11:06:44 +0200	[thread overview]
Message-ID: <20170512090644.GA26599@kroah.com> (raw)
In-Reply-To: <1493624964-29829-1-git-send-email-suniel.spartan@gmail.com>

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

  reply	other threads:[~2017-05-12  9:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-01  7:49 [PATCH] staging: rtl8192u: Fix type mismatch warnings reported by sparse suniel.spartan
2017-05-12  9:06 ` Greg KH [this message]
2017-05-12 15:46   ` [PATCH v2] " suniel.spartan
  -- strict thread matches above, loose matches on Subject: below --
2017-05-09  9:47 [PATCH] " suniel.spartan
2017-05-12  9:07 ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170512090644.GA26599@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=devel@driverdev.osuosl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=suniel.spartan@gmail.com \
    --cc=sunil.m@techveda.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox