diff mbox series

[net-next,4/8] slip/plip: Use netif_rx().

Message ID 20220305221252.3063812-5-bigeasy@linutronix.de (mailing list archive)
State Accepted
Commit e77975e02b593cbcc1ab2325b1729614d01de71f
Delegated to: Netdev Maintainers
Headers show
Series net: Convert user to netif_rx(), part 2. | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Series has a cover letter
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 2 this patch: 2
netdev/cc_maintainers warning 5 maintainers not CCed: mkl@pengutronix.de gustavoars@kernel.org arnd@arndb.de gregkh@linuxfoundation.org jirislaby@kernel.org
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 2 this patch: 2
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 16 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Sebastian Andrzej Siewior March 5, 2022, 10:12 p.m. UTC
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().

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 drivers/net/plip/plip.c | 2 +-
 drivers/net/slip/slip.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Oliver Hartkopp March 6, 2022, 9:53 a.m. UTC | #1
On 05.03.22 23:12, Sebastian Andrzej Siewior wrote:
> 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().
> 
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>

Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>

(causing both patches)

Thanks,
Oliver

> ---
>   drivers/net/plip/plip.c | 2 +-
>   drivers/net/slip/slip.c | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/plip/plip.c b/drivers/net/plip/plip.c
> index 0d491b4d66675..dafd3e9ebbf87 100644
> --- a/drivers/net/plip/plip.c
> +++ b/drivers/net/plip/plip.c
> @@ -676,7 +676,7 @@ plip_receive_packet(struct net_device *dev, struct net_local *nl,
>   	case PLIP_PK_DONE:
>   		/* Inform the upper layer for the arrival of a packet. */
>   		rcv->skb->protocol=plip_type_trans(rcv->skb, dev);
> -		netif_rx_ni(rcv->skb);
> +		netif_rx(rcv->skb);
>   		dev->stats.rx_bytes += rcv->length.h;
>   		dev->stats.rx_packets++;
>   		rcv->skb = NULL;
> diff --git a/drivers/net/slip/slip.c b/drivers/net/slip/slip.c
> index 98f586f910fb1..88396ff99f03f 100644
> --- a/drivers/net/slip/slip.c
> +++ b/drivers/net/slip/slip.c
> @@ -368,7 +368,7 @@ static void sl_bump(struct slip *sl)
>   	skb_put_data(skb, sl->rbuff, count);
>   	skb_reset_mac_header(skb);
>   	skb->protocol = htons(ETH_P_IP);
> -	netif_rx_ni(skb);
> +	netif_rx(skb);
>   	dev->stats.rx_packets++;
>   }
>
diff mbox series

Patch

diff --git a/drivers/net/plip/plip.c b/drivers/net/plip/plip.c
index 0d491b4d66675..dafd3e9ebbf87 100644
--- a/drivers/net/plip/plip.c
+++ b/drivers/net/plip/plip.c
@@ -676,7 +676,7 @@  plip_receive_packet(struct net_device *dev, struct net_local *nl,
 	case PLIP_PK_DONE:
 		/* Inform the upper layer for the arrival of a packet. */
 		rcv->skb->protocol=plip_type_trans(rcv->skb, dev);
-		netif_rx_ni(rcv->skb);
+		netif_rx(rcv->skb);
 		dev->stats.rx_bytes += rcv->length.h;
 		dev->stats.rx_packets++;
 		rcv->skb = NULL;
diff --git a/drivers/net/slip/slip.c b/drivers/net/slip/slip.c
index 98f586f910fb1..88396ff99f03f 100644
--- a/drivers/net/slip/slip.c
+++ b/drivers/net/slip/slip.c
@@ -368,7 +368,7 @@  static void sl_bump(struct slip *sl)
 	skb_put_data(skb, sl->rbuff, count);
 	skb_reset_mac_header(skb);
 	skb->protocol = htons(ETH_P_IP);
-	netif_rx_ni(skb);
+	netif_rx(skb);
 	dev->stats.rx_packets++;
 }