Skip to content

Commit

Permalink
Merge branch 'drivers-net-warning-clean'
Browse files Browse the repository at this point in the history
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 <jesse.brandeburg@intel.com>
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Saeed Mahameed <saeed@kernel.org>
  • Loading branch information
David S. Miller committed Sep 25, 2020
2 parents d018684 + d0ea5cb commit e666a4c
Show file tree
Hide file tree
Showing 130 changed files with 1,178 additions and 1,062 deletions.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/amazon/ena/ena_com.c
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ static int ena_com_wait_and_process_admin_cq_polling(struct ena_comp_ctx *comp_c
return ret;
}

/**
/*
* Set the LLQ configurations of the firmware
*
* The driver provides only the enabled feature values to the device,
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c
Original file line number Diff line number Diff line change
Expand Up @@ -1536,7 +1536,7 @@ static int hw_atl_b0_hw_fl2_clear(struct aq_hw_s *self,
return aq_hw_err_from_flags(self);
}

/**
/*
* @brief Set VLAN filter table
* @details Configure VLAN filter table to accept (and assign the queue) traffic
* for the particular vlan ids.
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/arc/emac_arc.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-or-later
/**
* emac_arc.c - ARC EMAC specific glue layer
* DOC: emac_arc.c - ARC EMAC specific glue layer
*
* Copyright (C) 2014 Romain Perier
*
Expand Down
6 changes: 5 additions & 1 deletion drivers/net/ethernet/atheros/atl1c/atl1c_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ static u32 atl1c_wait_until_idle(struct atl1c_hw *hw, u32 modu_ctrl)

/**
* atl1c_phy_config - Timer Call-back
* @data: pointer to netdev cast into an unsigned long
* @t: timer list containing pointer to netdev cast into an unsigned long
*/
static void atl1c_phy_config(struct timer_list *t)
{
Expand Down Expand Up @@ -346,6 +346,7 @@ static void atl1c_del_timer(struct atl1c_adapter *adapter)
/**
* atl1c_tx_timeout - Respond to a Tx Hang
* @netdev: network interface device structure
* @txqueue: index of hanging tx queue
*/
static void atl1c_tx_timeout(struct net_device *netdev, unsigned int txqueue)
{
Expand Down Expand Up @@ -846,6 +847,7 @@ static inline void atl1c_clean_buffer(struct pci_dev *pdev,
/**
* atl1c_clean_tx_ring - Free Tx-skb
* @adapter: board private structure
* @type: type of transmit queue
*/
static void atl1c_clean_tx_ring(struct atl1c_adapter *adapter,
enum atl1c_trans_queue type)
Expand Down Expand Up @@ -1861,6 +1863,8 @@ static void atl1c_clean_rx_irq(struct atl1c_adapter *adapter,

/**
* atl1c_clean - NAPI Rx polling callback
* @napi: napi info
* @budget: limit of packets to clean
*/
static int atl1c_clean(struct napi_struct *napi, int budget)
{
Expand Down
7 changes: 5 additions & 2 deletions drivers/net/ethernet/atheros/atl1e/atl1e_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ static inline void atl1e_irq_reset(struct atl1e_adapter *adapter)

/**
* atl1e_phy_config - Timer Call-back
* @data: pointer to netdev cast into an unsigned long
* @t: timer list containing pointer to netdev cast into an unsigned long
*/
static void atl1e_phy_config(struct timer_list *t)
{
Expand Down Expand Up @@ -196,7 +196,7 @@ static int atl1e_check_link(struct atl1e_adapter *adapter)

/**
* atl1e_link_chg_task - deal with link change event Out of interrupt context
* @netdev: network interface device structure
* @work: work struct with driver info
*/
static void atl1e_link_chg_task(struct work_struct *work)
{
Expand Down Expand Up @@ -246,6 +246,7 @@ static void atl1e_cancel_work(struct atl1e_adapter *adapter)
/**
* atl1e_tx_timeout - Respond to a Tx Hang
* @netdev: network interface device structure
* @txqueue: the index of the hanging queue
*/
static void atl1e_tx_timeout(struct net_device *netdev, unsigned int txqueue)
{
Expand Down Expand Up @@ -1502,6 +1503,8 @@ static void atl1e_clean_rx_irq(struct atl1e_adapter *adapter, u8 que,

/**
* atl1e_clean - NAPI Rx polling callback
* @napi: napi info
* @budget: number of packets to clean
*/
static int atl1e_clean(struct napi_struct *napi, int budget)
{
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/atheros/atlx/atl1.c
Original file line number Diff line number Diff line change
Expand Up @@ -2552,7 +2552,7 @@ static irqreturn_t atl1_intr(int irq, void *data)

/**
* atl1_phy_config - Timer Call-back
* @data: pointer to netdev cast into an unsigned long
* @t: timer_list containing pointer to netdev cast into an unsigned long
*/
static void atl1_phy_config(struct timer_list *t)
{
Expand Down
6 changes: 4 additions & 2 deletions drivers/net/ethernet/atheros/atlx/atl2.c
Original file line number Diff line number Diff line change
Expand Up @@ -994,6 +994,7 @@ static int atl2_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd)
/**
* atl2_tx_timeout - Respond to a Tx Hang
* @netdev: network interface device structure
* @txqueue: index of the hanging transmit queue
*/
static void atl2_tx_timeout(struct net_device *netdev, unsigned int txqueue)
{
Expand All @@ -1005,7 +1006,7 @@ static void atl2_tx_timeout(struct net_device *netdev, unsigned int txqueue)

/**
* atl2_watchdog - Timer Call-back
* @data: pointer to netdev cast into an unsigned long
* @t: timer list containing a pointer to netdev cast into an unsigned long
*/
static void atl2_watchdog(struct timer_list *t)
{
Expand All @@ -1030,7 +1031,7 @@ static void atl2_watchdog(struct timer_list *t)

/**
* atl2_phy_config - Timer Call-back
* @data: pointer to netdev cast into an unsigned long
* @t: timer list containing a pointer to netdev cast into an unsigned long
*/
static void atl2_phy_config(struct timer_list *t)
{
Expand Down Expand Up @@ -1235,6 +1236,7 @@ static int atl2_check_link(struct atl2_adapter *adapter)

/**
* atl2_link_chg_task - deal with link change event Out of interrupt context
* @work: pointer to work struct with private info
*/
static void atl2_link_chg_task(struct work_struct *work)
{
Expand Down
2 changes: 2 additions & 0 deletions drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,7 @@ static void bnx2x_tpa_start(struct bnx2x_fastpath *fp, u16 queue,
* @len_on_bd: total length of the first packet for the
* aggregation.
* @pkt_len: length of all segments
* @num_of_coalesced_segs: count of segments
*
* Approximate value of the MSS for this aggregation calculated using
* the first packet of it.
Expand Down Expand Up @@ -1958,6 +1959,7 @@ void bnx2x_set_num_queues(struct bnx2x *bp)
* bnx2x_set_real_num_queues - configure netdev->real_num_[tx,rx]_queues
*
* @bp: Driver handle
* @include_cnic: handle cnic case
*
* We currently support for at most 16 Tx queues for each CoS thus we will
* allocate a multiple of 16 for ETH L2 rings according to the value of the
Expand Down
6 changes: 4 additions & 2 deletions drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -839,8 +839,9 @@ static bool bnx2x_is_wreg_in_chip(struct bnx2x *bp,
/**
* bnx2x_read_pages_regs - read "paged" registers
*
* @bp device handle
* @p output buffer
* @bp: device handle
* @p: output buffer
* @preset: the preset value
*
* Reads "paged" memories: memories that may only be read by first writing to a
* specific address ("write address") and then reading from a specific address
Expand Down Expand Up @@ -3561,6 +3562,7 @@ static void bnx2x_get_channels(struct net_device *dev,
* bnx2x_change_num_queues - change the number of RSS queues.
*
* @bp: bnx2x private structure
* @num_rss: rss count
*
* Re-configure interrupt mode to get the new number of MSI-X
* vectors and re-add NAPI objects.
Expand Down
12 changes: 5 additions & 7 deletions drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3086,9 +3086,9 @@ void bnx2x_func_init(struct bnx2x *bp, struct bnx2x_func_init_params *p)
/**
* bnx2x_get_common_flags - Return common flags
*
* @bp device handle
* @fp queue handle
* @zero_stats TRUE if statistics zeroing is needed
* @bp: device handle
* @fp: queue handle
* @zero_stats: TRUE if statistics zeroing is needed
*
* Return the flags that are common for the Tx-only and not normal connections.
*/
Expand Down Expand Up @@ -13591,8 +13591,8 @@ static int bnx2x_set_qm_cid_count(struct bnx2x *bp)

/**
* bnx2x_get_num_none_def_sbs - return the number of none default SBs
*
* @dev: pci device
* @pdev: pci device
* @cnic_cnt: count
*
*/
static int bnx2x_get_num_non_def_sbs(struct pci_dev *pdev, int cnic_cnt)
Expand Down Expand Up @@ -14451,9 +14451,7 @@ module_exit(bnx2x_cleanup);

/**
* bnx2x_set_iscsi_eth_mac_addr - set iSCSI MAC(s).
*
* @bp: driver handle
* @set: set or clear the CAM entry
*
* This function will wait until the ramrod completion returns.
* Return 0 if success, -ENODEV if ramrod doesn't return.
Expand Down
Loading

0 comments on commit e666a4c

Please sign in to comment.