RE: [PATCH] staging: comedi: cast to (unsigned int *)

2021-02-19 Thread David Laight
From: Dan Carpenter > Sent: 19 February 2021 09:26 > > On Fri, Feb 19, 2021 at 09:03:59AM +, David Laight wrote: > > > It's kind of moot anyway because the patch is outdated. But the reason > > > for the ___force is that the same `struct comedi_cmd` is used in both > > > user and kernel conte

Re: [PATCH] staging: comedi: cast to (unsigned int *)

2021-02-19 Thread Ian Abbott
On 19/02/2021 09:03, David Laight wrote: >> It's kind of moot anyway because the patch is outdated. But the reason >> for the ___force is that the same `struct comedi_cmd` is used in both >> user and kernel contexts. In user contexts, the `chanlist` member >> points to user memory and in kernel c

Re: [PATCH] staging: comedi: cast to (unsigned int *)

2021-02-19 Thread Dan Carpenter
On Fri, Feb 19, 2021 at 09:03:59AM +, David Laight wrote: > > It's kind of moot anyway because the patch is outdated. But the reason > > for the ___force is that the same `struct comedi_cmd` is used in both > > user and kernel contexts. In user contexts, the `chanlist` member > > points to us

RE: [PATCH] staging: comedi: cast to (unsigned int *)

2021-02-19 Thread David Laight
> It's kind of moot anyway because the patch is outdated. But the reason > for the ___force is that the same `struct comedi_cmd` is used in both > user and kernel contexts. In user contexts, the `chanlist` member > points to user memory and in kernel contexts it points to kernel memory > (copied

Re: [PATCH] staging: comedi: cast to (unsigned int *)

2021-02-18 Thread Ian Abbott
On 17/02/2021 18:26, Greg KH wrote: On Wed, Feb 17, 2021 at 11:40:00PM +0530, Atul Gopinathan wrote: On Wed, Feb 17, 2021 at 06:35:15PM +0100, Greg KH wrote: On Wed, Feb 17, 2021 at 10:29:08PM +0530, Atul Gopinathan wrote: Resolve the following warning generated by sparse: drivers/staging//co

Re: [PATCH] staging: comedi: cast to (unsigned int *)

2021-02-17 Thread Greg KH
On Wed, Feb 17, 2021 at 11:40:00PM +0530, Atul Gopinathan wrote: > On Wed, Feb 17, 2021 at 06:35:15PM +0100, Greg KH wrote: > > On Wed, Feb 17, 2021 at 10:29:08PM +0530, Atul Gopinathan wrote: > > > Resolve the following warning generated by sparse: > > > > > > drivers/staging//comedi/comedi_fops.

Re: [PATCH] staging: comedi: cast to (unsigned int *)

2021-02-17 Thread Atul Gopinathan
On Wed, Feb 17, 2021 at 06:35:15PM +0100, Greg KH wrote: > On Wed, Feb 17, 2021 at 10:29:08PM +0530, Atul Gopinathan wrote: > > Resolve the following warning generated by sparse: > > > > drivers/staging//comedi/comedi_fops.c:2956:23: warning: incorrect type in > > assignment (different address sp

Re: [PATCH] staging: comedi: cast to (unsigned int *)

2021-02-17 Thread Greg KH
On Wed, Feb 17, 2021 at 10:29:08PM +0530, Atul Gopinathan wrote: > Resolve the following warning generated by sparse: > > drivers/staging//comedi/comedi_fops.c:2956:23: warning: incorrect type in > assignment (different address spaces) > drivers/staging//comedi/comedi_fops.c:2956:23:expected

[PATCH] staging: comedi: cast to (unsigned int *)

2021-02-17 Thread Atul Gopinathan
Resolve the following warning generated by sparse: drivers/staging//comedi/comedi_fops.c:2956:23: warning: incorrect type in assignment (different address spaces) drivers/staging//comedi/comedi_fops.c:2956:23:expected unsigned int *chanlist drivers/staging//comedi/comedi_fops.c:2956:23:g