Re: [PATCH] usb: class: usblp: Fixed assignments inside if conditions

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

 



On Tue, May 16, 2017 at 01:44:47PM +0800, kbuild test robot wrote:
Hi,

   Here is the fix.  Or I have to resubmit the whole patch?

Signed-off-by: Alberto Ladron <alberto.ladron@xxxxxxxxx>
---
diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c
index b1879ff..c335878 100644
--- a/drivers/usb/class/usblp.c
+++ b/drivers/usb/class/usblp.c
@@ -1018,7 +1018,7 @@ static int usblp_submit_read(struct usblp *usblp)
        usblp->rcomplete = 0;
        spin_unlock_irqrestore(&usblp->lock, flags);
        rc = usb_submit_urb(urb, GFP_KERNEL);
-       if (rv < 0) {
+       if (rc < 0) {
                dev_dbg(&usblp->intf->dev, "error submitting urb (%d)\n", rc);
                spin_lock_irqsave(&usblp->lock, flags);
                usblp->rstatus = rc;



> Hi Alberto,
> 
> [auto build test ERROR on usb/usb-testing]
> [also build test ERROR on v4.12-rc1 next-20170515]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
> 
> url:    https://github.com/0day-ci/linux/commits/Alberto-Ladron/usb-class-usblp-Fixed-assignments-inside-if-conditions/20170513-140010
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
> config: x86_64-rhel (attached as .config)
> compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
> reproduce:
>         # save the attached .config to linux build tree
>         make ARCH=x86_64 
> 
> All errors (new ones prefixed by >>):
> 
>    drivers//usb/class/usblp.c: In function 'usblp_submit_read':
> >> drivers//usb/class/usblp.c:1021:6: error: 'rv' undeclared (first use in this function)
>      if (rv < 0) {
>          ^~
>    drivers//usb/class/usblp.c:1021:6: note: each undeclared identifier is reported only once for each function it appears in
> 
> vim +/rv +1021 drivers//usb/class/usblp.c
> 
>   1005		urb = usb_alloc_urb(0, GFP_KERNEL);
>   1006		if (urb == NULL)
>   1007			goto raise_urb;
>   1008	
>   1009		usb_fill_bulk_urb(urb, usblp->dev,
>   1010			usb_rcvbulkpipe(usblp->dev,
>   1011			  usblp->protocol[usblp->current_protocol].epread->bEndpointAddress),
>   1012			usblp->readbuf, USBLP_BUF_SIZE_IN,
>   1013			usblp_bulk_read, usblp);
>   1014		usb_anchor_urb(urb, &usblp->urbs);
>   1015	
>   1016		spin_lock_irqsave(&usblp->lock, flags);
>   1017		usblp->readcount = 0; /* XXX Why here? */
>   1018		usblp->rcomplete = 0;
>   1019		spin_unlock_irqrestore(&usblp->lock, flags);
>   1020		rc = usb_submit_urb(urb, GFP_KERNEL);
> > 1021		if (rv < 0) {
>   1022			dev_dbg(&usblp->intf->dev, "error submitting urb (%d)\n", rc);
>   1023			spin_lock_irqsave(&usblp->lock, flags);
>   1024			usblp->rstatus = rc;
>   1025			usblp->rcomplete = 1;
>   1026			spin_unlock_irqrestore(&usblp->lock, flags);
>   1027			goto raise_submit;
>   1028		}
>   1029	
> 
> ---
> 0-DAY kernel test infrastructure                Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation


--
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