Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753814AbbEROm1 (ORCPT ); Mon, 18 May 2015 10:42:27 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:35089 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1753555AbbEROmN (ORCPT ); Mon, 18 May 2015 10:42:13 -0400 Date: Mon, 18 May 2015 10:42:12 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Dan Carpenter cc: Greg Kroah-Hartman , Hans de Goede , Oliver Neukum , Chase Metzger , , , Subject: Re: [patch] USB: devio: fix a condition in async_completed() In-Reply-To: <20150518122951.GA32633@mwanda> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1434 Lines: 34 On Mon, 18 May 2015, Dan Carpenter wrote: > Static checkers complain that the current condition is never true. It > seems pretty likely that it's a typo and "URB" was intended instead of > "USB". > > Fixes: 3d97ff63f899 ('usbdevfs: Use scatter-gather lists for large bulk transfers') > Signed-off-by: Dan Carpenter > > diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c > index 4b0448c..986abde 100644 > --- a/drivers/usb/core/devio.c > +++ b/drivers/usb/core/devio.c > @@ -513,7 +513,7 @@ static void async_completed(struct urb *urb) > snoop(&urb->dev->dev, "urb complete\n"); > snoop_urb(urb->dev, as->userurb, urb->pipe, urb->actual_length, > as->status, COMPLETE, NULL, 0); > - if ((urb->transfer_flags & URB_DIR_MASK) == USB_DIR_IN) > + if ((urb->transfer_flags & URB_DIR_MASK) == URB_DIR_IN) > snoop_urb_data(urb, urb->actual_length); > > if (as->status < 0 && as->bulk_addr && as->status != -ECONNRESET && Yes, this most certainly is a typo. Or rather, it is a copy of a typo originally introduced in commit 0880aef49e40 (USB: usbfs_snoop: add data logging back in). Acked-by: Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/