Re: [PATCH] staging: wfx: add gcc extension __force cast

2019-11-12 Thread Jerome Pouiller
On Tuesday 12 November 2019 00:16:59 CET Al Viro wrote: [...] > More fun: > int hif_read_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id, void *val, > size_t val_len) > { > int ret; > struct hif_msg *hif; > int buf_len = sizeof(struct hif_cnf_read_mib) + val_len; >

Re: [PATCH] staging: wfx: add gcc extension __force cast

2019-11-12 Thread Jerome Pouiller
Hello Al, Thank you for your extensive review. On Monday 11 November 2019 21:28:52 CET Al Viro wrote: > On Mon, Nov 11, 2019 at 01:51:33PM +, Jules Irenge wrote: > > > > > NAK. force-cast (and it's not a gcc extension, BTW - it's sparse) is > > > basically > > > "I know better; the code is

Re: [PATCH] staging: wfx: add gcc extension __force cast

2019-11-11 Thread Al Viro
On Mon, Nov 11, 2019 at 08:28:52PM +, Al Viro wrote: > So it smells like a remote buffer overrun, little-endian or not. > And at that point I would start looking for driver original authors with > some rather pointed questions about the validation of data and lack > thereof. > > BTW, if incom

Re: [PATCH] staging: wfx: add gcc extension __force cast

2019-11-11 Thread Al Viro
On Mon, Nov 11, 2019 at 01:51:33PM +, Jules Irenge wrote: > > > NAK. force-cast (and it's not a gcc extension, BTW - it's sparse) is > > basically > > "I know better; the code is right, so STFU already". *IF* > > counters.count_... > > is really little-endian 32bit, then why isn't it decla

Re: [PATCH] staging: wfx: add gcc extension __force cast

2019-11-11 Thread Jules Irenge
On Sat, 9 Nov 2019, Al Viro wrote: > On Fri, Nov 08, 2019 at 11:38:37PM +, Jules Irenge wrote: > > Add gcc extension __force and __le32 cast to fix warning issued by Sparse > > tool."warning: cast to restricted __le32" > > > > Signed-off-by: Jules Irenge > > --- > > drivers/staging/wfx/d

Re: [PATCH] staging: wfx: add gcc extension __force cast

2019-11-09 Thread Al Viro
On Fri, Nov 08, 2019 at 11:38:37PM +, Jules Irenge wrote: > Add gcc extension __force and __le32 cast to fix warning issued by Sparse > tool."warning: cast to restricted __le32" > > Signed-off-by: Jules Irenge > --- > drivers/staging/wfx/debug.c | 2 +- > 1 file changed, 1 insertion(+), 1 de

Re: [PATCH] staging: wfx: add gcc extension __force cast

2019-11-09 Thread Greg KH
On Fri, Nov 08, 2019 at 11:38:37PM +, Jules Irenge wrote: > Add gcc extension __force and __le32 cast to fix warning issued by Sparse > tool."warning: cast to restricted __le32" Can you wrap your lines properly please? > > Signed-off-by: Jules Irenge > --- > drivers/staging/wfx/debug.c |

[PATCH] staging: wfx: add gcc extension __force cast

2019-11-08 Thread Jules Irenge
Add gcc extension __force and __le32 cast to fix warning issued by Sparse tool."warning: cast to restricted __le32" Signed-off-by: Jules Irenge --- drivers/staging/wfx/debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wfx/debug.c b/drivers/staging/wfx/d