Re: [PATCH] staging: usbip: vhci_sysfs.c: Fix a style issue

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

 



Oops--you're right, I didn't check. I'll correct the patch and resubmit.

Sorry about that,
-lars

-- 
  Lars R. Damerow
  lars@xxxxxxxxxxxxxx

On Thu, Aug 7, 2014, at 09:08 AM, Sergei Shtylyov wrote:
> Hello.
> 
> On 08/07/2014 10:22 AM, Lars R. Damerow wrote:
> 
> > Replace a single-value sscanf() call with a call to kstrtou32(), as
> > recommended by checkpatch.pl.
> 
> > Signed-off-by: Lars R. Damerow <lars@xxxxxxxxxxxxxx>
> > ---
> >   drivers/staging/usbip/vhci_sysfs.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> > diff --git a/drivers/staging/usbip/vhci_sysfs.c b/drivers/staging/usbip/vhci_sysfs.c
> > index 211f43f..1dfbfa0 100644
> > --- a/drivers/staging/usbip/vhci_sysfs.c
> > +++ b/drivers/staging/usbip/vhci_sysfs.c
> > @@ -114,7 +114,7 @@ static ssize_t store_detach(struct device *dev, struct device_attribute *attr,
> >   	int err;
> >   	__u32 rhport = 0;
> >
> > -	if (sscanf(buf, "%u", &rhport) != 1)
> > +	if (kstrtou32(buf, 10, &rhport) != 1)
> 
>     Looks like you didn't bother studying what result this function
>     returns... 
> hint: it returns 0 or negative value.
> 
> WBR, Sergei
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux