Skip to content

Commit e666a4c

Browse files
committed
Merge branch 'drivers-net-warning-clean'
Jesse Brandeburg says: ==================== make drivers/net/ethernet W=1 clean The Goal: move to W=1 being default for drivers/net/ethernet, and then use automation to catch more code issues (warnings) being introduced. The status: Getting much closer but not quite done for all architectures. After applying the patches below, the drivers/net/ethernet directory can be built as modules with W=1 with no warnings (so far on x64_64 arch only!). As Jakub pointed out, there is much more work to do to clean up C=1, but that will be another series of changes. This series removes 1,247 warnings and hopefully allows the ethernet directory to move forward from here without more warnings being added. There is only one objtool warning now. This version drops one of the Intel patches, as I couldn't reproduce the original issue to document the warning. Some of these patches are already sent and tested on Intel Wired Lan, but the rest of the series titled drivers/net/ethernet affects other drivers. The changes are all pretty straightforward. ==================== Signed-off-by: Jesse Brandeburg <[email protected]> Reviewed-by: Jakub Kicinski <[email protected]> Reviewed-by: Saeed Mahameed <[email protected]>
2 parents d018684 + d0ea5cb commit e666a4c

File tree

130 files changed

+1178
-1062
lines changed

Some content is hidden

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

130 files changed

+1178
-1062
lines changed

drivers/net/ethernet/amazon/ena/ena_com.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ static int ena_com_wait_and_process_admin_cq_polling(struct ena_comp_ctx *comp_c
579579
return ret;
580580
}
581581

582-
/**
582+
/*
583583
* Set the LLQ configurations of the firmware
584584
*
585585
* The driver provides only the enabled feature values to the device,

drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1536,7 +1536,7 @@ static int hw_atl_b0_hw_fl2_clear(struct aq_hw_s *self,
15361536
return aq_hw_err_from_flags(self);
15371537
}
15381538

1539-
/**
1539+
/*
15401540
* @brief Set VLAN filter table
15411541
* @details Configure VLAN filter table to accept (and assign the queue) traffic
15421542
* for the particular vlan ids.

drivers/net/ethernet/arc/emac_arc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// SPDX-License-Identifier: GPL-2.0-or-later
22
/**
3-
* emac_arc.c - ARC EMAC specific glue layer
3+
* DOC: emac_arc.c - ARC EMAC specific glue layer
44
*
55
* Copyright (C) 2014 Romain Perier
66
*

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)