Hi, On Wed, Jan 14, 2015 at 11:08:12AM -0600, Felipe Balbi wrote: > On Wed, Jan 14, 2015 at 05:12:55PM +0100, 'Markus Pargmann' wrote: > > Hi, > > > > On Wed, Jan 14, 2015 at 03:19:42PM +0000, David Laight wrote: > > > From: Markus Pargmann > > > > The first arugment has to be a pointer to the memory. buf is a char > > > > array and already a pointer itself. The current code passes a pointer to > > > > a char array to copy_from_user() which is not correct. > > > > > > It doesn't matter, while the type of the argument is subtly different the > > > value passed is the same. > > > > Thanks, I didn't know about this. So the code is actually correct and > > the patch is not a fix. I would still prefer to have it consistent with > > the usage of 'buf' in the code above and below, where 'buf' is directly > > used. > > I modified it like so: > > commit 5db92ebc06ad815a4032f28145531a879b73db08 > Author: Markus Pargmann <mpa@xxxxxxxxxxxxxx> > Date: Wed Jan 14 16:08:38 2015 +0100 > > usb: musb: debugfs: improve copy_from_user() argument > > While the code is correct and functions well, it's still > a bit misleading to add the reference operator in from of > the buf argument. > > This patch simply removes that operator in order to make > use of buf slightly better to the eyes. > > Signed-off-by: Markus Pargmann <mpa@xxxxxxxxxxxxxx> > Signed-off-by: Felipe Balbi <balbi@xxxxxx> Looks good, thank you. Best regards, Markus -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Attachment:
signature.asc
Description: Digital signature