Re: [PATCH] staging: i4l: icn: use memdup_user

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 23, 2016 at 06:50:30AM -0400, Greg Kroah-Hartman wrote:
> On Tue, Aug 23, 2016 at 03:57:34PM +0530, Sudip Mukherjee wrote:
> > Its better to use memdup_user which does the same thing which this
> > code has implemented.
> > 
> > Suggested-by: Fengguang Wu <fengguang.wu@xxxxxxxxx>
> > Signed-off-by: Sudip Mukherjee <sudip.mukherjee@xxxxxxxxxxxxxxx>
> > ---
> >  drivers/staging/i4l/icn/icn.c | 16 +++++-----------
> >  1 file changed, 5 insertions(+), 11 deletions(-)
> > 
> > diff --git a/drivers/staging/i4l/icn/icn.c b/drivers/staging/i4l/icn/icn.c
> > index b2f4055..5312675 100644
> > --- a/drivers/staging/i4l/icn/icn.c
> > +++ b/drivers/staging/i4l/icn/icn.c
> > @@ -804,21 +804,16 @@ static int
> >  icn_loadboot(u_char __user *buffer, icn_card *card)
> >  {
> >  	int ret;
> > -	u_char *codebuf;
> > +	void *codebuf;
> 
> why did you change the type here?

type was changed as codebuf is only used with memdup_user() and
memcpy_toio() and both of them takes void. I should have mentioned
that in the commit message. Sending v2 with this change and after
removing the warning.

regards
sudip
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux