diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2012-09-14 20:30:10 +0400 |
---|---|---|
committer | Ben Hutchings <bhutchings@solarflare.com> | 2013-08-21 19:35:21 +0400 |
commit | 59cfc479b2c8ba344c8497d5c913b6cba2ce3755 (patch) | |
tree | 77ed4c951751fee608d73ef9d0c081199ba77372 /drivers/net/ethernet/sfc/mcdi_mon.c | |
parent | ab0115fc7dc429300fc6b728ab04ee832fbb945d (diff) | |
download | linux-59cfc479b2c8ba344c8497d5c913b6cba2ce3755.tar.xz |
sfc: Introduce and use MCDI_DECLARE_BUF macro
MCDI_DECLARE_BUF declares a variable as an MCDI buffer of the
requested length, adding any necessary padding.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'drivers/net/ethernet/sfc/mcdi_mon.c')
-rw-r--r-- | drivers/net/ethernet/sfc/mcdi_mon.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/sfc/mcdi_mon.c b/drivers/net/ethernet/sfc/mcdi_mon.c index fe42c3bffd92..4e8a13854264 100644 --- a/drivers/net/ethernet/sfc/mcdi_mon.c +++ b/drivers/net/ethernet/sfc/mcdi_mon.c @@ -92,7 +92,7 @@ struct efx_mcdi_mon_attribute { static int efx_mcdi_mon_update(struct efx_nic *efx) { struct efx_mcdi_mon *hwmon = efx_mcdi_mon(efx); - u8 inbuf[MC_CMD_READ_SENSORS_IN_LEN]; + MCDI_DECLARE_BUF(inbuf, MC_CMD_READ_SENSORS_IN_LEN); int rc; MCDI_SET_DWORD(inbuf, READ_SENSORS_IN_DMA_ADDR_LO, @@ -236,7 +236,7 @@ int efx_mcdi_mon_probe(struct efx_nic *efx) { struct efx_mcdi_mon *hwmon = efx_mcdi_mon(efx); unsigned int n_attrs, n_temp = 0, n_cool = 0, n_in = 0; - u8 outbuf[MC_CMD_SENSOR_INFO_OUT_LENMAX]; + MCDI_DECLARE_BUF(outbuf, MC_CMD_SENSOR_INFO_OUT_LENMAX); size_t outlen; char name[12]; u32 mask; |