diff options
author | Edward Cree <ecree@solarflare.com> | 2020-06-29 16:32:46 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-06-30 03:37:48 +0300 |
commit | 6d9b5dcd29a50cec8445c66fc8055476f8e2d057 (patch) | |
tree | 45930d5563b51a4e45efbd22b83328dd3cd20ab5 /drivers/net/ethernet/sfc/mcdi.h | |
parent | 0dc95084c30d6323f622f87f7d786f6e69ca118d (diff) | |
download | linux-6d9b5dcd29a50cec8445c66fc8055476f8e2d057.tar.xz |
sfc: determine flag word automatically in efx_has_cap()
Now that we have an _OFST definition for each individual flag bit,
callers of efx_has_cap() don't need to specify which flag word it's
in; we can just use the flag name directly in MCDI_CAPABILITY_OFST.
Signed-off-by: Edward Cree <ecree@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sfc/mcdi.h')
-rw-r--r-- | drivers/net/ethernet/sfc/mcdi.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/ethernet/sfc/mcdi.h b/drivers/net/ethernet/sfc/mcdi.h index b107e4c00285..db9746a751d4 100644 --- a/drivers/net/ethernet/sfc/mcdi.h +++ b/drivers/net/ethernet/sfc/mcdi.h @@ -332,10 +332,9 @@ void efx_mcdi_sensor_event(struct efx_nic *efx, efx_qword_t *ev); #define MCDI_CAPABILITY_OFST(field) \ MC_CMD_GET_CAPABILITIES_V4_OUT_ ## field ## _OFST -/* field is FLAGS1 or FLAGS2 */ -#define efx_has_cap(efx, flag, field) \ +#define efx_has_cap(efx, field) \ efx->type->check_caps(efx, \ - MCDI_CAPABILITY(flag), \ + MCDI_CAPABILITY(field), \ MCDI_CAPABILITY_OFST(field)) void efx_mcdi_print_fwver(struct efx_nic *efx, char *buf, size_t len); |