From patchwork Tue Oct 3 14:51:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Marangi X-Patchwork-Id: 13407895 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 9E5C2E75459 for ; Tue, 3 Oct 2023 18:36:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240799AbjJCSgn (ORCPT ); Tue, 3 Oct 2023 14:36:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240778AbjJCSgm (ORCPT ); Tue, 3 Oct 2023 14:36:42 -0400 Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E498B0; Tue, 3 Oct 2023 11:36:38 -0700 (PDT) Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-32615eaa312so1177570f8f.2; Tue, 03 Oct 2023 11:36:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696358197; x=1696962997; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=Tm9YMom9fHhN1d1zUQG0VRznBhXAxuVYa9i0nGcBxaE=; b=M45hqmBrHR+facBVKRwlzALIL3VyPwJKEZb5FWtZfhGbB8qveTVZC7KETyFWbPzYQT CRhRAKokoqMHP8IGSIaB08PGf+4Yo5KHLdVaIlAcm/gb8BMWS5Qoernr/ymEJ9ucQ9l4 kb7wzxz+2TJ0V0ZsOz9gkhBGLQhEposcV/e/kPNFcLC4zktgKhV3AAMejxh4ihXWIQnn /sqvXJwsepJ+oRZQZIVcSe3q8d17PxSs0H+M+aK842c8Yc0kQTpwYXoxTlbI0Z5GzmTm oZKf7klMTdSXnCNUO1ZkUw/rKmARw9HtGK1QtkW03EncSGmSTcVxFr4LYaLtDWhOumkn N46A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696358197; x=1696962997; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Tm9YMom9fHhN1d1zUQG0VRznBhXAxuVYa9i0nGcBxaE=; b=qz6fEnW+EfHqEr10i7UkLsStWc45gItp+lEXnvknD8sp1yIOdc5tw+TySWaemrOLmo wwYFrUZFY6qR+yDV3ZvEsSE7bacZ/+VBRcpU8Yprf14Z5L84Sp9HbYFbYfhj6ZNSSwjM sp7QJPc/VigPo66N+2yXyUd74A0fYrXMZIohii3XBdUxFTBvfAmgj1BiNOcBeL8DxPg0 fzsMaWUDNdLaAGet0GZbmCcG/G6yt4GbRLZLi5tTyqSUDjAmN9dCjL8/Uzv8zpjm1IUx f9aE54isO6esvOk+EUXXqB6ii3BBqCn38PA18bQiGXPUCSjhKk0am3tQJunT3a2VXmCF Sp1w== X-Gm-Message-State: AOJu0YxwN60uxMVYemLPy9mzrbkJjlKGecfcxBW1SOzUk8h5A7VYKl0K em654ODaziGxpNO1eChFeFE= X-Google-Smtp-Source: AGHT+IHmCEBSKPg2KzPhN3vxGxKbm3vSVCgg07JJ6ZMfT1RcykDF7kKuvKIwIWmfSE0q+HzXTkP5ww== X-Received: by 2002:a5d:460a:0:b0:320:447:3bcc with SMTP id t10-20020a5d460a000000b0032004473bccmr40025wrq.51.1696358196705; Tue, 03 Oct 2023 11:36:36 -0700 (PDT) Received: from localhost.localdomain (93-34-89-13.ip49.fastwebnet.it. [93.34.89.13]) by smtp.googlemail.com with ESMTPSA id k15-20020a7bc40f000000b004013797efb6sm10147400wmi.9.2023.10.03.11.36.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 11:36:36 -0700 (PDT) From: Christian Marangi To: Jason Gunthorpe , Leon Romanovsky , Wolfgang Grandegger , Marc Kleine-Budde , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Chris Snook , Raju Rangoju , Jeroen de Borst , Praveen Kaligineedi , Shailend Chand , Douglas Miller , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Nick Child , Haren Myneni , Rick Lindsley , Dany Madden , Thomas Falcon , Tariq Toukan , Alexandre Torgue , Jose Abreu , Maxime Coquelin , Krzysztof Halasa , Kalle Valo , Jeff Johnson , Gregory Greenman , Chandrashekar Devegowda , Intel Corporation , Chiranjeevi Rapolu , Liu Haijun , M Chetan Kumar , Ricardo Martinez , Loic Poulain , Sergey Ryazanov , Johannes Berg , Christian Marangi , Yuanjun Gong , Simon Horman , Rob Herring , Ziwei Xiao , Rushil Gupta , Coco Li , Thomas Gleixner , Junfeng Guo , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Wei Fang , Krzysztof Kozlowski , Yuri Karpov , Zhengchao Shao , Andrew Lunn , Zheng Zengkai , Lee Jones , Maximilian Luz , "Rafael J. Wysocki" , Dawei Li , Anjaneyulu , Benjamin Berg , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, linux-can@vger.kernel.org, netdev@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, ath10k@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [net-next PATCH v2 1/4] netdev: replace simple napi_schedule_prep/__napi_schedule to napi_schedule Date: Tue, 3 Oct 2023 16:51:47 +0200 Message-Id: <20231003145150.2498-1-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Replace drivers that still use napi_schedule_prep/__napi_schedule with napi_schedule helper as it does the same exact check and call. Signed-off-by: Christian Marangi Reviewed-by: Eric Dumazet --- Changes v2: - Add missing semicolon --- drivers/net/ethernet/ni/nixge.c | 3 +-- drivers/net/ethernet/wiznet/w5100.c | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/ni/nixge.c b/drivers/net/ethernet/ni/nixge.c index 97f4798f4b42..f71a4f8bbb89 100644 --- a/drivers/net/ethernet/ni/nixge.c +++ b/drivers/net/ethernet/ni/nixge.c @@ -755,8 +755,7 @@ static irqreturn_t nixge_rx_irq(int irq, void *_ndev) cr &= ~(XAXIDMA_IRQ_IOC_MASK | XAXIDMA_IRQ_DELAY_MASK); nixge_dma_write_reg(priv, XAXIDMA_RX_CR_OFFSET, cr); - if (napi_schedule_prep(&priv->napi)) - __napi_schedule(&priv->napi); + napi_schedule(&priv->napi); goto out; } if (!(status & XAXIDMA_IRQ_ALL_MASK)) { diff --git a/drivers/net/ethernet/wiznet/w5100.c b/drivers/net/ethernet/wiznet/w5100.c index 341ee2f249fd..b26fd15c25ae 100644 --- a/drivers/net/ethernet/wiznet/w5100.c +++ b/drivers/net/ethernet/wiznet/w5100.c @@ -930,8 +930,8 @@ static irqreturn_t w5100_interrupt(int irq, void *ndev_instance) if (priv->ops->may_sleep) queue_work(priv->xfer_wq, &priv->rx_work); - else if (napi_schedule_prep(&priv->napi)) - __napi_schedule(&priv->napi); + else + napi_schedule(&priv->napi); } return IRQ_HANDLED;