Skip to content

Commit

Permalink
net/mlxfw: Properly handle dependancy with non-loadable mlx5
Browse files Browse the repository at this point in the history
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: Or Gerlitz <ogerlitz@mellanox.com>
Reported-by: Jakub Kicinski <kubakici@wp.pl>
Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Or Gerlitz authored and David S. Miller committed Jul 3, 2017
1 parent b2c9c5d commit c1c1d86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/mellanox/mlxfw/mlxfw.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c1c1d86

Please sign in to comment.