Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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@gmail.com>
Link: https://lore.kernel.org/r/20231009133754.9834-5-ansuelsmth@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Christian Marangi and committed by
Jakub Kicinski
d1fea38f be176234

+2 -6
+1 -3
drivers/net/ethernet/atheros/atlx/atl1.c
··· 2446 2446 2447 2447 static inline int atl1_sched_rings_clean(struct atl1_adapter* adapter) 2448 2448 { 2449 - if (!napi_schedule_prep(&adapter->napi)) 2449 + if (!napi_schedule(&adapter->napi)) 2450 2450 /* It is possible in case even the RX/TX ints are disabled via IMR 2451 2451 * register the ISR bits are set anyway (but do not produce IRQ). 2452 2452 * To handle such situation the napi functions used to check is 2453 2453 * something scheduled or not. 2454 2454 */ 2455 2455 return 0; 2456 - 2457 - __napi_schedule(&adapter->napi); 2458 2456 2459 2457 /* 2460 2458 * Disable RX/TX ints via IMR register if it is
+1 -3
drivers/net/wireless/intel/iwlwifi/pcie/rx.c
··· 1660 1660 IWL_DEBUG_ISR(trans, "[%d] Got interrupt\n", entry->entry); 1661 1661 1662 1662 local_bh_disable(); 1663 - if (napi_schedule_prep(&rxq->napi)) 1664 - __napi_schedule(&rxq->napi); 1665 - else 1663 + if (!napi_schedule(&rxq->napi)) 1666 1664 iwl_pcie_clear_irq(trans, entry->entry); 1667 1665 local_bh_enable(); 1668 1666