From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1749AC4363A for ; Wed, 28 Oct 2020 11:28:20 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 57F6E246C1 for ; Wed, 28 Oct 2020 11:28:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="QvBQmcGN"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZWcppmpE" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 57F6E246C1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=bKhd+rH4FA+7Vl5gkIDBvQqq3up033dH9u0E0gxQHXQ=; b=QvBQmcGNafyFXibK/Yap/ig/N QxDayaI1U0vfPpRBKUT7gddCYH57iXLYIA5RpNNi+CI9SulVWPn6ZzSPlUeCxDZVADaqGzU6eG1xL 8w9IgsIwNS1+grhdZ1l7y2jBkKTgPdpfcTBlWHmz9xIt02mIL29nnOIbU9H0OF6Xig+cmniygqmxV ZUrErByHCLFwBUgnRZCuab4apj2lBL0lCwvyAqFvn5MoyN4x3yNPwJuZzS6ot8YNFo8IrNFBoxDhm s1ePWVUxg+F81iA67nYM6YnvBU+jEXgegkq+luKpT57LyyXWNB37NY/qK4dco4ds/mc1V6YcMhio7 XNYYIjn/A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kXjbc-0008Pl-EY; Wed, 28 Oct 2020 11:27:04 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kXjbZ-0008P1-Ij for linux-arm-kernel@lists.infradead.org; Wed, 28 Oct 2020 11:27:02 +0000 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 84796246BF; Wed, 28 Oct 2020 11:26:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603884420; bh=4Vz9K5VWILkqVQVWRhlSP7/sa3Zk4U9Q0Nqg2nrhOcc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZWcppmpESqFXU3Hg0RYaM8+OgGedONeP+ja3A+NsQ4iuMHP/cSCdIglAcGPUaQeQS PAd5HVdFzbzPZeTAwuecuMpWvGHv0yrgnuXT6XkHETGQcH4ldJV8qCSGaZ5K6q1Drv jw4UNBjUDtoi+nZuOL+PaVmMvj3p5s0VmetzCJsM= Date: Wed, 28 Oct 2020 12:27:52 +0100 From: Greg Kroah-Hartman To: Thomas Gleixner Subject: Re: [patch V2 06/13] usb: host: isp1362: Replace in_interrupt() usage Message-ID: <20201028112752.GA1991431@kroah.com> References: <20201019100629.419020859@linutronix.de> <20201019101110.240285929@linutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201019101110.240285929@linutronix.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201028_072701_739257_80B9062A X-CRM114-Status: GOOD ( 24.06 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Felipe Balbi , Thomas Winischhofer , Mathias Nyman , Peter Zijlstra , Sebastian Andrzej Siewior , linux-usb@vger.kernel.org, LKML , Krzysztof Kozlowski , Johan Hovold , linux-samsung-soc@vger.kernel.org, Kukjin Kim , Valentina Manea , Duncan Sands , "Ahmed S. Darwish" , Alan Stern , linux-omap@vger.kernel.org, Shuah Khan , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Oct 19, 2020 at 12:06:35PM +0200, Thomas Gleixner wrote: > isp1362_show_regs() is a debugging-only function, with no call sites. It > prints the cached value of the HCuPINTENB register if in_interupt() is > true, otherwise it reads the actual register content. > > The usage of in_interrupt() in drivers is phased out and Linus clearly > requested that code which changes behaviour depending on context should > either be separated or the context be conveyed in an argument passed by the > caller, which usually knows the context. > > Make the conditional based on a function argument. > > Signed-off-by: Ahmed S. Darwish > Signed-off-by: Sebastian Andrzej Siewior > Signed-off-by: Thomas Gleixner > Cc: Greg Kroah-Hartman > Cc: linux-usb@vger.kernel.org > --- > V2: Fix silly typo > --- > drivers/usb/host/isp1362.h | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > --- a/drivers/usb/host/isp1362.h > +++ b/drivers/usb/host/isp1362.h > @@ -793,7 +793,8 @@ static void isp1362_write_fifo(struct is > ISP1362_REG_NO(ISP1362_REG_##r), isp1362_read_reg16(d, r)); \ > } > > -static void __attribute__((__unused__)) isp1362_show_regs(struct isp1362_hcd *isp1362_hcd) > +static void __attribute__((__unused__)) > +isp1362_show_regs(struct isp1362_hcd *isp1362_hcd, bool cached_inten) > { > isp1362_show_reg(isp1362_hcd, HCREVISION); > isp1362_show_reg(isp1362_hcd, HCCONTROL); > @@ -815,7 +816,7 @@ static void __attribute__((__unused__)) > isp1362_show_reg(isp1362_hcd, HCXFERCTR); > isp1362_show_reg(isp1362_hcd, HCuPINT); > > - if (in_interrupt()) > + if (cached_inten) > DBG(0, "%-12s[%02x]: %04x\n", "HCuPINTENB", > ISP1362_REG_NO(ISP1362_REG_HCuPINTENB), isp1362_hcd->irqenb); > else > Let's just delete this whole function, if no one is calling it, it should not be present. I'll go make up a patch for that... thanks, greg k-h _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel