Skip to content

Commit b113cab

Browse files
arndbdavem330
authored andcommitted
sfc: avoid an unused-variable warning
'nic_data' is no longer used outside of the #ifdef block in efx_ef10_set_mac_address: drivers/net/ethernet/sfc/ef10.c:3231:28: error: unused variable 'nic_data' [-Werror,-Wunused-variable] struct efx_ef10_nic_data *nic_data = efx->nic_data; Move the variable into a local scope. Fixes: dfcabb0 ("sfc: move vport_id to struct efx_nic") Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 62c0278 commit b113cab

File tree

1 file changed

+1
-1
lines changed
  • drivers/net/ethernet/sfc

1 file changed

+1
-1
lines changed

drivers/net/ethernet/sfc/ef10.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3228,7 +3228,6 @@ static int efx_ef10_vport_set_mac_address(struct efx_nic *efx)
32283228
static int efx_ef10_set_mac_address(struct efx_nic *efx)
32293229
{
32303230
MCDI_DECLARE_BUF(inbuf, MC_CMD_VADAPTOR_SET_MAC_IN_LEN);
3231-
struct efx_ef10_nic_data *nic_data = efx->nic_data;
32323231
bool was_enabled = efx->port_enabled;
32333232
int rc;
32343233

@@ -3256,6 +3255,7 @@ static int efx_ef10_set_mac_address(struct efx_nic *efx)
32563255

32573256
#ifdef CONFIG_SFC_SRIOV
32583257
if (efx->pci_dev->is_virtfn && efx->pci_dev->physfn) {
3258+
struct efx_ef10_nic_data *nic_data = efx->nic_data;
32593259
struct pci_dev *pci_dev_pf = efx->pci_dev->physfn;
32603260

32613261
if (rc == -EPERM) {

0 commit comments

Comments
 (0)