mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] staging: wlan-ng: remove Sparse warnings for reading __le16
@ 2017-03-13 13:14 Gioh Kim
  2017-03-13 13:14 ` [PATCH 1/2] staging: wlan-ng: introduce a macro read_u16 Gioh Kim
  2017-03-13 13:14 ` [PATCH 2/2] staging: wlan-ng: prism2sta.c: apply read_u16 macro Gioh Kim
  0 siblings, 2 replies; 4+ messages in thread
From: Gioh Kim @ 2017-03-13 13:14 UTC (permalink / raw)
  To: gregkh, sergio.paracuellos; +Cc: devel, linux-kernel, gurugio, Gioh Kim

Hi,

I found that many "warning: cast to restricted __le16" in staging/wlan-ng directory.
I don't know why but many structures has u16 type variable, not __le16.
And they are read by le16_to_cpu macro.

So I introduced a wrapper macro to read u16 type variable without Sparse warning,
and convert it into u32 type.
I hope this could help.


Gioh Kim (2):
  taging: wlan-ng: introduce a macro read_u16
  staging: wlan-ng: prism2sta.c: apply read_u16 macro

 drivers/staging/wlan-ng/prism2mgmt.h |   3 +
 drivers/staging/wlan-ng/prism2sta.c  | 128 +++++++++++++++++------------------
 2 files changed, 67 insertions(+), 64 deletions(-)

-- 
2.5.0

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

end of thread, other threads:[~2017-03-14  0:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-13 13:14 [PATCH 0/2] staging: wlan-ng: remove Sparse warnings for reading __le16 Gioh Kim
2017-03-13 13:14 ` [PATCH 1/2] staging: wlan-ng: introduce a macro read_u16 Gioh Kim
2017-03-14  0:02   ` Greg KH
2017-03-13 13:14 ` [PATCH 2/2] staging: wlan-ng: prism2sta.c: apply read_u16 macro Gioh Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®