From patchwork Mon Oct 19 10:06:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 11844033 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 6C0C4C433DF for ; Mon, 19 Oct 2020 10:21:29 +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 DF7D72225A for ; Mon, 19 Oct 2020 10:21:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ACnS+x3d"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="DkOW+oqB"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="ukkqVAZW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DF7D72225A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linutronix.de 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:MIME-Version:References:Subject:To:From:Date: Message-Id:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:List-Owner; bh=+NZ6OVp8bn5chmbAPvF4qzQjmuLvfEWSpwyCx/Z+x68=; b=ACnS+x3d1iC7OupXFJzN2FY1O vbz2DpXuc+V2zy90P/nlUuJobtHfEyP8LlZ6SYHaWbrGPuDCFZB+oTHx+V9Amp9SZTzbTO/C0ElKD EQsBt4hFNQzXD7yPjQOwb1YGj4JGEZi5ZZQNzILL1AmJJj7wC1450R+mIoXGwnTB3uAbCz1dF0V1m ISGXqgzZd9gBiifjceiE7aUJV7hPY1uVUVMt30uiI6rLqxfhyrFQrwn4+3cBexOQVH6/pN4xJ/KBj kn3KETCvwvqjy1LXTu5v72AnIZZe3fk8EN8L1kJMPWvXOtddDKd25UPBzjzVFn3RUigoEcrqyl//J jeJsj0BZg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kUSGN-0003MI-Lm; Mon, 19 Oct 2020 10:19:35 +0000 Received: from galois.linutronix.de ([193.142.43.55]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kUSF1-0002rU-Cb for linux-arm-kernel@lists.infradead.org; Mon, 19 Oct 2020 10:18:14 +0000 Message-Id: <20201019101110.332963099@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1603102690; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: references:references; bh=dX7drupC9tJwDgrKaubl+xgZ5vF2h10siTohooz8pfU=; b=DkOW+oqBGph9qdl3NB+IO3bAWHEx0hDVdZQr7mdAH/mI8bWN259m/6mQ+GdfrIwwHclbSm d4KDXOrXHoqzK36EBNJ620ykBl3KV0WL3IYL2XtUe0eVwa58eo9p1PYEzmLWFoLGaxxlyi 5qDhBfX61/ubYHJJc+OIiO1q359jU7WuydYss9lTtIje80m8Xzc27wgBJlECQzEWSlQB/x 681X/NFAIpPdOUlS2uCFaNS2wL047IFr0XvrdSw5fQ6Y5ndxwteudXWqUBTCIZK/iRV9FF 9rsf0daTNDGGlgohcR5n5q7HPsbYaAKpcNqeQtmtHWlozh00S61QowhMaIVHUA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1603102690; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: references:references; bh=dX7drupC9tJwDgrKaubl+xgZ5vF2h10siTohooz8pfU=; b=ukkqVAZWUZRoaElft2syvVEMEOeTfiR51UY6hvVpXDzFz+j/0DfC10Z9+EKbw3LvamC3O+ MXG1zMeHMKUgN2Dw== Date: Mon, 19 Oct 2020 12:06:36 +0200 From: Thomas Gleixner To: LKML Subject: [patch V2 07/13] usbip: Remove in_interrupt() check References: <20201019100629.419020859@linutronix.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201019_061811_590390_23A875C8 X-CRM114-Status: GOOD ( 10.86 ) 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 , Greg Kroah-Hartman , Sebastian Andrzej Siewior , linux-usb@vger.kernel.org, Valentina Manea , Krzysztof Kozlowski , Johan Hovold , linux-samsung-soc@vger.kernel.org, Kukjin Kim , Alan Stern , Duncan Sands , "Ahmed S. Darwish" , linux-omap@vger.kernel.org, Shuah Khan , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Ahmed S. Darwish 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. usbip_recv() uses in_interrupt() to conditionally print context information for debugging messages. The value is zero as the function is only called from various *_rx_loop() kthread functions. Remove it. Signed-off-by: Ahmed S. Darwish Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Acked-by: Shuah Khan Cc: Valentina Manea Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org --- drivers/usb/usbip/usbip_common.c | 5 ----- 1 file changed, 5 deletions(-) --- a/drivers/usb/usbip/usbip_common.c +++ b/drivers/usb/usbip/usbip_common.c @@ -324,11 +324,6 @@ int usbip_recv(struct socket *sock, void } while (msg_data_left(&msg)); if (usbip_dbg_flag_xmit) { - if (!in_interrupt()) - pr_debug("%-10s:", current->comm); - else - pr_debug("interrupt :"); - pr_debug("receiving....\n"); usbip_dump_buffer(buf, size); pr_debug("received, osize %d ret %d size %zd total %d\n",