提交 0d9fdaa9 编写于 作者: O Or Gerlitz 提交者: David S. Miller

net/mlx4_en: fix sparse warning on a cast which truncates bits from constant value

the MLX4_EN_WOL_DO_MODIFY flag which is defined through enum targets
bit 63, this triggers a "cast truncate bits from constant value
(8000000000000000 becomes 0)" warning from sparse, fix that by using
define instead of enum.
Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 1202d460
...@@ -485,9 +485,9 @@ struct mlx4_en_priv { ...@@ -485,9 +485,9 @@ struct mlx4_en_priv {
enum mlx4_en_wol { enum mlx4_en_wol {
MLX4_EN_WOL_MAGIC = (1ULL << 61), MLX4_EN_WOL_MAGIC = (1ULL << 61),
MLX4_EN_WOL_ENABLED = (1ULL << 62), MLX4_EN_WOL_ENABLED = (1ULL << 62),
MLX4_EN_WOL_DO_MODIFY = (1ULL << 63),
}; };
#define MLX4_EN_WOL_DO_MODIFY (1ULL << 63)
void mlx4_en_destroy_netdev(struct net_device *dev); void mlx4_en_destroy_netdev(struct net_device *dev);
int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port, int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册