Skip to content

Commit d0ea5cb

Browse files
jbrandebdavem330
authored andcommitted
drivers/net/ethernet: clean up mis-targeted comments
As part of the W=1 cleanups for ethernet, a million [*] driver comments had to be cleaned up to get the W=1 compilation to succeed. This change finally makes the drivers/net/ethernet tree compile with W=1 set on the command line. NOTE: The kernel uses kdoc style (see Documentation/process/kernel-doc.rst) when documenting code, not doxygen or other styles. After this patch the x86_64 build has no warnings from W=1, however scripts/kernel-doc says there are 1545 more warnings in source files, that I need to develop a script to fix in a followup patch. The errors fixed here are all kdoc of a few classes, with a few outliers: In file included from drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c:10: drivers/net/ethernet/qlogic/netxen/netxen_nic.h:1193:18: warning: ‘FW_DUMP_LEVELS’ defined but not used [-Wunused-const-variable=] 1193 | static const u32 FW_DUMP_LEVELS[] = { 0x3, 0x7, 0xf, 0x1f, 0x3f, 0x7f, 0xff }; | ^~~~~~~~~~~~~~ ... repeats 4 times... drivers/net/ethernet/sun/cassini.c:2084:24: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body] 2084 | RX_USED_ADD(page, i); drivers/net/ethernet/natsemi/ns83820.c: In function ‘phy_intr’: drivers/net/ethernet/natsemi/ns83820.c:603:6: warning: variable ‘tbisr’ set but not used [-Wunused-but-set-variable] 603 | u32 tbisr, tanar, tanlpar; | ^~~~~ drivers/net/ethernet/natsemi/ns83820.c: In function ‘ns83820_get_link_ksettings’: drivers/net/ethernet/natsemi/ns83820.c:1207:11: warning: variable ‘tanar’ set but not used [-Wunused-but-set-variable] 1207 | u32 cfg, tanar, tbicr; | ^~~~~ drivers/net/ethernet/packetengines/yellowfin.c:1063:18: warning: variable ‘yf_size’ set but not used [-Wunused-but-set-variable] 1063 | int data_size, yf_size; | ^~~~~~~ Normal kdoc fixes: warning: Function parameter or member 'x' not described in 'y' warning: Excess function parameter 'x' description in 'y' warning: Cannot understand <string> on line <NNN> - I thought it was a doc line [*] - ok it wasn't quite a million, but it felt like it. Signed-off-by: Jesse Brandeburg <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent add3c86 commit d0ea5cb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+794
-682
lines changed

drivers/net/ethernet/atheros/atl1c/atl1c_main.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ static u32 atl1c_wait_until_idle(struct atl1c_hw *hw, u32 modu_ctrl)
204204

