Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754660AbdDOMkT (ORCPT ); Sat, 15 Apr 2017 08:40:19 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:35624 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751955AbdDOMkR (ORCPT ); Sat, 15 Apr 2017 08:40:17 -0400 Date: Sat, 15 Apr 2017 18:08:39 +0530 From: Aishwarya Pant To: Greg Kroah-Hartman , Larry Finger Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] staging: rtl8188eu: fix sparse signedness warnings in rtw_generate_ie Message-ID: <31d64df85398ed8af1fb97f634cf5bc68fc41a20.1492259726.git.aishpant@gmail.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1923 Lines: 45 Changed the type of wpa_ie_len from (int *) to (unsigned int *) in the function rtw_get_wpa_ie(..) to suppress signedness mismatch warnings in rtw_generate_ie of the type- drivers/staging/rtl8188eu//core/rtw_ieee80211.c:1009:60: warning: incorrect type in argument 2 (different signedness) drivers/staging/rtl8188eu//core/rtw_ieee80211.c:1009:60: expected int *wpa_ie_len drivers/staging/rtl8188eu//core/rtw_ieee80211.c:1009:60: got unsigned int * Signed-off-by: Aishwarya Pant --- drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 2 +- drivers/staging/rtl8188eu/include/ieee80211.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_ieee80211.c b/drivers/staging/rtl8188eu/core/rtw_ieee80211.c index 79dda83..d1dafe0 100644 --- a/drivers/staging/rtl8188eu/core/rtw_ieee80211.c +++ b/drivers/staging/rtl8188eu/core/rtw_ieee80211.c @@ -292,7 +292,7 @@ int rtw_generate_ie(struct registry_priv *pregistrypriv) return sz; } -unsigned char *rtw_get_wpa_ie(unsigned char *pie, int *wpa_ie_len, int limit) +unsigned char *rtw_get_wpa_ie(unsigned char *pie, uint *wpa_ie_len, int limit) { uint len; u16 val16; diff --git a/drivers/staging/rtl8188eu/include/ieee80211.h b/drivers/staging/rtl8188eu/include/ieee80211.h index b3f331a..22ab0c4 100644 --- a/drivers/staging/rtl8188eu/include/ieee80211.h +++ b/drivers/staging/rtl8188eu/include/ieee80211.h @@ -861,7 +861,7 @@ u8 *rtw_get_ie(u8 *pbuf, int index, uint *len, int limit); void rtw_set_supported_rate(u8 *SupportedRates, uint mode); -unsigned char *rtw_get_wpa_ie(unsigned char *pie, int *wpa_ie_len, int limit); +unsigned char *rtw_get_wpa_ie(unsigned char *pie, uint *wpa_ie_len, int limit); unsigned char *rtw_get_wpa2_ie(unsigned char *pie, uint *rsn_ie_len, int limit); int rtw_get_wpa_cipher_suite(u8 *s); int rtw_get_wpa2_cipher_suite(u8 *s); -- 2.7.4