From patchwork Sat Feb 13 17:05:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 12086959 X-Patchwork-Delegate: kuba@kernel.org 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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 8FBA3C433E0 for ; Sat, 13 Feb 2021 17:06:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5A5E064DD6 for ; Sat, 13 Feb 2021 17:06:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229653AbhBMRGF (ORCPT ); Sat, 13 Feb 2021 12:06:05 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:52216 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229574AbhBMRGE (ORCPT ); Sat, 13 Feb 2021 12:06:04 -0500 From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1613235922; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=JJEOBuOjzmwW6/pSsqT7bNUyGEmlyOp1VIAaMUDaRVY=; b=DYW5HuEkpeCTBdAW7M31I45+ATB3cwn8OlDi6Oi+edM1Rcuwv3IP5iLB2pu0AEfycAwDMF wYtVIG5YcU5ujZLN/YoOKgj0W3TP08CLKkdaK8jLTPlMH+Tb44vBJA/1l6tJwy0/c0dBQZ /aRJp5ycXo0Ssv7tUGl87PQtkz+H4NkE1/5/89cz/khCL2IXjHAGOVXFH3QU5JFkBaybJJ 7/+yO5slEnjqHACtsJ15F+5IXfvvLKH4UJtzXTP7FlHcBcSOOnsazPcghBR4aAY9IBiNDR fanOh0MA2UhvxUKnTjVttngaDtn5SUVEOFP0Vf/GOIiuyMhUSfHijGWHPivHsA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1613235922; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=JJEOBuOjzmwW6/pSsqT7bNUyGEmlyOp1VIAaMUDaRVY=; b=WOkik4hZMpQywf6iDBUy7u8wJiRRpdJ3dGamGYCXhtzJwxygq4Ytdu/1MMOl1QI7ea6Nhz 0rMfBYXRGX0Rk2CQ== To: netdev@vger.kernel.org Cc: Thomas Gleixner , "David S. Miller" , Jakub Kicinski , Sebastian Andrzej Siewior Subject: [PATCH net-next] net: caif: Use netif_rx_any_context(). Date: Sat, 13 Feb 2021 18:05:14 +0100 Message-Id: <20210213170514.3092234-1-bigeasy@linutronix.de> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org The usage of in_interrupt() in non-core code is phased out. Ideally the information of the calling context should be passed by the callers or the functions be split as appropriate. The attempt to consolidate the code by passing an arguemnt or by distangling it failed due lack of knowledge about this driver and because the call chains are hard to follow. As a stop gap use netif_rx_any_context() which invokes the correct code path depending on context and confines the in_interrupt() usage to core code. Signed-off-by: Sebastian Andrzej Siewior --- net/caif/chnl_net.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/net/caif/chnl_net.c b/net/caif/chnl_net.c index 79b6a04d8eb61..fadc7c8a3107f 100644 --- a/net/caif/chnl_net.c +++ b/net/caif/chnl_net.c @@ -115,10 +115,7 @@ static int chnl_recv_cb(struct cflayer *layr, struct cfpkt *pkt) else skb->ip_summed = CHECKSUM_NONE; - if (in_interrupt()) - netif_rx(skb); - else - netif_rx_ni(skb); + netif_rx_any_context(skb); /* Update statistics. */ priv->netdev->stats.rx_packets++;