From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932503AbdELJG4 (ORCPT ); Fri, 12 May 2017 05:06:56 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:50686 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932389AbdELJGy (ORCPT ); Fri, 12 May 2017 05:06:54 -0400 Date: Fri, 12 May 2017 11:06:44 +0200 From: Greg KH 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 Message-ID: <20170512090644.GA26599@kroah.com> References: <1493624964-29829-1-git-send-email-suniel.spartan@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1493624964-29829-1-git-send-email-suniel.spartan@gmail.com> User-Agent: Mutt/1.8.2 (2017-04-18) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 01, 2017 at 01:19:24PM +0530, suniel.spartan@gmail.com wrote: > From: Suniel Mahesh > > 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 > --- > .../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