Re: [PATCH net-next v2 1/6] net: Fix netdev_WARN_ONCE macro
On 09-Jan-18 05:05, David Miller wrote: > From: Joe Perches> Date: Mon, 08 Jan 2018 18:42:01 -0800 > >> On Sun, 2018-01-07 at 12:08 +0200, Gal Pressman wrote: >>> netdev_WARN_ONCE is broken (whoops..), this fix will remove the >>> unnecessary "condition" parameter, add the missing comma and change >>> "arg" to "args". >>> >>> Fixes: 375ef2b1f0d0 ("net: Introduce netdev_*_once functions") >>> Signed-off-by: Gal Pressman >>> Reviewed-by: Saeed Mahameed >>> --- >>> include/linux/netdevice.h | 4 ++-- >>> 1 file changed, 2 insertions(+), 2 deletions(-) >>> >>> diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h >>> index 352066e..5ff1ef9 100644 >>> --- a/include/linux/netdevice.h >>> +++ b/include/linux/netdevice.h >>> @@ -4407,8 +4407,8 @@ do { >>> \ >>> WARN(1, "netdevice: %s%s\n" format, netdev_name(dev), \ >>> netdev_reg_state(dev), ##args) >>> >>> -#define netdev_WARN_ONCE(dev, condition, format, arg...) \ >>> - WARN_ONCE(1, "netdevice: %s%s\n" format, netdev_name(dev) \ >>> +#define netdev_WARN_ONCE(dev, format, args...) >>> \ >>> + WARN_ONCE(1, "netdevice: %s%s\n" format, netdev_name(dev), \ >> >> You sure you want the newline before the format? > > Hmmm, Gal please send me a relative fix for this. > The newline is removed in the next patch, which handles the formatting of both macros. Do you want to remove it as part of this bug fix?
Re: [PATCH net-next v2 1/6] net: Fix netdev_WARN_ONCE macro
From: Joe PerchesDate: Mon, 08 Jan 2018 18:42:01 -0800 > On Sun, 2018-01-07 at 12:08 +0200, Gal Pressman wrote: >> netdev_WARN_ONCE is broken (whoops..), this fix will remove the >> unnecessary "condition" parameter, add the missing comma and change >> "arg" to "args". >> >> Fixes: 375ef2b1f0d0 ("net: Introduce netdev_*_once functions") >> Signed-off-by: Gal Pressman >> Reviewed-by: Saeed Mahameed >> --- >> include/linux/netdevice.h | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h >> index 352066e..5ff1ef9 100644 >> --- a/include/linux/netdevice.h >> +++ b/include/linux/netdevice.h >> @@ -4407,8 +4407,8 @@ do { >> \ >> WARN(1, "netdevice: %s%s\n" format, netdev_name(dev), \ >> netdev_reg_state(dev), ##args) >> >> -#define netdev_WARN_ONCE(dev, condition, format, arg...)\ >> -WARN_ONCE(1, "netdevice: %s%s\n" format, netdev_name(dev) \ >> +#define netdev_WARN_ONCE(dev, format, args...) >> \ >> +WARN_ONCE(1, "netdevice: %s%s\n" format, netdev_name(dev), \ > > You sure you want the newline before the format? Hmmm, Gal please send me a relative fix for this.
Re: [PATCH net-next v2 1/6] net: Fix netdev_WARN_ONCE macro
On Sun, 2018-01-07 at 12:08 +0200, Gal Pressman wrote: > netdev_WARN_ONCE is broken (whoops..), this fix will remove the > unnecessary "condition" parameter, add the missing comma and change > "arg" to "args". > > Fixes: 375ef2b1f0d0 ("net: Introduce netdev_*_once functions") > Signed-off-by: Gal Pressman> Reviewed-by: Saeed Mahameed > --- > include/linux/netdevice.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h > index 352066e..5ff1ef9 100644 > --- a/include/linux/netdevice.h > +++ b/include/linux/netdevice.h > @@ -4407,8 +4407,8 @@ do { > \ > WARN(1, "netdevice: %s%s\n" format, netdev_name(dev), \ >netdev_reg_state(dev), ##args) > > -#define netdev_WARN_ONCE(dev, condition, format, arg...) \ > - WARN_ONCE(1, "netdevice: %s%s\n" format, netdev_name(dev) \ > +#define netdev_WARN_ONCE(dev, format, args...) > \ > + WARN_ONCE(1, "netdevice: %s%s\n" format, netdev_name(dev), \ You sure you want the newline before the format? > netdev_reg_state(dev), ##args) > > /* netif printk helpers, similar to netdev_printk */
[PATCH net-next v2 1/6] net: Fix netdev_WARN_ONCE macro
netdev_WARN_ONCE is broken (whoops..), this fix will remove the unnecessary "condition" parameter, add the missing comma and change "arg" to "args". Fixes: 375ef2b1f0d0 ("net: Introduce netdev_*_once functions") Signed-off-by: Gal PressmanReviewed-by: Saeed Mahameed --- include/linux/netdevice.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 352066e..5ff1ef9 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -4407,8 +4407,8 @@ do { \ WARN(1, "netdevice: %s%s\n" format, netdev_name(dev), \ netdev_reg_state(dev), ##args) -#define netdev_WARN_ONCE(dev, condition, format, arg...) \ - WARN_ONCE(1, "netdevice: %s%s\n" format, netdev_name(dev) \ +#define netdev_WARN_ONCE(dev, format, args...) \ + WARN_ONCE(1, "netdevice: %s%s\n" format, netdev_name(dev), \ netdev_reg_state(dev), ##args) /* netif printk helpers, similar to netdev_printk */ -- 2.7.4