LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] staging: wilc1000: Fix type of argument in ieee80211_is_action()
@ 2018-06-10  7:10 Nishad Kamdar
  2018-06-12 13:14 ` Dan Carpenter
  0 siblings, 1 reply; 3+ messages in thread
From: Nishad Kamdar @ 2018-06-10  7:10 UTC (permalink / raw)
  To: Aditya Shankar, Ganesh Krishna, Greg Kroah-Hartman
  Cc: linux-wireless, devel, linux-kernel

Type used is unsigned char but expected is restricted __le16.
Warning reported by sparse. Part of eudyptula challenge.

Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com>
---
 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index e248702ee519..745bf5ca2622 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -1431,7 +1431,7 @@ void wilc_wfi_p2p_rx(struct net_device *dev, u8 *buff, u32 size)
 
 	freq = ieee80211_channel_to_frequency(curr_channel, NL80211_BAND_2GHZ);
 
-	if (!ieee80211_is_action(buff[FRAME_TYPE_ID])) {
+	if (!ieee80211_is_action(cpu_to_le16(buff[FRAME_TYPE_ID]))) {
 		cfg80211_rx_mgmt(priv->wdev, freq, 0, buff, size, 0);
 		return;
 	}
-- 
2.17.0

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

* Re: [PATCH] staging: wilc1000: Fix type of argument in ieee80211_is_action()
  2018-06-10  7:10 [PATCH] staging: wilc1000: Fix type of argument in ieee80211_is_action() Nishad Kamdar
@ 2018-06-12 13:14 ` Dan Carpenter
  2018-06-17  8:27   ` Nishad Kamdar
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2018-06-12 13:14 UTC (permalink / raw)
  To: Nishad Kamdar
  Cc: Aditya Shankar, Ganesh Krishna, Greg Kroah-Hartman, devel,
	linux-wireless, linux-kernel

On Sun, Jun 10, 2018 at 12:40:17PM +0530, Nishad Kamdar wrote:
> Type used is unsigned char but expected is restricted __le16.
> Warning reported by sparse. Part of eudyptula challenge.
> 

The code is buggy, but this fix just papers over it.  We discussed this
code earlier.

https://lkml.org/lkml/2018/6/5/304

regards,
dan carpenter


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

* Re: [PATCH] staging: wilc1000: Fix type of argument in ieee80211_is_action()
  2018-06-12 13:14 ` Dan Carpenter
@ 2018-06-17  8:27   ` Nishad Kamdar
  0 siblings, 0 replies; 3+ messages in thread
From: Nishad Kamdar @ 2018-06-17  8:27 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Aditya Shankar, Ganesh Krishna, Greg Kroah-Hartman, devel,
	linux-wireless, linux-kernel

On Tue, Jun 12, 2018 at 04:14:13PM +0300, Dan Carpenter wrote:
> On Sun, Jun 10, 2018 at 12:40:17PM +0530, Nishad Kamdar wrote:
> > Type used is unsigned char but expected is restricted __le16.
> > Warning reported by sparse. Part of eudyptula challenge.
> > 
> 
> The code is buggy, but this fix just papers over it.  We discussed this
> code earlier.
> 
> https://lkml.org/lkml/2018/6/5/304
> 
> regards,
> dan carpenter
> 

Ok, I will look at the discussion. Thanks for the review.

regards,
nishad kamdar

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

end of thread, other threads:[~2018-06-17  8:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-10  7:10 [PATCH] staging: wilc1000: Fix type of argument in ieee80211_is_action() Nishad Kamdar
2018-06-12 13:14 ` Dan Carpenter
2018-06-17  8:27   ` Nishad Kamdar

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).