205205
/**
206206
* atl1c_phy_config - Timer Call-back
207-
* @data: pointer to netdev cast into an unsigned long
207+
* @t: timer list containing pointer to netdev cast into an unsigned long
208208
*/
209209
static void atl1c_phy_config(struct timer_list *t)
210210
{
@@ -346,6 +346,7 @@ static void atl1c_del_timer(struct atl1c_adapter *adapter)
346346
/**
347347
* atl1c_tx_timeout - Respond to a Tx Hang
348348
* @netdev: network interface device structure
349+
* @txqueue: index of hanging tx queue
349350
*/
350351
static void atl1c_tx_timeout(struct net_device *netdev, unsigned int txqueue)
351352
{
@@ -846,6 +847,7 @@ static inline void atl1c_clean_buffer(struct pci_dev *pdev,
846847
/**
847848
* atl1c_clean_tx_ring - Free Tx-skb
848849
* @adapter: board private structure
850+
* @type: type of transmit queue
849851
*/
850852
static void atl1c_clean_tx_ring(struct atl1c_adapter *adapter,
851853
enum atl1c_trans_queue type)
@@ -1861,6 +1863,8 @@ static void atl1c_clean_rx_irq(struct atl1c_adapter *adapter,
18611863

18621864
/**
18631865
* atl1c_clean - NAPI Rx polling callback
1866+
* @napi: napi info
1867+
* @budget: limit of packets to clean
18641868
*/
18651869
static int atl1c_clean(struct napi_struct *napi, int budget)
18661870
{

drivers/net/ethernet/atheros/atl1e/atl1e_main.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ static inline void atl1e_irq_reset(struct atl1e_adapter *adapter)
111111

112112
/**
113113
* atl1e_phy_config - Timer Call-back
114-
* @data: pointer to netdev cast into an unsigned long
114+
* @t: timer list containing pointer to netdev cast into an unsigned long
115115
*/
116116
static void atl1e_phy_config(struct timer_list *t)
117117
{
@@ -196,7 +196,7 @@ static int atl1e_check_link(struct atl1e_adapter *adapter)
196196

197197
/**
198198
* atl1e_link_chg_task - deal with link change event Out of interrupt context
199-
* @netdev: network interface device structure
199+
* @work: work struct with driver info
200200
*/
201201
static void atl1e_link_chg_task(struct work_struct *work)
202202
{
@@ -246,6 +246,7 @@ static void atl1e_cancel_work(struct atl1e_adapter *adapter)
246246
/**
247247
* atl1e_tx_timeout - Respond to a Tx Hang
248248
* @netdev: network interface device structure
249+
* @txqueue: the index of the hanging queue
249250
*/
250251
static void atl1e_tx_timeout(struct net_device *netdev, unsigned int txqueue)
251252
{
@@ -1502,6 +1503,8 @@ static void atl1e_clean_rx_irq(struct atl1e_adapter *adapter, u8 que,
15021503

15031504
/**
15041505
* atl1e_clean - NAPI Rx polling callback
1506+
* @napi: napi info
1507+
* @budget: number of packets to clean
15051508
*/
15061509
static int atl1e_clean(struct napi_struct *napi, int budget)
15071510
{

drivers/net/ethernet/atheros/atlx/atl1.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2552,7 +2552,7 @@ static irqreturn_t atl1_intr(int irq, void *data)
25522552

25532553
/**
25542554
* atl1_phy_config - Timer Call-back
2555-
* @data: pointer to netdev cast into an unsigned long
2555+
* @t: timer_list containing pointer to netdev cast into an unsigned long
25562556
*/
25572557
static void atl1_phy_config(struct timer_list *t)
25582558
{

drivers/net/ethernet/atheros/atlx/atl2.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -994,6 +994,7 @@ static int atl2_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd)
994994
/**
995995
* atl2_tx_timeout - Respond to a Tx Hang
996996
* @netdev: network interface device structure
997+
* @txqueue: index of the hanging transmit queue
997998
*/
998999
static void atl2_tx_timeout(struct net_device *netdev, unsigned int txqueue)
9991000
{
@@ -1005,7 +1006,7 @@ static void atl2_tx_timeout(struct net_device *netdev, unsigned int txqueue)
10051006

10061007
/**
10071008
* atl2_watchdog - Timer Call-back
1008-
* @data: pointer to netdev cast into an unsigned long
1009+
* @t: timer list containing a pointer to netdev cast into an unsigned long
10091010
*/
10101011
static void atl2_watchdog(struct timer_list *t)
10111012
{
@@ -1030,7 +1031,7 @@ static void atl2_watchdog(struct timer_list *t)
10301031

10311032
/**
10321033
* atl2_phy_config - Timer Call-back
1033-
* @data: pointer to netdev cast into an unsigned long
1034+
* @t: timer list containing a pointer to netdev cast into an unsigned long
10341035
*/
10351036
static void atl2_phy_config(struct timer_list *t)
10361037
{
@@ -1235,6 +1236,7 @@ static int atl2_check_link(struct atl2_adapter *adapter)
12351236

12361237
/**
12371238
* atl2_link_chg_task - deal with link change event Out of interrupt context
1239+
* @work: pointer to work struct with private info
12381240
*/
12391241
static void atl2_link_chg_task(struct work_struct *work)
12401242
{

drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,7 @@ static void bnx2x_tpa_start(struct bnx2x_fastpath *fp, u16 queue,
504504
* @len_on_bd: total length of the first packet for the
505505
* aggregation.
506506
* @pkt_len: length of all segments
507+
* @num_of_coalesced_segs: count of segments
507508
*
508509
* Approximate value of the MSS for this aggregation calculated using
509510
* the first packet of it.
@@ -1958,6 +1959,7 @@ void bnx2x_set_num_queues(struct bnx2x *bp)
19581959
* bnx2x_set_real_num_queues - configure netdev->real_num_[tx,rx]_queues
19591960
*
19601961
* @bp: Driver handle
1962+
* @include_cnic: handle cnic case
19611963
*
19621964
* We currently support for at most 16 Tx queues for each CoS thus we will
19631965
* allocate a multiple of 16 for ETH L2 rings according to the value of the

drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -839,8 +839,9 @@ static bool bnx2x_is_wreg_in_chip(struct bnx2x *bp,
839839
/**
840840
* bnx2x_read_pages_regs - read "paged" registers
841841
*
842-
* @bp device handle
843-
* @p output buffer
842+
* @bp: device handle
843+
* @p: output buffer
844+
* @preset: the preset value
844845
*
845846
* Reads "paged" memories: memories that may only be read by first writing to a
846847
* specific address ("write address") and then reading from a specific address
@@ -3561,6 +3562,7 @@ static void bnx2x_get_channels(struct net_device *dev,
35613562
* bnx2x_change_num_queues - change the number of RSS queues.
35623563
*
35633564
* @bp: bnx2x private structure
3565+
* @num_rss: rss count
35643566
*
35653567
* Re-configure interrupt mode to get the new number of MSI-X
35663568
* vectors and re-add NAPI objects.

drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3086,9 +3086,9 @@ void bnx2x_func_init(struct bnx2x *bp, struct bnx2x_func_init_params *p)
30863086
/**
30873087
* bnx2x_get_common_flags - Return common flags
30883088
*
3089-
* @bp device handle
3090-
* @fp queue handle
3091-
* @zero_stats TRUE if statistics zeroing is needed
3089+
* @bp: device handle
3090+
* @fp: queue handle
3091+
* @zero_stats: TRUE if statistics zeroing is needed
30923092
*
30933093
* Return the flags that are common for the Tx-only and not normal connections.
30943094
*/
@@ -13591,8 +13591,8 @@ static int bnx2x_set_qm_cid_count(struct bnx2x *bp)
1359113591

1359213592
/**
1359313593
* bnx2x_get_num_none_def_sbs - return the number of none default SBs
13594-
*
13595-
* @dev: pci device
13594+
* @pdev: pci device
13595+
* @cnic_cnt: count
1359613596
*
1359713597
*/
1359813598
static int bnx2x_get_num_non_def_sbs(struct pci_dev *pdev, int cnic_cnt)
@@ -14451,9 +14451,7 @@ module_exit(bnx2x_cleanup);
1445114451

1445214452
/**
1445314453
* bnx2x_set_iscsi_eth_mac_addr - set iSCSI MAC(s).
14454-
*
1445514454
* @bp: driver handle
14456-
* @set: set or clear the CAM entry
1445714455
*
1445814456
* This function will wait until the ramrod completion returns.
1445914457
* Return 0 if success, -ENODEV if ramrod doesn't return.

0 commit comments

Comments
 (0)