From 76b4580bf4eaf1c7d5a603c0da405e72a89b3927 Mon Sep 17 00:00:00 2001 From: Maciek Borzecki Date: Sat, 8 Apr 2017 16:04:42 +0200 Subject: [PATCH] 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: Maciek Borzecki Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wlan-ng/hfa384x.h | 4 ++-- drivers/staging/wlan-ng/prism2fw.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wlan-ng/hfa384x.h b/drivers/staging/wlan-ng/hfa384x.h index ba67b7a54358..310e2c454590 100644 --- a/drivers/staging/wlan-ng/hfa384x.h +++ b/drivers/staging/wlan-ng/hfa384x.h @@ -1078,8 +1078,8 @@ struct hfa384x_pdr_end_of_pda { } __packed; struct hfa384x_pdrec { - u16 len; /* in words */ - u16 code; + __le16 len; /* in words */ + __le16 code; union pdr { struct hfa384x_pdr_pcb_partnum pcb_partnum; struct hfa384x_pdr_pcb_tracenum pcb_tracenum; diff --git a/drivers/staging/wlan-ng/prism2fw.c b/drivers/staging/wlan-ng/prism2fw.c index 2e349f87e738..afd877fb4557 100644 --- a/drivers/staging/wlan-ng/prism2fw.c +++ b/drivers/staging/wlan-ng/prism2fw.c @@ -604,7 +604,7 @@ static int mkimage(struct imgchunk *clist, unsigned int *ccnt) */ static int mkpdrlist(struct pda *pda) { - u16 *pda16 = (u16 *)pda->buf; + __le16 *pda16 = (__le16 *)pda->buf; int curroff; /* in 'words' */ pda->nrec = 0; -- 2.39.5