* [PATCH net-next v2 0/6] Replace WARN_ONCE usages with netdev_WARN_ONCE
@ 2018-01-07 10:08 Gal Pressman
2018-01-07 10:08 ` [PATCH net-next v2 1/6] net: Fix netdev_WARN_ONCE macro Gal Pressman
` (6 more replies)
0 siblings, 7 replies; 12+ messages in thread
From: Gal Pressman @ 2018-01-07 10:08 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev, Tariq Toukan, Saeed Mahameed, Gal Pressman
Hi,
This series will fix an issue in netdev_WARN_ONCE, improve its formatting and
replace drivers' usage of WARN_ONCE to netdev_WARN_ONCE.
Driver specific patches were compilation tested, in addition, functional tested
on Mellanox NIC.
v1->v2:
- Addressed commit message comments in patch #1
Gal Pressman (6):
net: Fix netdev_WARN_ONCE macro
net: No line break on netdev_WARN* formatting
net/mlx5e: Replace WARN_ONCE with netdev_WARN_ONCE
e1000: Replace WARN_ONCE with netdev_WARN_ONCE
bnx2x: Replace WARN_ONCE with netdev_WARN_ONCE
8139cp: Replace WARN_ONCE with netdev_WARN_ONCE
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 5 +++--
drivers/net/ethernet/intel/e1000/e1000_ethtool.c | 4 ++--
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 9 ++++-----
drivers/net/ethernet/realtek/8139cp.c | 4 ++--
include/linux/netdevice.h | 6 +++---
5 files changed, 14 insertions(+), 14 deletions(-)
--
2.7.4
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH net-next v2 1/6] net: Fix netdev_WARN_ONCE macro
2018-01-07 10:08 [PATCH net-next v2 0/6] Replace WARN_ONCE usages with netdev_WARN_ONCE Gal Pressman
@ 2018-01-07 10:08 ` Gal Pressman
2018-01-09 2:42 ` Joe Perches
2018-01-07 10:08 ` [PATCH net-next v2 2/6] net: No line break on netdev_WARN* formatting Gal Pressman
` (5 subsequent siblings)
6 siblings, 1 reply; 12+ messages in thread
From: Gal Pressman @ 2018-01-07 10:08 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev, Tariq Toukan, Saeed Mahameed, Gal Pressman
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 <galp@mellanox.com>
Reviewed-by: Saeed Mahameed <saeedm@mellanox.com>
---
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
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH net-next v2 2/6] net: No line break on netdev_WARN* formatting
2018-01-07 10:08 [PATCH net-next v2 0/6] Replace WARN_ONCE usages with netdev_WARN_ONCE Gal Pressman
2018-01-07 10:08 ` [PATCH net-next v2 1/6] net: Fix netdev_WARN_ONCE macro Gal Pressman
@ 2018-01-07 10:08 ` Gal Pressman
2018-01-07 10:08 ` [PATCH net-next v2 3/6] net/mlx5e: Replace WARN_ONCE with netdev_WARN_ONCE Gal Pressman
` (4 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: Gal Pressman @ 2018-01-07 10:08 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev, Tariq Toukan, Saeed Mahameed, Gal Pressman
Remove the unnecessary line break between the netdev name and reg state
to the actual message that should be printed.
For example, this:
[86730.307236] ------------[ cut here ]------------
[86730.313496] netdevice: enp27s0f0
Message from the driver
[...]
Will be replaced with:
[86770.259289] ------------[ cut here ]------------
[86770.265191] netdevice: enp27s0f0: Message from the driver
[...]
Signed-off-by: Gal Pressman <galp@mellanox.com>
Reviewed-by: Saeed Mahameed <saeedm@mellanox.com>
---
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 5ff1ef9..87211c4 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -4404,11 +4404,11 @@ do { \
* file/line information and a backtrace.
*/
#define netdev_WARN(dev, format, args...) \
- WARN(1, "netdevice: %s%s\n" format, netdev_name(dev), \
+ WARN(1, "netdevice: %s%s: " format, netdev_name(dev), \
netdev_reg_state(dev), ##args)
#define netdev_WARN_ONCE(dev, format, args...) \
- WARN_ONCE(1, "netdevice: %s%s\n" format, netdev_name(dev), \
+ WARN_ONCE(1, "netdevice: %s%s: " format, netdev_name(dev), \
netdev_reg_state(dev), ##args)
/* netif printk helpers, similar to netdev_printk */
--
2.7.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH net-next v2 3/6] net/mlx5e: Replace WARN_ONCE with netdev_WARN_ONCE
2018-01-07 10:08 [PATCH net-next v2 0/6] Replace WARN_ONCE usages with netdev_WARN_ONCE Gal Pressman
2018-01-07 10:08 ` [PATCH net-next v2 1/6] net: Fix netdev_WARN_ONCE macro Gal Pressman
2018-01-07 10:08 ` [PATCH net-next v2 2/6] net: No line break on netdev_WARN* formatting Gal Pressman
@ 2018-01-07 10:08 ` Gal Pressman
2018-01-07 10:08 ` [PATCH net-next v2 4/6] e1000: " Gal Pressman
` (3 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: Gal Pressman @ 2018-01-07 10:08 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev, Tariq Toukan, Saeed Mahameed, Gal Pressman
Use the more appropriate netdev_WARN_ONCE instead of WARN_ONCE macro.
Signed-off-by: Gal Pressman <galp@mellanox.com>
Reviewed-by: Saeed Mahameed <saeedm@mellanox.com>
---
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
index 5334b2d..38803e3 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
@@ -495,8 +495,8 @@ static inline void mlx5e_poll_ico_single_cqe(struct mlx5e_cq *cq,
mlx5_cqwq_pop(&cq->wq);
if (unlikely((cqe->op_own >> 4) != MLX5_CQE_REQ)) {
- WARN_ONCE(true, "mlx5e: Bad OP in ICOSQ CQE: 0x%x\n",
- cqe->op_own);
+ netdev_WARN_ONCE(cq->channel->netdev,
+ "Bad OP in ICOSQ CQE: 0x%x\n", cqe->op_own);
return;
}
@@ -506,9 +506,8 @@ static inline void mlx5e_poll_ico_single_cqe(struct mlx5e_cq *cq,
}
if (unlikely(icowi->opcode != MLX5_OPCODE_NOP))
- WARN_ONCE(true,
- "mlx5e: Bad OPCODE in ICOSQ WQE info: 0x%x\n",
- icowi->opcode);
+ netdev_WARN_ONCE(cq->channel->netdev,
+ "Bad OPCODE in ICOSQ WQE info: 0x%x\n", icowi->opcode);
}
static void mlx5e_poll_ico_cq(struct mlx5e_cq *cq, struct mlx5e_rq *rq)
--
2.7.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH net-next v2 4/6] e1000: Replace WARN_ONCE with netdev_WARN_ONCE
2018-01-07 10:08 [PATCH net-next v2 0/6] Replace WARN_ONCE usages with netdev_WARN_ONCE Gal Pressman
` (2 preceding siblings ...)
2018-01-07 10:08 ` [PATCH net-next v2 3/6] net/mlx5e: Replace WARN_ONCE with netdev_WARN_ONCE Gal Pressman
@ 2018-01-07 10:08 ` Gal Pressman
2018-01-07 10:08 ` [PATCH net-next v2 5/6] bnx2x: " Gal Pressman
` (2 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: Gal Pressman @ 2018-01-07 10:08 UTC (permalink / raw)
To: David S. Miller
Cc: netdev, Tariq Toukan, Saeed Mahameed, Gal Pressman, Jeff Kirsher
Use the more appropriate netdev_WARN_ONCE instead of WARN_ONCE macro.
Signed-off-by: Gal Pressman <galp@mellanox.com>
Reviewed-by: Saeed Mahameed <saeedm@mellanox.com>
Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/e1000/e1000_ethtool.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/e1000/e1000_ethtool.c b/drivers/net/ethernet/intel/e1000/e1000_ethtool.c
index 3b3983a..dc71e87 100644
--- a/drivers/net/ethernet/intel/e1000/e1000_ethtool.c
+++ b/drivers/net/ethernet/intel/e1000/e1000_ethtool.c
@@ -1838,8 +1838,8 @@ static void e1000_get_ethtool_stats(struct net_device *netdev,
p = (char *)adapter + stat->stat_offset;
break;
default:
- WARN_ONCE(1, "Invalid E1000 stat type: %u index %d\n",
- stat->type, i);
+ netdev_WARN_ONCE(netdev, "Invalid E1000 stat type: %u index %d\n",
+ stat->type, i);
continue;
}
--
2.7.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH net-next v2 5/6] bnx2x: Replace WARN_ONCE with netdev_WARN_ONCE
2018-01-07 10:08 [PATCH net-next v2 0/6] Replace WARN_ONCE usages with netdev_WARN_ONCE Gal Pressman
` (3 preceding siblings ...)
2018-01-07 10:08 ` [PATCH net-next v2 4/6] e1000: " Gal Pressman
@ 2018-01-07 10:08 ` Gal Pressman
2018-01-09 2:40 ` Kalluru, Sudarsana
2018-01-07 10:08 ` [PATCH net-next v2 6/6] 8139cp: " Gal Pressman
2018-01-09 1:53 ` [PATCH net-next v2 0/6] Replace WARN_ONCE usages " David Miller
6 siblings, 1 reply; 12+ messages in thread
From: Gal Pressman @ 2018-01-07 10:08 UTC (permalink / raw)
To: David S. Miller
Cc: netdev, Tariq Toukan, Saeed Mahameed, Gal Pressman, Ariel Elior
Use the more appropriate netdev_WARN_ONCE instead of WARN_ONCE macro.
Signed-off-by: Gal Pressman <galp@mellanox.com>
Reviewed-by: Saeed Mahameed <saeedm@mellanox.com>
Cc: Ariel Elior <ariel.elior@cavium.com>
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
index 57eb26d..d7c98e8 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
@@ -738,8 +738,9 @@ static void bnx2x_gro_receive(struct bnx2x *bp, struct bnx2x_fastpath *fp,
bnx2x_gro_csum(bp, skb, bnx2x_gro_ipv6_csum);
break;
default:
- WARN_ONCE(1, "Error: FW GRO supports only IPv4/IPv6, not 0x%04x\n",
- be16_to_cpu(skb->protocol));
+ netdev_WARN_ONCE(bp->dev,
+ "Error: FW GRO supports only IPv4/IPv6, not 0x%04x\n",
+ be16_to_cpu(skb->protocol));
}
}
#endif
--
2.7.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH net-next v2 6/6] 8139cp: Replace WARN_ONCE with netdev_WARN_ONCE
2018-01-07 10:08 [PATCH net-next v2 0/6] Replace WARN_ONCE usages with netdev_WARN_ONCE Gal Pressman
` (4 preceding siblings ...)
2018-01-07 10:08 ` [PATCH net-next v2 5/6] bnx2x: " Gal Pressman
@ 2018-01-07 10:08 ` Gal Pressman
2018-01-09 1:53 ` [PATCH net-next v2 0/6] Replace WARN_ONCE usages " David Miller
6 siblings, 0 replies; 12+ messages in thread
From: Gal Pressman @ 2018-01-07 10:08 UTC (permalink / raw)
To: David S. Miller
Cc: netdev, Tariq Toukan, Saeed Mahameed, Gal Pressman,
Realtek linux nic maintainers
Use the more appropriate netdev_WARN_ONCE instead of WARN_ONCE macro.
Signed-off-by: Gal Pressman <galp@mellanox.com>
Reviewed-by: Saeed Mahameed <saeedm@mellanox.com>
Cc: Realtek linux nic maintainers <nic_swsd@realtek.com>
---
drivers/net/ethernet/realtek/8139cp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/realtek/8139cp.c b/drivers/net/ethernet/realtek/8139cp.c
index e7ab23e..81045df 100644
--- a/drivers/net/ethernet/realtek/8139cp.c
+++ b/drivers/net/ethernet/realtek/8139cp.c
@@ -748,8 +748,8 @@ static netdev_tx_t cp_start_xmit (struct sk_buff *skb,
mss = skb_shinfo(skb)->gso_size;
if (mss > MSSMask) {
- WARN_ONCE(1, "Net bug: GSO size %d too large for 8139CP\n",
- mss);
+ netdev_WARN_ONCE(dev, "Net bug: GSO size %d too large for 8139CP\n",
+ mss);
goto out_dma_error;
}
--
2.7.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH net-next v2 0/6] Replace WARN_ONCE usages with netdev_WARN_ONCE
2018-01-07 10:08 [PATCH net-next v2 0/6] Replace WARN_ONCE usages with netdev_WARN_ONCE Gal Pressman
` (5 preceding siblings ...)
2018-01-07 10:08 ` [PATCH net-next v2 6/6] 8139cp: " Gal Pressman
@ 2018-01-09 1:53 ` David Miller
6 siblings, 0 replies; 12+ messages in thread
From: David Miller @ 2018-01-09 1:53 UTC (permalink / raw)
To: galp; +Cc: netdev, tariqt, saeedm
From: Gal Pressman <galp@mellanox.com>
Date: Sun, 7 Jan 2018 12:08:34 +0200
> This series will fix an issue in netdev_WARN_ONCE, improve its formatting and
> replace drivers' usage of WARN_ONCE to netdev_WARN_ONCE.
>
> Driver specific patches were compilation tested, in addition, functional tested
> on Mellanox NIC.
>
> v1->v2:
> - Addressed commit message comments in patch #1
Series applied, thanks.
^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: [PATCH net-next v2 5/6] bnx2x: Replace WARN_ONCE with netdev_WARN_ONCE
2018-01-07 10:08 ` [PATCH net-next v2 5/6] bnx2x: " Gal Pressman
@ 2018-01-09 2:40 ` Kalluru, Sudarsana
0 siblings, 0 replies; 12+ messages in thread
From: Kalluru, Sudarsana @ 2018-01-09 2:40 UTC (permalink / raw)
To: Gal Pressman, David S. Miller
Cc: netdev, Tariq Toukan, Saeed Mahameed, Elior, Ariel
-----Original Message-----
From: netdev-owner@vger.kernel.org [mailto:netdev-owner@vger.kernel.org] On Behalf Of Gal Pressman
Sent: 07 January 2018 15:39
To: David S. Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org; Tariq Toukan <tariqt@mellanox.com>; Saeed Mahameed <saeedm@mellanox.com>; Gal Pressman <galp@mellanox.com>; Elior, Ariel <Ariel.Elior@cavium.com>
Subject: [PATCH net-next v2 5/6] bnx2x: Replace WARN_ONCE with netdev_WARN_ONCE
Use the more appropriate netdev_WARN_ONCE instead of WARN_ONCE macro.
Signed-off-by: Gal Pressman <galp@mellanox.com>
Reviewed-by: Saeed Mahameed <saeedm@mellanox.com>
Cc: Ariel Elior <ariel.elior@cavium.com>
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
index 57eb26d..d7c98e8 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
@@ -738,8 +738,9 @@ static void bnx2x_gro_receive(struct bnx2x *bp, struct bnx2x_fastpath *fp,
bnx2x_gro_csum(bp, skb, bnx2x_gro_ipv6_csum);
break;
default:
- WARN_ONCE(1, "Error: FW GRO supports only IPv4/IPv6, not 0x%04x\n",
- be16_to_cpu(skb->protocol));
+ netdev_WARN_ONCE(bp->dev,
+ "Error: FW GRO supports only IPv4/IPv6, not 0x%04x\n",
+ be16_to_cpu(skb->protocol));
}
}
#endif
--
2.7.4
Acked-by: Sudarsana Kalluru <Sudarsana.Kalluru@cavium.com>
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH net-next v2 1/6] net: Fix netdev_WARN_ONCE macro
2018-01-07 10:08 ` [PATCH net-next v2 1/6] net: Fix netdev_WARN_ONCE macro Gal Pressman
@ 2018-01-09 2:42 ` Joe Perches
2018-01-09 3:05 ` David Miller
0 siblings, 1 reply; 12+ messages in thread
From: Joe Perches @ 2018-01-09 2:42 UTC (permalink / raw)
To: Gal Pressman, David S. Miller; +Cc: netdev, Tariq Toukan, Saeed Mahameed
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 <galp@mellanox.com>
> Reviewed-by: Saeed Mahameed <saeedm@mellanox.com>
> ---
> 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 */
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH net-next v2 1/6] net: Fix netdev_WARN_ONCE macro
2018-01-09 2:42 ` Joe Perches
@ 2018-01-09 3:05 ` David Miller
2018-01-09 9:51 ` Gal Pressman
0 siblings, 1 reply; 12+ messages in thread
From: David Miller @ 2018-01-09 3:05 UTC (permalink / raw)
To: joe; +Cc: galp, netdev, tariqt, saeedm
From: Joe Perches <joe@perches.com>
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 <galp@mellanox.com>
>> Reviewed-by: Saeed Mahameed <saeedm@mellanox.com>
>> ---
>> 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.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH net-next v2 1/6] net: Fix netdev_WARN_ONCE macro
2018-01-09 3:05 ` David Miller
@ 2018-01-09 9:51 ` Gal Pressman
0 siblings, 0 replies; 12+ messages in thread
From: Gal Pressman @ 2018-01-09 9:51 UTC (permalink / raw)
To: David Miller, joe; +Cc: netdev, tariqt, saeedm
On 09-Jan-18 05:05, David Miller wrote:
> From: Joe Perches <joe@perches.com>
> 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 <galp@mellanox.com>
>>> Reviewed-by: Saeed Mahameed <saeedm@mellanox.com>
>>> ---
>>> 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?
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2018-01-09 9:51 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-07 10:08 [PATCH net-next v2 0/6] Replace WARN_ONCE usages with netdev_WARN_ONCE Gal Pressman
2018-01-07 10:08 ` [PATCH net-next v2 1/6] net: Fix netdev_WARN_ONCE macro Gal Pressman
2018-01-09 2:42 ` Joe Perches
2018-01-09 3:05 ` David Miller
2018-01-09 9:51 ` Gal Pressman
2018-01-07 10:08 ` [PATCH net-next v2 2/6] net: No line break on netdev_WARN* formatting Gal Pressman
2018-01-07 10:08 ` [PATCH net-next v2 3/6] net/mlx5e: Replace WARN_ONCE with netdev_WARN_ONCE Gal Pressman
2018-01-07 10:08 ` [PATCH net-next v2 4/6] e1000: " Gal Pressman
2018-01-07 10:08 ` [PATCH net-next v2 5/6] bnx2x: " Gal Pressman
2018-01-09 2:40 ` Kalluru, Sudarsana
2018-01-07 10:08 ` [PATCH net-next v2 6/6] 8139cp: " Gal Pressman
2018-01-09 1:53 ` [PATCH net-next v2 0/6] Replace WARN_ONCE usages " David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.