]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlxfw: Properly handle dependancy with non-loadable mlx5
authorOr Gerlitz <ogerlitz@mellanox.com>
Sun, 2 Jul 2017 15:57:28 +0000 (18:57 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 3 Jul 2017 09:32:25 +0000 (02:32 -0700)
commit7d0cd940cea2392082fde32faa37f11ee5c29da1
tree56a9380a4706785318e12b1ea4e3150ca89e90cd
parent2d94b79ea9976b63326b201539de18481b180e8e
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: 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>
drivers/net/ethernet/mellanox/mlxfw/mlxfw.h