Commit c1c1d86b authored by Or Gerlitz's avatar Or Gerlitz Committed by 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: default avatarOr Gerlitz <ogerlitz@mellanox.com>
Reported-by: default avatarJakub Kicinski <kubakici@wp.pl>
Reported-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b2c9c5df
......@@ -96,7 +96,7 @@ struct mlxfw_dev {
u16 psid_size;
};
#if IS_ENABLED(CONFIG_MLXFW)
#if IS_REACHABLE(CONFIG_MLXFW)
int mlxfw_firmware_flash(struct mlxfw_dev *mlxfw_dev,
const struct firmware *firmware);
#else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment