Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: r8188eu: Fix sparse warnings in rtw_ieee80211.c

Sparse reports the following:

CHECK drivers/staging/rtl8188eu/core/rtw_ieee80211.c
drivers/staging/rtl8188eu/core/rtw_ieee80211.c:1593:14: warning: cast to restricted __le16

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Larry Finger and committed by
Greg Kroah-Hartman
be987763 7a1046e5

+8 -8
+8 -8
drivers/staging/rtl8188eu/include/ieee80211.h
··· 306 306 }; 307 307 308 308 struct rtw_ieee80211_hdr { 309 - u16 frame_ctl; 310 - u16 duration_id; 309 + __le16 frame_ctl; 310 + __le16 duration_id; 311 311 u8 addr1[ETH_ALEN]; 312 312 u8 addr2[ETH_ALEN]; 313 313 u8 addr3[ETH_ALEN]; ··· 316 316 } __packed; 317 317 318 318 struct rtw_ieee80211_hdr_3addr { 319 - u16 frame_ctl; 320 - u16 duration_id; 319 + __le16 frame_ctl; 320 + __le16 duration_id; 321 321 u8 addr1[ETH_ALEN]; 322 322 u8 addr2[ETH_ALEN]; 323 323 u8 addr3[ETH_ALEN]; ··· 325 325 } __packed; 326 326 327 327 struct rtw_ieee80211_hdr_qos { 328 - u16 frame_ctl; 329 - u16 duration_id; 328 + __le16 frame_ctl; 329 + __le16 duration_id; 330 330 u8 addr1[ETH_ALEN]; 331 331 u8 addr2[ETH_ALEN]; 332 332 u8 addr3[ETH_ALEN]; ··· 336 336 } __packed; 337 337 338 338 struct rtw_ieee80211_hdr_3addr_qos { 339 - u16 frame_ctl; 340 - u16 duration_id; 339 + __le16 frame_ctl; 340 + __le16 duration_id; 341 341 u8 addr1[ETH_ALEN]; 342 342 u8 addr2[ETH_ALEN]; 343 343 u8 addr3[ETH_ALEN];