Commit 76b4580b authored by Maciek Borzecki's avatar Maciek Borzecki Committed by Greg Kroah-Hartman

staging wlan-ng: fix type mismatch warnings in mkpdrlist()

struct  hfa384x_pdrec len and code fields as clearly little endian,
mark both fields as such. pda->buf is also clearly little endian.

Fixes sparse warnings:

  drivers/staging/wlan-ng/prism2fw.c:613:16: warning: cast to restricted __le16
  drivers/staging/wlan-ng/prism2fw.c:616:21: warning: cast to restricted __le16
  drivers/staging/wlan-ng/prism2fw.c:625:21: warning: cast to restricted __le16
Signed-off-by: default avatarMaciek Borzecki <maciek.borzecki@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2bbd5023
...@@ -1078,8 +1078,8 @@ struct hfa384x_pdr_end_of_pda { ...@@ -1078,8 +1078,8 @@ struct hfa384x_pdr_end_of_pda {
} __packed; } __packed;
struct hfa384x_pdrec { struct hfa384x_pdrec {
u16 len; /* in words */ __le16 len; /* in words */
u16 code; __le16 code;
union pdr { union pdr {
struct hfa384x_pdr_pcb_partnum pcb_partnum; struct hfa384x_pdr_pcb_partnum pcb_partnum;
struct hfa384x_pdr_pcb_tracenum pcb_tracenum; struct hfa384x_pdr_pcb_tracenum pcb_tracenum;
......
...@@ -604,7 +604,7 @@ static int mkimage(struct imgchunk *clist, unsigned int *ccnt) ...@@ -604,7 +604,7 @@ static int mkimage(struct imgchunk *clist, unsigned int *ccnt)
*/ */
static int mkpdrlist(struct pda *pda) static int mkpdrlist(struct pda *pda)
{ {
u16 *pda16 = (u16 *)pda->buf; __le16 *pda16 = (__le16 *)pda->buf;
int curroff; /* in 'words' */ int curroff; /* in 'words' */
pda->nrec = 0; pda->nrec = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment