From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755222AbcDKNPt (ORCPT ); Mon, 11 Apr 2016 09:15:49 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:49802 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754920AbcDKNPr (ORCPT ); Mon, 11 Apr 2016 09:15:47 -0400 Subject: Re: [PATCH v6 02/10] usb: dwc3: omap: Make the wrapper interrupt shared To: Felipe Balbi References: <1460374506-9779-1-git-send-email-rogerq@ti.com> <1460374506-9779-3-git-send-email-rogerq@ti.com> <87h9f8ny14.fsf@intel.com> <570B9DB9.8050807@ti.com> <87zit0mhdy.fsf@intel.com> CC: , , , , , , , , , , From: Roger Quadros Message-ID: <570BA375.2040203@ti.com> Date: Mon, 11 Apr 2016 16:15:33 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <87zit0mhdy.fsf@intel.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/04/16 15:58, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: >>>> diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c >>>> index 22e9606..51ca098 100644 >>>> --- a/drivers/usb/dwc3/dwc3-omap.c >>>> +++ b/drivers/usb/dwc3/dwc3-omap.c >>>> @@ -274,19 +274,25 @@ static irqreturn_t dwc3_omap_interrupt(int irq, void *_omap) >>>> { >>>> struct dwc3_omap *omap = _omap; >>>> u32 reg; >>>> + int ret = IRQ_NONE; >>>> >>>> reg = dwc3_omap_read_irqmisc_status(omap); >>>> >>>> + if (reg) >>>> + ret = IRQ_HANDLED; >>> >>> you can avoid the local variable by returning early here. >> >> How can we return early? we need to check irq0_status as well right? > > Oh, that's true. > > There's one thing that I noticed though. dma_status is only written to, > never read, so you should be able to remove it completely (a bit > off-topic, sorry). > I'll send a patch for that. Can it go in -rc as well along with the other 2? cheers, -roger