Arnd Bergmann a59f832a71 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 <arnd@arndb.de>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2023-02-20 10:49:30 +00:00
..
2023-02-02 20:48:23 -08:00
2023-02-06 22:33:18 -08:00
2023-02-10 17:51:27 -08:00
2023-02-02 20:48:23 -08:00
2023-02-10 17:51:27 -08:00
2023-02-06 10:03:26 +00:00
2023-02-20 10:47:34 +00:00
2023-02-10 17:51:27 -08:00
2023-02-02 20:48:23 -08:00
2022-10-18 19:33:51 -07:00