Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754137AbbGXJBD (ORCPT ); Fri, 24 Jul 2015 05:01:03 -0400 Received: from mail-in-11.arcor-online.net ([151.189.21.51]:48587 "EHLO mail-in-11.arcor-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753998AbbGXJA7 (ORCPT ); Fri, 24 Jul 2015 05:00:59 -0400 X-Greylist: Passed host: 89.204.130.146 X-DKIM: Sendmail DKIM Filter v2.8.2 mail-in-14.arcor-online.net 3md4J50d5zz4nSr X-Greylist: Passed host: 89.204.130.146 X-Greylist: Passed host: 89.204.130.146 X-Greylist: Passed host: 89.204.130.146 X-Greylist: Passed host: 89.204.130.146 Message-ID: <55B1FFD0.5070607@arcor.de> Date: Fri, 24 Jul 2015 11:05:20 +0200 From: Thomas Dahlmann User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: Nicholas Krause CC: balbi@ti.com, linux-geode@lists.infradead.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] udc:Remove no longer required varaiable in the function udc_set_halt References: <1435430744-15968-1-git-send-email-xerofoify@gmail.com> In-Reply-To: <1435430744-15968-1-git-send-email-xerofoify@gmail.com> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1588 Lines: 44 ACK and thanks! for your patches. Am 6/27/2015 8:45 PM, schrieb Nicholas Krause: > This removes the no longer required variable retval in the function > udc_set_halt now due to this variable never being set to a return > value after calling another function inside the function udc_set_halt > and only being used unchanged at the end of this function's body. > Due to this remove the no longer required variable retval and return > the value zero directly if we arrive at the end of this particular > function's body without any internal errors occurring. > > Signed-off-by: Nicholas Krause > --- > drivers/usb/gadget/udc/amd5536udc.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/usb/gadget/udc/amd5536udc.c b/drivers/usb/gadget/udc/amd5536udc.c > index de7e5e2..5b99e53 100644 > --- a/drivers/usb/gadget/udc/amd5536udc.c > +++ b/drivers/usb/gadget/udc/amd5536udc.c > @@ -1307,7 +1307,6 @@ udc_set_halt(struct usb_ep *usbep, int halt) > struct udc_ep *ep; > u32 tmp; > unsigned long iflags; > - int retval = 0; > > if (!usbep) > return -EINVAL; > @@ -1360,7 +1359,7 @@ udc_set_halt(struct usb_ep *usbep, int halt) > } > } > spin_unlock_irqrestore(&udc_stall_spinlock, iflags); > - return retval; > + return 0; > } > > /* gadget interface */ -- 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/