netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 net-next] udp_tunnel: use netdev_warn() instead of netdev_WARN()
@ 2025-09-05  5:59 Alok Tiwari
  2025-09-05 13:08 ` Simon Horman
  2025-09-09  1:28 ` Jakub Kicinski
  0 siblings, 2 replies; 3+ messages in thread
From: Alok Tiwari @ 2025-09-05  5:59 UTC (permalink / raw)
  To: dsahern, davem, edumazet, kuba, pabeni, horms, netdev; +Cc: alok.a.tiwari

netdev_WARN() uses WARN/WARN_ON to print a backtrace along with
file and line information. In this case, udp_tunnel_nic_register()
returning an error is just a failed operation, not a kernel bug.

A simple warning message is sufficient, so use netdev_warn()
instead of netdev_WARN().

The netdev_WARN use was a typo/misuse.

Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
---
v1 -> v2
Modified commit message as discuss with Simon.
https://lore.kernel.org/all/20250903195717.2614214-1-alok.a.tiwari@oracle.com/
---
 net/ipv4/udp_tunnel_nic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv4/udp_tunnel_nic.c b/net/ipv4/udp_tunnel_nic.c
index ff66db48453c..944b3cf25468 100644
--- a/net/ipv4/udp_tunnel_nic.c
+++ b/net/ipv4/udp_tunnel_nic.c
@@ -930,7 +930,7 @@ udp_tunnel_nic_netdevice_event(struct notifier_block *unused,
 
 		err = udp_tunnel_nic_register(dev);
 		if (err)
-			netdev_WARN(dev, "failed to register for UDP tunnel offloads: %d", err);
+			netdev_warn(dev, "failed to register for UDP tunnel offloads: %d", err);
 		return notifier_from_errno(err);
 	}
 	/* All other events will need the udp_tunnel_nic state */
-- 
2.50.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2 net-next] udp_tunnel: use netdev_warn() instead of netdev_WARN()
  2025-09-05  5:59 [PATCH v2 net-next] udp_tunnel: use netdev_warn() instead of netdev_WARN() Alok Tiwari
@ 2025-09-05 13:08 ` Simon Horman
  2025-09-09  1:28 ` Jakub Kicinski
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2025-09-05 13:08 UTC (permalink / raw)
  To: Alok Tiwari; +Cc: dsahern, davem, edumazet, kuba, pabeni, netdev

On Thu, Sep 04, 2025 at 10:59:22PM -0700, Alok Tiwari wrote:
> netdev_WARN() uses WARN/WARN_ON to print a backtrace along with
> file and line information. In this case, udp_tunnel_nic_register()
> returning an error is just a failed operation, not a kernel bug.
> 
> A simple warning message is sufficient, so use netdev_warn()
> instead of netdev_WARN().
> 
> The netdev_WARN use was a typo/misuse.
> 
> Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
> ---
> v1 -> v2
> Modified commit message as discuss with Simon.
> https://lore.kernel.org/all/20250903195717.2614214-1-alok.a.tiwari@oracle.com/

Thanks for the update.

Reviewed-by: Simon Horman <horms@kernel.org>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2 net-next] udp_tunnel: use netdev_warn() instead of netdev_WARN()
  2025-09-05  5:59 [PATCH v2 net-next] udp_tunnel: use netdev_warn() instead of netdev_WARN() Alok Tiwari
  2025-09-05 13:08 ` Simon Horman
@ 2025-09-09  1:28 ` Jakub Kicinski
  1 sibling, 0 replies; 3+ messages in thread
From: Jakub Kicinski @ 2025-09-09  1:28 UTC (permalink / raw)
  To: Alok Tiwari; +Cc: dsahern, davem, edumazet, pabeni, horms, netdev

On Thu,  4 Sep 2025 22:59:22 -0700 Alok Tiwari wrote:
> netdev_WARN() uses WARN/WARN_ON to print a backtrace along with
> file and line information. In this case, udp_tunnel_nic_register()
> returning an error is just a failed operation, not a kernel bug.

This still lacks specificity. Take a look at the code and list
the code path which can ordinarily fail.

> A simple warning message is sufficient, so use netdev_warn()
> instead of netdev_WARN().
> 
> The netdev_WARN use was a typo/misuse.
-- 
pw-bot: cr

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-09-09  1:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-05  5:59 [PATCH v2 net-next] udp_tunnel: use netdev_warn() instead of netdev_WARN() Alok Tiwari
2025-09-05 13:08 ` Simon Horman
2025-09-09  1:28 ` Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).