Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1599349

[PATCH 0/2] staging: wlan-ng: remove Sparse warnings for reading __le16

From Gioh Kim <gi-oh.kim@profitbricks.com>
Newsgroups linux.kernel
Subject [PATCH 0/2] staging: wlan-ng: remove Sparse warnings for reading __le16
Date 2017-03-13 14:20 +0100
Message-ID <tky3g-12m-9@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH 0/2] staging: wlan-ng: remove Sparse warnings for reading __le16 Gioh Kim <gi-oh.kim@profitbricks.com> - 2017-03-13 14:20 +0100
  [PATCH 2/2] staging: wlan-ng: prism2sta.c: apply read_u16 macro Gioh Kim <gi-oh.kim@profitbricks.com> - 2017-03-13 14:20 +0100

csiph-web