Skip to content

Commit

Permalink
netdev: replace simple napi_schedule_prep/__napi_schedule to napi_sch…
Browse files Browse the repository at this point in the history
…edule

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 <ansuelsmth@gmail.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/20231009133754.9834-1-ansuelsmth@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Christian Marangi authored and Jakub Kicinski committed Oct 12, 2023
1 parent 460c81d commit ef72451
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions drivers/net/ethernet/ni/nixge.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/ethernet/wiznet/w5100.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ef72451

Please sign in to comment.