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

net/mlxfw: Properly handle dependancy with non-loadable mlx5

If mlx5 is set to be built-in and mlxfw as a module, we
get a link error:

drivers/built-in.o: In function `mlx5_firmware_flash':
(.text+0x5aed72): undefined reference to `mlxfw_firmware_flash'

Since we don't want to mandate selecting mlxfw for mlx5 users, we
use the IS_REACHABLE macro to make sure that a stub is exposed
to the caller.
Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
Reported-by: NJakub Kicinski <kubakici@wp.pl>
Reported-by: NArnd Bergmann <arnd@arndb.de>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 b2c9c5df
...@@ -96,7 +96,7 @@ struct mlxfw_dev { ...@@ -96,7 +96,7 @@ struct mlxfw_dev {
u16 psid_size; u16 psid_size;
}; };
#if IS_ENABLED(CONFIG_MLXFW) #if IS_REACHABLE(CONFIG_MLXFW)
int mlxfw_firmware_flash(struct mlxfw_dev *mlxfw_dev, int mlxfw_firmware_flash(struct mlxfw_dev *mlxfw_dev,
const struct firmware *firmware); const struct firmware *firmware);
#else #else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册