From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavan Kondeti Subject: Re: [PATCH 1/5] USB: gadget: Fix unused variable warning in ci13xxx_udc Date: Thu, 28 Apr 2011 15:49:52 +0530 Message-ID: <4DB93F48.4050803@codeaurora.org> References: <1303977501-17115-1-git-send-email-pkondeti@codeaurora.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Return-path: Received: from wolverine02.qualcomm.com ([199.106.114.251]:65285 "EHLO wolverine02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750817Ab1D1KT6 (ORCPT ); Thu, 28 Apr 2011 06:19:58 -0400 In-Reply-To: Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: Michal Nazarewicz Cc: greg@kroah.com, linux-usb@vger.kernel.org, linux-arm-msm@vger.kernel.org On 4/28/2011 3:31 PM, Michal Nazarewicz wrote: > On Thu, 28 Apr 2011 09:58:17 +0200, Pavankumar Kondeti > wrote: > >> Signed-off-by: Pavankumar Kondeti >> --- >> drivers/usb/gadget/ci13xxx_udc.c | 2 +- >> 1 files changed, 1 insertions(+), 1 deletions(-) >> >> diff --git a/drivers/usb/gadget/ci13xxx_udc.c >> b/drivers/usb/gadget/ci13xxx_udc.c >> index e09178b..6a9ad59 100644 >> --- a/drivers/usb/gadget/ci13xxx_udc.c >> +++ b/drivers/usb/gadget/ci13xxx_udc.c >> @@ -1843,7 +1843,7 @@ __releases(mEp->lock) >> __acquires(mEp->lock) >> { >> struct ci13xxx_req *mReq, *mReqTemp; >> - int retval; >> + int uninitialized_var(retval); >> trace("%p", mEp); > > Could we instead set it to 0? > would it matter anyway? we return -EINVAL if the queue is empty. Otherwise we assign retval = _hardware_dequeue(). > Also, it seems this function has a bug where it compares retval > with EBUSY instead of -EBUSY: > > if (retval == EBUSY) > retval = 0; > > Just saying in case anyone wants to take care of it. > Thanks for pointing this out. I will send out a patch to fix this. As of now isr_tr_complete_low() return value is simply ignored for non-control endpoints. We never hit this case for control endpoint. -- Sent by a consultant of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.