netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2] staging: r8723au: Fix build warnings
@ 2014-04-09 17:55 Larry Finger
  2014-04-09 18:07 ` Jes Sorensen
  2014-04-09 18:44 ` Greg KH
  0 siblings, 2 replies; 3+ messages in thread
From: Larry Finger @ 2014-04-09 17:55 UTC (permalink / raw)
  To: gregkh; +Cc: devel, netdev, Jes Sorensen, kbuild-all, Larry Finger

The kbuild test robot reports the following:

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   75ff24fa52f0cc512ceee4c377632b91a3a80811
commit: 9176303c404741b2f96796466437f2badf6e289b staging: r8723au: Turn on build of new driver
date:   4 days ago
config: make ARCH=avr32 allyesconfig

All warnings:

>> drivers/staging/rtl8723au/include/rtw_mlme.h:620: warning: 'rtw_set_roaming' declared inline after being called
   drivers/staging/rtl8723au/include/rtw_mlme.h:620: warning: previous declaration of 'rtw_set_roaming' was here
>> drivers/staging/rtl8723au/include/rtw_mlme.h:621: warning: 'rtw_to_roaming' declared inline after being called
   drivers/staging/rtl8723au/include/rtw_mlme.h:621: warning: previous declaration of 'rtw_to_roaming' was here
--
   drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c: In function 'Hal_EEValueCheck':
>> drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2277: warning: comparison is always true due to limited range of data type

The first two warnings are fixed by making the two prototypes be "inline" to match
the actual routine. The third warning comes from testing that a u8 quantity is positive.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Jes Sorensen <Jes.Sorensen@redhat.com>
Cc: kbuild-all@01.org
---
 drivers/staging/rtl8723au/core/rtw_mlme.c         | 4 ++--
 drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8723au/core/rtw_mlme.c b/drivers/staging/rtl8723au/core/rtw_mlme.c
index 1060a9f..f945959 100644
--- a/drivers/staging/rtl8723au/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723au/core/rtw_mlme.c
@@ -2443,14 +2443,14 @@ void rtw_issue_addbareq_cmd23a(struct rtw_adapter *padapter, struct xmit_frame *
 	}
 }
 
-inline void rtw_set_roaming(struct rtw_adapter *adapter, u8 to_roaming)
+void rtw_set_roaming(struct rtw_adapter *adapter, u8 to_roaming)
 {
 	if (to_roaming == 0)
 		adapter->mlmepriv.to_join = false;
 	adapter->mlmepriv.to_roaming = to_roaming;
 }
 
-inline u8 rtw_to_roaming(struct rtw_adapter *adapter)
+u8 rtw_to_roaming(struct rtw_adapter *adapter)
 {
 	return adapter->mlmepriv.to_roaming;
 }
diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c
index 0a86923..dae61af 100644
--- a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c
+++ b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c
@@ -2277,7 +2277,7 @@ static void Hal_EEValueCheck(u8 EEType, void *pInValue, void *pOutValue)
 		u8 *pIn, *pOut;
 		pIn = (u8 *) pInValue;
 		pOut = (u8 *) pOutValue;
-		if (*pIn >= 0 && *pIn <= 63) {
+		if (*pIn <= 63) {
 			*pOut = *pIn;
 		} else {
 			RT_TRACE(_module_hci_hal_init_c_, _drv_err_,
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH V2] staging: r8723au: Fix build warnings
  2014-04-09 17:55 [PATCH V2] staging: r8723au: Fix build warnings Larry Finger
@ 2014-04-09 18:07 ` Jes Sorensen
  2014-04-09 18:44 ` Greg KH
  1 sibling, 0 replies; 3+ messages in thread
From: Jes Sorensen @ 2014-04-09 18:07 UTC (permalink / raw)
  To: Larry Finger; +Cc: devel, gregkh, kbuild-all, netdev

Larry Finger <Larry.Finger@lwfinger.net> writes:
> The kbuild test robot reports the following:
>
> tree:   git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   75ff24fa52f0cc512ceee4c377632b91a3a80811
> commit: 9176303c404741b2f96796466437f2badf6e289b staging: r8723au:
> Turn on build of new driver
> date:   4 days ago
> config: make ARCH=avr32 allyesconfig
>
> All warnings:
>
>>> drivers/staging/rtl8723au/include/rtw_mlme.h:620: warning:
>>> rtw_set_roaming' declared inline after being called
>    drivers/staging/rtl8723au/include/rtw_mlme.h:620: warning: previous
> declaration of 'rtw_set_roaming' was here
>>> drivers/staging/rtl8723au/include/rtw_mlme.h:621: warning:
>>> rtw_to_roaming' declared inline after being called
>    drivers/staging/rtl8723au/include/rtw_mlme.h:621: warning: previous
> declaration of 'rtw_to_roaming' was here
> --
>    drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c: In function
> Hal_EEValueCheck':
>>> drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2277: warning:
>>> comparison is always true due to limited range of data type
>
> The first two warnings are fixed by making the two prototypes be "inline" to match
> the actual routine. The third warning comes from testing that a u8 quantity is positive.
>
> Reported-by: kbuild test robot <fengguang.wu@intel.com>
> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
> Cc: Jes Sorensen <Jes.Sorensen@redhat.com>
> Cc: kbuild-all@01.org

Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com>

Looks good to me!

Jes

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH V2] staging: r8723au: Fix build warnings
  2014-04-09 17:55 [PATCH V2] staging: r8723au: Fix build warnings Larry Finger
  2014-04-09 18:07 ` Jes Sorensen
@ 2014-04-09 18:44 ` Greg KH
  1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2014-04-09 18:44 UTC (permalink / raw)
  To: Larry Finger; +Cc: devel, netdev, Jes Sorensen, kbuild-all

On Wed, Apr 09, 2014 at 12:55:59PM -0500, Larry Finger wrote:
> The kbuild test robot reports the following:
> 
> tree:   git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   75ff24fa52f0cc512ceee4c377632b91a3a80811
> commit: 9176303c404741b2f96796466437f2badf6e289b staging: r8723au: Turn on build of new driver
> date:   4 days ago
> config: make ARCH=avr32 allyesconfig
> 
> All warnings:
> 
> >> drivers/staging/rtl8723au/include/rtw_mlme.h:620: warning: 'rtw_set_roaming' declared inline after being called
>    drivers/staging/rtl8723au/include/rtw_mlme.h:620: warning: previous declaration of 'rtw_set_roaming' was here
> >> drivers/staging/rtl8723au/include/rtw_mlme.h:621: warning: 'rtw_to_roaming' declared inline after being called
>    drivers/staging/rtl8723au/include/rtw_mlme.h:621: warning: previous declaration of 'rtw_to_roaming' was here
> --
>    drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c: In function 'Hal_EEValueCheck':
> >> drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:2277: warning: comparison is always true due to limited range of data type
> 
> The first two warnings are fixed by making the two prototypes be "inline" to match
> the actual routine.

This sentance doesn't match the patch contents anymore :(

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-04-09 18:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-09 17:55 [PATCH V2] staging: r8723au: Fix build warnings Larry Finger
2014-04-09 18:07 ` Jes Sorensen
2014-04-09 18:44 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).