From patchwork Sun Mar 6 21:57:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 12770931 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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B0978C433FE for ; Sun, 6 Mar 2022 21:58:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234324AbiCFV7H (ORCPT ); Sun, 6 Mar 2022 16:59:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234313AbiCFV67 (ORCPT ); Sun, 6 Mar 2022 16:58:59 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DD311EAD9 for ; Sun, 6 Mar 2022 13:58:06 -0800 (PST) From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1646603882; 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: in-reply-to:in-reply-to:references:references; bh=lqJLFzMNwUI3glsCEQzZp1FtzCGUjUGLW4CKX1XCqNI=; b=RkLwUXbPJ0v9vXqgSyrjLDGj8Zi1OEqtc/K/ulwy4tWnSxC1xv8/DK5a3CDqmn24vY74d/ 9DbgdknvIY+vxL6qCNq6sQkgtVVUaJ9ZbHUF+l8flEylzkg48O1U8eprgQhMEQ0Hwa9sHk BZ8z2YonjP5+paNiafmHrZ7bffRcJSmMfiwUrrRv6x0mFvn2zMGVlemV5vrJ65LhHrpv/J JlsMmgRAAwiPvii71HXMIoVUBjguIOg9DSjMErZIWi50vEWd2GKkwENb3oHq4QxwR6SB4L 179sUqJQ7sLUv04idsudzOg32RP9Q0/GPcVVS1/47WRPpaQCdS0TVomJT8ZAJg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1646603882; 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: in-reply-to:in-reply-to:references:references; bh=lqJLFzMNwUI3glsCEQzZp1FtzCGUjUGLW4CKX1XCqNI=; b=IS6+ufh2RIcEndcRg533gv94BbnaEgxb9vVYSfXKbJlwUYEop7DF85NRNVxrNKLAMVgMln s+jKYy9el330gUCw== To: netdev@vger.kernel.org Cc: "David S. Miller" , Jakub Kicinski , Thomas Gleixner , Sebastian Andrzej Siewior , Remi Denis-Courmont Subject: [PATCH net-next 07/10] phonet: Use netif_rx(). Date: Sun, 6 Mar 2022 22:57:50 +0100 Message-Id: <20220306215753.3156276-8-bigeasy@linutronix.de> In-Reply-To: <20220306215753.3156276-1-bigeasy@linutronix.de> References: <20220306215753.3156276-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 Since commit baebdf48c3600 ("net: dev: Makes sure netif_rx() can be invoked in any context.") the function netif_rx() can be used in preemptible/thread context as well as in interrupt context. Use netif_rx(). Cc: Remi Denis-Courmont Signed-off-by: Sebastian Andrzej Siewior Acked-by: RĂ©mi Denis-Courmont --- net/phonet/af_phonet.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/net/phonet/af_phonet.c b/net/phonet/af_phonet.c index 65218b7ce9f94..2b582da1e88c0 100644 --- a/net/phonet/af_phonet.c +++ b/net/phonet/af_phonet.c @@ -146,7 +146,7 @@ EXPORT_SYMBOL(phonet_header_ops); * Prepends an ISI header and sends a datagram. */ static int pn_send(struct sk_buff *skb, struct net_device *dev, - u16 dst, u16 src, u8 res, u8 irq) + u16 dst, u16 src, u8 res) { struct phonethdr *ph; int err; @@ -182,7 +182,7 @@ static int pn_send(struct sk_buff *skb, struct net_device *dev, if (skb->pkt_type == PACKET_LOOPBACK) { skb_reset_mac_header(skb); skb_orphan(skb); - err = (irq ? netif_rx(skb) : netif_rx_ni(skb)) ? -ENOBUFS : 0; + err = netif_rx(skb) ? -ENOBUFS : 0; } else { err = dev_hard_header(skb, dev, ntohs(skb->protocol), NULL, NULL, skb->len); @@ -214,7 +214,7 @@ static int pn_raw_send(const void *data, int len, struct net_device *dev, skb_reserve(skb, MAX_PHONET_HEADER); __skb_put(skb, len); skb_copy_to_linear_data(skb, data, len); - return pn_send(skb, dev, dst, src, res, 1); + return pn_send(skb, dev, dst, src, res); } /* @@ -269,7 +269,7 @@ int pn_skb_send(struct sock *sk, struct sk_buff *skb, if (!pn_addr(src)) src = pn_object(saddr, pn_obj(src)); - err = pn_send(skb, dev, dst, src, res, 0); + err = pn_send(skb, dev, dst, src, res); dev_put(dev); return err;