[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20231009133754.9834-5-ansuelsmth@gmail.com>
Date: Mon, 9 Oct 2023 15:37:54 +0200
From: Christian Marangi <ansuelsmth@...il.com>
To: Jason Gunthorpe <jgg@...pe.ca>,
Leon Romanovsky <leon@...nel.org>,
Wolfgang Grandegger <wg@...ndegger.com>,
Marc Kleine-Budde <mkl@...gutronix.de>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Chris Snook <chris.snook@...il.com>,
Raju Rangoju <rajur@...lsio.com>,
Jeroen de Borst <jeroendb@...gle.com>,
Praveen Kaligineedi <pkaligineedi@...gle.com>,
Shailend Chand <shailend@...gle.com>,
Douglas Miller <dougmill@...ux.ibm.com>,
Nick Child <nnac123@...ux.ibm.com>,
Michael Ellerman <mpe@...erman.id.au>,
Nicholas Piggin <npiggin@...il.com>,
Christophe Leroy <christophe.leroy@...roup.eu>,
Haren Myneni <haren@...ux.ibm.com>,
Rick Lindsley <ricklind@...ux.ibm.com>,
Dany Madden <danymadden@...ibm.com>,
Thomas Falcon <tlfalcon@...ux.ibm.com>,
Tariq Toukan <tariqt@...dia.com>,
Alexandre Torgue <alexandre.torgue@...s.st.com>,
Jose Abreu <joabreu@...opsys.com>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
Krzysztof Halasa <khalasa@...p.pl>,
Kalle Valo <kvalo@...nel.org>,
Jeff Johnson <quic_jjohnson@...cinc.com>,
Gregory Greenman <gregory.greenman@...el.com>,
Chandrashekar Devegowda <chandrashekar.devegowda@...el.com>,
Intel Corporation <linuxwwan@...el.com>,
Chiranjeevi Rapolu <chiranjeevi.rapolu@...ux.intel.com>,
Liu Haijun <haijun.liu@...iatek.com>,
M Chetan Kumar <m.chetan.kumar@...ux.intel.com>,
Ricardo Martinez <ricardo.martinez@...ux.intel.com>,
Loic Poulain <loic.poulain@...aro.org>,
Sergey Ryazanov <ryazanov.s.a@...il.com>,
Johannes Berg <johannes@...solutions.net>,
Christian Marangi <ansuelsmth@...il.com>,
Yuanjun Gong <ruc_gongyuanjun@....com>,
Alex Elder <elder@...aro.org>,
Bhupesh Sharma <bhupesh.sharma@...aro.org>,
Simon Horman <horms@...nel.org>,
Rob Herring <robh@...nel.org>,
Bailey Forrest <bcf@...gle.com>,
Junfeng Guo <junfeng.guo@...el.com>,
"Gustavo A. R. Silva" <gustavoars@...nel.org>,
Ziwei Xiao <ziweixiao@...gle.com>,
Rushil Gupta <rushilg@...gle.com>,
Thomas Gleixner <tglx@...utronix.de>,
Uwe Kleine-König <u.kleine-koenig@...gutronix.de>,
Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
Yuri Karpov <YKarpov@...ras.ru>,
Andrew Lunn <andrew@...n.ch>,
Zheng Zengkai <zhengzengkai@...wei.com>,
Dawei Li <set_pte_at@...look.com>,
Anjaneyulu <pagadala.yesu.anjaneyulu@...el.com>,
Benjamin Berg <benjamin.berg@...el.com>,
linux-rdma@...r.kernel.org,
linux-kernel@...r.kernel.org,
linux-can@...r.kernel.org,
netdev@...r.kernel.org,
linuxppc-dev@...ts.ozlabs.org,
linux-stm32@...md-mailman.stormreply.com,
linux-arm-kernel@...ts.infradead.org,
ath10k@...ts.infradead.org,
linux-wireless@...r.kernel.org
Subject: [net-next v3 5/5] netdev: use napi_schedule bool instead of napi_schedule_prep/__napi_schedule
Replace if condition of napi_schedule_prep/__napi_schedule and use bool
from napi_schedule directly where possible.
Signed-off-by: Christian Marangi <ansuelsmth@...il.com>
---
Changes v3:
- Drop toshiba change and rework in separate patch
---
drivers/net/ethernet/atheros/atlx/atl1.c | 4 +---
drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 4 +---
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/atheros/atlx/atl1.c b/drivers/net/ethernet/atheros/atlx/atl1.c
index 02aa6fd8ebc2..a9014d7932db 100644
--- a/drivers/net/ethernet/atheros/atlx/atl1.c
+++ b/drivers/net/ethernet/atheros/atlx/atl1.c
@@ -2446,7 +2446,7 @@ static int atl1_rings_clean(struct napi_struct *napi, int budget)
static inline int atl1_sched_rings_clean(struct atl1_adapter* adapter)
{
- if (!napi_schedule_prep(&adapter->napi))
+ if (!napi_schedule(&adapter->napi))
/* It is possible in case even the RX/TX ints are disabled via IMR
* register the ISR bits are set anyway (but do not produce IRQ).
* To handle such situation the napi functions used to check is
@@ -2454,8 +2454,6 @@ static inline int atl1_sched_rings_clean(struct atl1_adapter* adapter)
*/
return 0;
- __napi_schedule(&adapter->napi);
-
/*
* Disable RX/TX ints via IMR register if it is
* allowed. NAPI handler must reenable them in same
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/rx.c b/drivers/net/wireless/intel/iwlwifi/pcie/rx.c
index 23b5a0adcbd6..146bc7bd14fb 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/rx.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/rx.c
@@ -1660,9 +1660,7 @@ irqreturn_t iwl_pcie_irq_rx_msix_handler(int irq, void *dev_id)
IWL_DEBUG_ISR(trans, "[%d] Got interrupt\n", entry->entry);
local_bh_disable();
- if (napi_schedule_prep(&rxq->napi))
- __napi_schedule(&rxq->napi);
- else
+ if (!napi_schedule(&rxq->napi))
iwl_pcie_clear_irq(trans, entry->entry);
local_bh_enable();
--
2.40.1
Powered by blists - more mailing lists