diff options
author | Arnd Bergmann <[email protected]> | 2023-02-17 10:56:39 +0100 |
---|---|---|
committer | David S. Miller <[email protected]> | 2023-02-20 10:49:30 +0000 |
commit | a59f832a71c938779b8abdb022d6d39903e635c3 (patch) | |
tree | 8c2bb62c8cf3091bfa4897119c88493a01ba2cde /lib/netdev-notifier-error-inject.c | |
parent | 8173c2f9a1a4a5afcf465a62bc8b616c1fef252d (diff) |
sfc: use IS_ENABLED() checks for CONFIG_SFC_SRIOV
One local variable has become unused after a recent change:
drivers/net/ethernet/sfc/ef100_nic.c: In function 'ef100_probe_netdev_pf':
drivers/net/ethernet/sfc/ef100_nic.c:1155:21: error: unused variable 'net_dev' [-Werror=unused-variable]
struct net_device *net_dev = efx->net_dev;
^~~~~~~
The variable is still used in an #ifdef. Replace the #ifdef with
an if(IS_ENABLED()) check that lets the compiler see where it is
used, rather than adding another #ifdef.
This also fixes an uninitialized return value in ef100_probe_netdev_pf()
that gcc did not spot.
Fixes: 7e056e2360d9 ("sfc: obtain device mac address based on firmware handle for ef100")
Signed-off-by: Arnd Bergmann <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'lib/netdev-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions