Skip to content

Commit add3c86

Browse files
jbrandebdavem330
authored andcommitted
sfc: fix kdoc warning
kernel-doc script as used by W=1, is confused by the macro usage inside the header describing the efx_ptp_data struct. drivers/net/ethernet/sfc/ptp.c:345: warning: Function parameter or member 'MC_CMD_PTP_IN_TRANSMIT_LENMAX' not described in 'efx_ptp_data' After some discussion on the list, break this patch out to a separate one, and fix the issue through a creative macro declaration. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Acked-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 81929a4 commit add3c86

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

drivers/net/ethernet/sfc/mcdi.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ void efx_mcdi_sensor_event(struct efx_nic *efx, efx_qword_t *ev);
190190
* 32-bit-aligned. Also, on Siena we must copy to the MC shared
191191
* memory strictly 32 bits at a time, so add any necessary padding.
192192
*/
193+
#define MCDI_TX_BUF_LEN(_len) DIV_ROUND_UP((_len), 4)
193194
#define _MCDI_DECLARE_BUF(_name, _len) \
194195
efx_dword_t _name[DIV_ROUND_UP(_len, 4)]
195196
#define MCDI_DECLARE_BUF(_name, _len) \

drivers/net/ethernet/sfc/ptp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ struct efx_ptp_data {
326326
struct work_struct pps_work;
327327
struct workqueue_struct *pps_workwq;
328328
bool nic_ts_enabled;
329-
_MCDI_DECLARE_BUF(txbuf, MC_CMD_PTP_IN_TRANSMIT_LENMAX);
329+
efx_dword_t txbuf[MCDI_TX_BUF_LEN(MC_CMD_PTP_IN_TRANSMIT_LENMAX)];
330330

331331
unsigned int good_syncs;
332332
unsigned int fast_syncs;

0 commit comments

Comments
 (0)