mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-04 18:09:57 +00:00
Staging: wlan-ng: Fix sparse warnings by using appropriate endian types
Fix some sparse warning by using correct endian types in structs and local variables. This patch only fix sparse warnings and do not change the logic. Signed-off-by: Adrien Descamps <adrien.descamps@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
c672f37767
commit
a18ffdf4ea
2 changed files with 28 additions and 28 deletions
|
@ -482,7 +482,7 @@ struct hfa384x_tx_frame {
|
|||
u8 address3[6];
|
||||
u16 sequence_control;
|
||||
u8 address4[6];
|
||||
u16 data_len; /* little endian format */
|
||||
__le16 data_len; /* little endian format */
|
||||
|
||||
/*-- 802.3 Header Information --*/
|
||||
|
||||
|
@ -801,41 +801,41 @@ struct hfa384x_usb_txfrm {
|
|||
} __packed;
|
||||
|
||||
struct hfa384x_usb_cmdreq {
|
||||
u16 type;
|
||||
u16 cmd;
|
||||
u16 parm0;
|
||||
u16 parm1;
|
||||
u16 parm2;
|
||||
__le16 type;
|
||||
__le16 cmd;
|
||||
__le16 parm0;
|
||||
__le16 parm1;
|
||||
__le16 parm2;
|
||||
u8 pad[54];
|
||||
} __packed;
|
||||
|
||||
struct hfa384x_usb_wridreq {
|
||||
u16 type;
|
||||
u16 frmlen;
|
||||
u16 rid;
|
||||
__le16 type;
|
||||
__le16 frmlen;
|
||||
__le16 rid;
|
||||
u8 data[HFA384x_RIDDATA_MAXLEN];
|
||||
} __packed;
|
||||
|
||||
struct hfa384x_usb_rridreq {
|
||||
u16 type;
|
||||
u16 frmlen;
|
||||
u16 rid;
|
||||
__le16 type;
|
||||
__le16 frmlen;
|
||||
__le16 rid;
|
||||
u8 pad[58];
|
||||
} __packed;
|
||||
|
||||
struct hfa384x_usb_wmemreq {
|
||||
u16 type;
|
||||
u16 frmlen;
|
||||
u16 offset;
|
||||
u16 page;
|
||||
__le16 type;
|
||||
__le16 frmlen;
|
||||
__le16 offset;
|
||||
__le16 page;
|
||||
u8 data[HFA384x_USB_RWMEM_MAXLEN];
|
||||
} __packed;
|
||||
|
||||
struct hfa384x_usb_rmemreq {
|
||||
u16 type;
|
||||
u16 frmlen;
|
||||
u16 offset;
|
||||
u16 page;
|
||||
__le16 type;
|
||||
__le16 frmlen;
|
||||
__le16 offset;
|
||||
__le16 page;
|
||||
u8 pad[56];
|
||||
} __packed;
|
||||
|
||||
|
@ -854,16 +854,16 @@ struct hfa384x_usb_infofrm {
|
|||
|
||||
struct hfa384x_usb_statusresp {
|
||||
u16 type;
|
||||
u16 status;
|
||||
u16 resp0;
|
||||
u16 resp1;
|
||||
u16 resp2;
|
||||
__le16 status;
|
||||
__le16 resp0;
|
||||
__le16 resp1;
|
||||
__le16 resp2;
|
||||
} __packed;
|
||||
|
||||
struct hfa384x_usb_rridresp {
|
||||
u16 type;
|
||||
u16 frmlen;
|
||||
u16 rid;
|
||||
__le16 frmlen;
|
||||
__le16 rid;
|
||||
u8 data[HFA384x_RIDDATA_MAXLEN];
|
||||
} __packed;
|
||||
|
||||
|
@ -1408,7 +1408,7 @@ hfa384x_drvr_setconfig_async(struct hfa384x *hw,
|
|||
static inline int
|
||||
hfa384x_drvr_setconfig16_async(struct hfa384x *hw, u16 rid, u16 val)
|
||||
{
|
||||
u16 value = cpu_to_le16(val);
|
||||
__le16 value = cpu_to_le16(val);
|
||||
|
||||
return hfa384x_drvr_setconfig_async(hw, rid, &value, sizeof(value),
|
||||
NULL, NULL);
|
||||
|
|
|
@ -2316,7 +2316,7 @@ int hfa384x_drvr_ramdl_write(struct hfa384x *hw, u32 daddr, void *buf, u32 len)
|
|||
int hfa384x_drvr_readpda(struct hfa384x *hw, void *buf, unsigned int len)
|
||||
{
|
||||
int result = 0;
|
||||
u16 *pda = buf;
|
||||
__le16 *pda = buf;
|
||||
int pdaok = 0;
|
||||
int morepdrs = 1;
|
||||
int currpdr = 0; /* word offset of the current pdr */
|
||||
|
|
Loading…
Reference in a new issue