Merge branch 'net-netdev_WARN_ONCE'
Gal Pressman says: ==================== Replace WARN_ONCE usages with netdev_WARN_ONCE 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 ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Коммит
f1f2b7c325
|
@ -738,7 +738,8 @@ 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",
|
||||
netdev_WARN_ONCE(bp->dev,
|
||||
"Error: FW GRO supports only IPv4/IPv6, not 0x%04x\n",
|
||||
be16_to_cpu(skb->protocol));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1838,7 +1838,7 @@ 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",
|
||||
netdev_WARN_ONCE(netdev, "Invalid E1000 stat type: %u index %d\n",
|
||||
stat->type, i);
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -748,7 +748,7 @@ 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",
|
||||
netdev_WARN_ONCE(dev, "Net bug: GSO size %d too large for 8139CP\n",
|
||||
mss);
|
||||
goto out_dma_error;
|
||||
}
|
||||
|
|
|
@ -4406,11 +4406,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, 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: " format, netdev_name(dev), \
|
||||
netdev_reg_state(dev), ##args)
|
||||
|
||||
/* netif printk helpers, similar to netdev_printk */
|
||||
|
|
Загрузка…
Ссылка в новой задаче