Subject: Re: [patch net-next v2 3/3] net: devlink: add WARN_ON to check return value of unregister_netdevice_notifier_net() call

From: Jakub Kicinski <[email-masked]>
Date: Wed, 9 Nov 2022 13:45:36 -0800

On Wed, 9 Nov 2022 08:26:10 -0800 Eric Dumazet wrote:
> > On Tue, Nov 08, 2022 at 02:22:08PM +0100, Jiri Pirko wrote:  
> > > From: Jiri Pirko <[email-masked]>
> > >
> > > As the return value is not 0 only in case there is no such notifier
> > > block registered, add a WARN_ON() to yell about it.
> > >
> > > Suggested-by: Ido Schimmel <[email-masked]>
> > > Signed-off-by: Jiri Pirko <[email-masked]>  
> >
> > Reviewed-by: Ido Schimmel <[email-masked]>  
> 
> Please consider WARN_ON_ONCE(), or DEBUG_NET_WARN_ON_ONCE()

Do you have any general guidance on when to pick WARN() vs WARN_ONCE()?
Or should we always prefer _ONCE() going forward?

Let me take the first 2 in, to lower the syzbot volume.