intel-ethernet: make W=1 build cleanly
Subsystems (2)
PATCH v2 1/1 intel-ethernet: make W=1 build cleanly
This takes care of all of the trivial W=1 fixes in the Intel Ethernet drivers, which allows developers and maintainers to build more of the networking tree with more complete warning checks.
Almost all of the changes were trivial comment updates on function headers, but some of the changes were for variables that were storing a return value from a register read, where the return value wasn't used. Those conversions to remove the lvalue of the assignment should be safe because the readl memory mapped reads are marked volatile and should not be optimized out without an lvalue (I suspect a very long time ago this wasn't guaranteed as it is today).
Inspired by Lee Jones' series of wireless work to do the same. Compile tested only.
---
v2: pointed at net-next instead
drivers/net/ethernet/intel/e100.c | 8 +- drivers/net/ethernet/intel/e1000/e1000_hw.c | 147 ++++++++---------- drivers/net/ethernet/intel/e1000/e1000_main.c | 39 +++-- .../net/ethernet/intel/e1000e/80003es2lan.c | 1 - drivers/net/ethernet/intel/e1000e/ich8lan.c | 16 +- drivers/net/ethernet/intel/e1000e/netdev.c | 50 ++++-- drivers/net/ethernet/intel/e1000e/phy.c | 3 + drivers/net/ethernet/intel/e1000e/ptp.c | 2 +- drivers/net/ethernet/intel/igb/e1000_82575.c | 6 +- drivers/net/ethernet/intel/igb/e1000_i210.c | 5 +- drivers/net/ethernet/intel/igb/e1000_mac.c | 1 + drivers/net/ethernet/intel/igb/e1000_mbx.c | 1 + drivers/net/ethernet/intel/igb/igb_main.c | 28 ++-- drivers/net/ethernet/intel/igb/igb_ptp.c | 8 +- drivers/net/ethernet/intel/igbvf/netdev.c | 17 +- drivers/net/ethernet/intel/igc/igc_main.c | 2 +- drivers/net/ethernet/intel/igc/igc_ptp.c | 4 +- drivers/net/ethernet/intel/ixgb/ixgb_hw.c | 135 ++++++++-------- drivers/net/ethernet/intel/ixgb/ixgb_main.c | 17 +- .../net/ethernet/intel/ixgbevf/ixgbevf_main.c | 3 +- 20 files changed, 265 insertions(+), 228 deletions(-)
drivers/net/ethernet/intel/e100.c +4 -4
@@ -384,7 +384,7 @@ enum cb_status { cb_ok = 0x2000, }; -/** +/* * cb_command - Command Block flags * @cb_tx_nc: 0: controller does CRC (normal), 1: CRC from skb memory */
@@ -2599,7 +2599,7 @@ static void e100_diag_test(struct net_device *netdev, {struct ethtool_cmd cmd;struct nic *nic =netdev_priv (netdev); -int i, err; +int i;memset (data,0 ,E100_TEST_LEN *sizeof (u64)); data[0 ] = !mii_link_ok (&nic->mii);
@@ -2607,7 +2607,7 @@ static void e100_diag_test(struct net_device *netdev,if (test->flags Ð_TEST_FL_OFFLINE ) {/* save speed, duplex & autoneg settings */ - err =mii_ethtool_gset (&nic->mii, &cmd); +mii_ethtool_gset (&nic->mii, &cmd);if (netif_running (netdev))e100_down (nic);
@@ -2616,7 +2616,7 @@ static void e100_diag_test(struct net_device *netdev, data[4 ] =e100_loopback_test (nic, lb_phy);/* restore speed, duplex & autoneg settings */ - err =mii_ethtool_sset (&nic->mii, &cmd); +mii_ethtool_sset (&nic->mii, &cmd);if (netif_running (netdev))e100_up (nic);
drivers/net/ethernet/intel/e1000/e1000_hw.c +67 -80
223 lines not on this page · raw message
drivers/net/ethernet/intel/e1000/e1000_main.c +25 -14
@@ -199,8 +199,10 @@ module_param(debug, int, 0);MODULE_PARM_DESC (debug,"Debug level (0=none,...,16=all)" );/** -* e1000_get_hw_dev - return device -* used by hardware layer to print debugging information +* e1000_get_hw_dev - helper function for getting netdev +* @hw: pointer to hw struct +* +* return device used by hardware layer to print debugging information * **/ struct net_device *e1000_get_hw_dev (struct e1000_hw *hw)
@@ -354,7 +356,7 @@ static void e1000_release_manageability(struct e1000_adapter *adapter)/** * e1000_configure - configure the hardware for RX and TX -* @adapter = private board structure +* @adapter: private board structure **/ static void e1000_configure (struct e1000_adapter *adapter) {
@@ -3489,8 +3491,9 @@ static void e1000_dump(struct e1000_adapter *adapter)/** * e1000_tx_timeout - Respond to a Tx Hang * @netdev: network interface device structure +* @txqueue: number of the tx queue that hung (unused) **/ -static void e1000_tx_timeout (struct net_device *netdev,unsigned int txqueue) +static void e1000_tx_timeout (struct net_device *netdev,unsigned int __always_unused txqueue) {struct e1000_adapter *adapter =netdev_priv (netdev);
@@ -3787,7 +3790,8 @@ static irqreturn_t e1000_intr(int irq, void *data)/** * e1000_clean - NAPI Rx polling callback -* @adapter: board private structure +* @napi: napi struct containing references to driver info +* @budget: budget given to driver for receive packets **/ static int e1000_clean (struct napi_struct *napi,int budget) {
@@ -3818,6 +3822,7 @@ static int e1000_clean(struct napi_struct *napi, int budget)/** * e1000_clean_tx_irq - Reclaim resources after transmit completes * @adapter: board private structure +* @tx_ring: ring to clean **/ static bool e1000_clean_tx_irq (struct e1000_adapter *adapter,struct e1000_tx_ring *tx_ring)
@@ -3933,7 +3938,7 @@ static bool e1000_clean_tx_irq(struct e1000_adapter *adapter,* @adapter: board private structure * @status_err: receive descriptor status and error fields * @csum: receive descriptor csum field -* @sk_buff: socket buffer with received data +* @skb: socket buffer with received data **/ static void e1000_rx_checksum (struct e1000_adapter *adapter,u32 status_err,u32 csum,struct sk_buff *skb)
@@ -3970,6 +3975,9 @@ static void e1000_rx_checksum(struct e1000_adapter *adapter, u32 status_err,/** * e1000_consume_page - helper function for jumbo Rx path +* @bi: software descriptor shadow data +* @skb: skb being modified +* @length: length of data being added **/ static void e1000_consume_page (struct e1000_rx_buffer *bi,struct sk_buff *skb,u16 length)
@@ -4003,6 +4011,7 @@ static void e1000_receive_skb(struct e1000_adapter *adapter, u8 status,/** * e1000_tbi_adjust_stats * @hw: Struct containing variables accessed by shared code +* @stats: point to stats struct * @frame_len: The length of the frame in question * @mac_addr: The Ethernet destination address of the frame in question *
@@ -4548,6 +4557,8 @@ e1000_alloc_jumbo_rx_buffers(struct e1000_adapter *adapter,/** * e1000_alloc_rx_buffers - Replace used receive buffers; legacy & extended * @adapter: address of board private structure +* @rx_ring: pointer to ring struct +* @cleaned_count: number of new rx buffers to try to allocate **/ static void e1000_alloc_rx_buffers(struct e1000_adapter *adapter, struct e1000_rx_ring *rx_ring,
@@ -4662,7 +4673,7 @@ static void e1000_alloc_rx_buffers(struct e1000_adapter *adapter,/** * e1000_smartspeed - Workaround for SmartSpeed on 82541 and 82547 controllers. -* @adapter: +* @adapter: address of board private structure **/ static void e1000_smartspeed (struct e1000_adapter *adapter) {
@@ -4718,10 +4729,10 @@ static void e1000_smartspeed(struct e1000_adapter *adapter) }/** -* e1000_ioctl - -* @netdev: -* @ifreq: -* @cmd: +* e1000_ioctl - handle ioctl calls +* @netdev: pointer to our netdev +* @ifr: pointer to interface request structure +* @cmd: ioctl data **/ static int e1000_ioctl (struct net_device *netdev,struct ifreq *ifr,int cmd) {
@@ -4737,9 +4748,9 @@ static int e1000_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd)/** * e1000_mii_ioctl - -* @netdev: -* @ifreq: -* @cmd: +* @netdev: pointer to our netdev +* @ifr: pointer to interface request structure +* @cmd: ioctl data **/ static int e1000_mii_ioctl (struct net_device *netdev,struct ifreq *ifr,int cmd)
drivers/net/ethernet/intel/e1000e/80003es2lan.c +0 -1
@@ -1072,7 +1072,6 @@ static s32 e1000_setup_copper_link_80003es2lan(struct e1000_hw *hw)/** * e1000_cfg_on_link_up_80003es2lan - es2 link configuration after link-up * @hw: pointer to the HW structure -* @duplex: current duplex setting * * Configure the KMRN interface by applying last minute quirks for * 10/100 operation.
drivers/net/ethernet/intel/e1000e/ich8lan.c +10 -6
@@ -746,7 +746,7 @@ static s32 e1000_init_mac_params_ich8lan(struct e1000_hw *hw)/** * __e1000_access_emi_reg_locked - Read/write EMI register * @hw: pointer to the HW structure -* @addr: EMI address to program +* @address: EMI address to program * @data: pointer to value to read/write from/to the EMI address * @read: boolean flag to indicate read or write *
@@ -2271,7 +2271,7 @@ static s32 e1000_k1_gig_workaround_hv(struct e1000_hw *hw, bool link)/** * e1000_configure_k1_ich8lan - Configure K1 power state * @hw: pointer to the HW structure -* @enable: K1 state to configure +* @k1_enable: K1 state to configure * * Configure the K1 power state based on the provided parameter. * Assumes semaphore already acquired.
@@ -2410,8 +2410,10 @@ static s32 e1000_set_mdio_slow_mode_hv(struct e1000_hw *hw) }/** -* e1000_hv_phy_workarounds_ich8lan - A series of Phy workarounds to be -* done after every PHY reset. +* e1000_hv_phy_workarounds_ich8lan - apply phy workarounds +* @hw: pointer to the HW structure +* +* A series of Phy workarounds to be done after every PHY reset. **/ static s32 e1000_hv_phy_workarounds_ich8lan (struct e1000_hw *hw) {
@@ -2699,8 +2701,10 @@ s32 e1000_lv_jumbo_workaround_ich8lan(struct e1000_hw *hw, bool enable) }/** -* e1000_lv_phy_workarounds_ich8lan - A series of Phy workarounds to be -* done after every PHY reset. +* e1000_lv_phy_workarounds_ich8lan - apply ich8 specific workarounds +* @hw: pointer to the HW structure +* +* A series of Phy workarounds to be done after every PHY reset. **/ static s32 e1000_lv_phy_workarounds_ich8lan (struct e1000_hw *hw) {
drivers/net/ethernet/intel/e1000e/netdev.c +37 -13
229 lines not on this page · raw message
drivers/net/ethernet/intel/e1000e/phy.c +3 -0
@@ -2311,6 +2311,7 @@ s32 e1000e_determine_phy_address(struct e1000_hw *hw)/** * e1000_get_phy_addr_for_bm_page - Retrieve PHY page address * @page: page to access +* @reg: register to check * * Returns the phy address for the page requested. **/
@@ -2728,6 +2729,7 @@ void e1000_power_down_phy_copper(struct e1000_hw *hw)* @offset: register offset to be read * @data: pointer to the read data * @locked: semaphore has already been acquired or not +* @page_set: BM_WUC_PAGE already set and access enabled * * Acquires semaphore, if necessary, then reads the PHY register at offset * and stores the retrieved information in data. Release any acquired
@@ -2836,6 +2838,7 @@ s32 e1000_read_phy_reg_page_hv(struct e1000_hw *hw, u32 offset, u16 *data)* @offset: register offset to write to * @data: data to write at register offset * @locked: semaphore has already been acquired or not +* @page_set: BM_WUC_PAGE already set and access enabled * * Acquires semaphore, if necessary, then writes the data to PHY register * at the offset. Release any acquired semaphores before exiting.
drivers/net/ethernet/intel/e1000e/ptp.c +1 -1
@@ -144,7 +144,7 @@ static int e1000e_phc_get_syncdevicetime(ktime_t *device,/** * e1000e_phc_getsynctime - Reads the current system/device cross timestamp * @ptp: ptp clock structure -* @cts: structure containing timestamp +* @xtstamp: structure containing timestamp * * Read device and system (ART) clock simultaneously and return the scaled * clock values in ns.
drivers/net/ethernet/intel/igb/e1000_82575.c +3 -3
@@ -2554,7 +2554,7 @@ static s32 igb_update_nvm_checksum_i350(struct e1000_hw *hw)/** * __igb_access_emi_reg - Read/write EMI register * @hw: pointer to the HW structure -* @addr: EMI address to program +* @address: EMI address to program * @data: pointer to value to read/write from/to the EMI address * @read: boolean flag to indicate read or write **/
@@ -2590,7 +2590,7 @@ s32 igb_read_emi_reg(struct e1000_hw *hw, u16 addr, u16 *data)* igb_set_eee_i350 - Enable/disable EEE support * @hw: pointer to the HW structure * @adv1G: boolean flag enabling 1G EEE advertisement -* @adv100m: boolean flag enabling 100M EEE advertisement +* @adv100M: boolean flag enabling 100M EEE advertisement * * Enable/disable EEE based on setting in dev_spec structure. *
@@ -2646,7 +2646,7 @@ s32 igb_set_eee_i350(struct e1000_hw *hw, bool adv1G, bool adv100M)* igb_set_eee_i354 - Enable/disable EEE support * @hw: pointer to the HW structure * @adv1G: boolean flag enabling 1G EEE advertisement -* @adv100m: boolean flag enabling 100M EEE advertisement +* @adv100M: boolean flag enabling 100M EEE advertisement * * Enable/disable EEE legacy mode based on setting in dev_spec structure. *
drivers/net/ethernet/intel/igb/e1000_i210.c +3 -2
@@ -357,13 +357,14 @@ static s32 igb_read_invm_word_i210(struct e1000_hw *hw, u8 address, u16 *data)/** * igb_read_invm_i210 - Read invm wrapper function for I210/I211 * @hw: pointer to the HW structure -* @words: number of words to read +* @offset: offset to read from +* @words: number of words to read (unused) * @data: pointer to the data read * * Wrapper function to return data formerly found in the NVM. **/ static s32 igb_read_invm_i210 (struct e1000_hw *hw,u16 offset, -u16 words__always_unused ,u16 *data) +u16 __always_unused words,u16 *data) {s32 ret_val =0 ;
drivers/net/ethernet/intel/igb/e1000_mac.c +1 -0
@@ -166,6 +166,7 @@ static s32 igb_find_vlvf_slot(struct e1000_hw *hw, u32 vlan, bool vlvf_bypass)* @vlan: VLAN id to add or remove * @vind: VMDq output index that maps queue to VLAN id * @vlan_on: if true add filter, if false remove +* @vlvf_bypass: skip VLVF if no match is found * * Sets or clears a bit in the VLAN filter table array based on VLAN id * and if we are adding or removing the filter
drivers/net/ethernet/intel/igb/e1000_mbx.c +1 -0
@@ -9,6 +9,7 @@* @msg: The message buffer * @size: Length of buffer * @mbx_id: id of mailbox to read +* @unlock: skip locking or not * * returns SUCCESS if it successfully read message from buffer **/
drivers/net/ethernet/intel/igb/igb_main.c +15 -13
@@ -551,8 +551,7 @@ static void igb_dump(struct igb_adapter *adapter)/** * igb_get_i2c_data - Reads the I2C SDA data bit -* @hw: pointer to hardware structure -* @i2cctl: Current value of I2CCTL register +* @data: opaque pointer to adapter struct * * Returns the I2C data bit value **/
@@ -4016,6 +4015,7 @@ static int igb_sw_init(struct igb_adapter *adapter)/** * igb_open - Called when a network interface is made active * @netdev: network interface device structure +* @resuming: indicates whether we are in a resume call * * Returns 0 on success, negative value on failure *
@@ -4133,6 +4133,7 @@ int igb_open(struct net_device *netdev)/** * igb_close - Disables a network interface * @netdev: network interface device structure +* @suspending: indicates we are in a suspend call * * Returns 0, this is not allowed to fail *
@@ -5381,7 +5382,7 @@ static void igb_check_lvmmc(struct igb_adapter *adapter)/** * igb_watchdog - Timer Call-back -* @data: pointer to adapter cast into an unsigned long +* @t: pointer to timer_list containing our private info pointer **/ static void igb_watchdog (struct timer_list *t) {
@@ -6429,8 +6430,9 @@ static netdev_tx_t igb_xmit_frame(struct sk_buff *skb,/** * igb_tx_timeout - Respond to a Tx Hang * @netdev: network interface device structure +* @txqueue: number of the tx queue that hung (unused) **/ -static void igb_tx_timeout (struct net_device *netdev,unsigned int txqueue) +static void igb_tx_timeout (struct net_device *netdev,unsigned int __always_unused txqueue) {struct igb_adapter *adapter =netdev_priv (netdev);struct e1000_hw *hw = &adapter->hw;
@@ -8508,7 +8510,6 @@ static inline void igb_rx_hash(struct igb_ring *ring,* igb_is_non_eop - process handling of non-EOP buffers * @rx_ring: Rx ring being processed * @rx_desc: Rx descriptor for current buffer -* @skb: current socket buffer containing buffer in progress * * This function updates next to clean. If the buffer is an EOP buffer * this function exits returning false, otherwise it will place the
@@ -8836,8 +8837,9 @@ static bool igb_alloc_mapped_page(struct igb_ring *rx_ring, }/** -* igb_alloc_rx_buffers - Replace used receive buffers; packet split -* @adapter: address of board private structure +* igb_alloc_rx_buffers - Replace used receive buffers +* @rx_ring: rx descriptor ring to allocate new receive buffers +* @cleaned_count: count of buffers to allocate **/ void igb_alloc_rx_buffers (struct igb_ring *rx_ring,u16 cleaned_count) {
@@ -8906,9 +8908,9 @@ void igb_alloc_rx_buffers(struct igb_ring *rx_ring, u16 cleaned_count)/** * igb_mii_ioctl - -* @netdev: -* @ifreq: -* @cmd: +* @netdev: pointer to netdev struct +* @ifr: interface structure +* @cmd: ioctl command to execute **/ static int igb_mii_ioctl (struct net_device *netdev,struct ifreq *ifr,int cmd) {
@@ -8936,9 +8938,9 @@ static int igb_mii_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd)/** * igb_ioctl - -* @netdev: -* @ifreq: -* @cmd: +* @netdev: pointer to netdev struct +* @ifr: interface structure +* @cmd: ioctl command to execute **/ static int igb_ioctl (struct net_device *netdev,struct ifreq *ifr,int cmd) {
drivers/net/ethernet/intel/igb/igb_ptp.c +4 -4
@@ -957,8 +957,8 @@ void igb_ptp_rx_rgtstamp(struct igb_q_vector *q_vector,/** * igb_ptp_get_ts_config - get hardware time stamping config -* @netdev: -* @ifreq: +* @netdev: netdev struct +* @ifr: interface struct * * Get the hwtstamp_config settings to return to the user. Rather than attempt * to deconstruct the settings from the registers, just return a shadow copy
@@ -1141,8 +1141,8 @@ static int igb_ptp_set_timestamp_mode(struct igb_adapter *adapter,/** * igb_ptp_set_ts_config - set hardware time stamping config -* @netdev: -* @ifreq: +* @netdev: netdev struct +* @ifr: interface struct * **/ int igb_ptp_set_ts_config (struct net_device *netdev,struct ifreq *ifr)
drivers/net/ethernet/intel/igbvf/netdev.c +12 -5
@@ -61,7 +61,7 @@ static const struct igbvf_info *igbvf_info_tbl[] = {/** * igbvf_desc_unused - calculate if we have unused descriptors -* @rx_ring: address of receive ring structure +* @ring: address of receive ring structure **/ static int igbvf_desc_unused (struct igbvf_ring *ring) {
@@ -74,6 +74,8 @@ static int igbvf_desc_unused(struct igbvf_ring *ring)/** * igbvf_receive_skb - helper function to handle Rx indications * @adapter: board private structure +* @netdev: pointer to netdev struct +* @skb: skb to indicate to stack * @status: descriptor status field as written by hardware * @vlan: descriptor vlan field as written by hardware (no le/be conversion) * @skb: pointer to sk_buff to be indicated to stack
@@ -233,6 +235,8 @@ static void igbvf_alloc_rx_buffers(struct igbvf_ring *rx_ring,/** * igbvf_clean_rx_irq - Send received data up the network stack; legacy * @adapter: board private structure +* @work_done: output parameter used to indicate completed work +* @work_to_do: input parameter setting limit of work * * the return value indicates whether actual cleaning was done, there * is no guarantee that everything was cleaned
@@ -406,6 +410,7 @@ static void igbvf_put_txbuf(struct igbvf_adapter *adapter,/** * igbvf_setup_tx_resources - allocate Tx resources (Descriptors) * @adapter: board private structure +* @tx_ring: ring being initialized * * Return 0 on success, negative on failure **/
@@ -444,6 +449,7 @@ int igbvf_setup_tx_resources(struct igbvf_adapter *adapter,/** * igbvf_setup_rx_resources - allocate Rx resources (Descriptors) * @adapter: board private structure +* @rx_ring: ring being initialized * * Returns 0 on success, negative on failure **/
@@ -540,7 +546,7 @@ void igbvf_free_tx_resources(struct igbvf_ring *tx_ring)/** * igbvf_clean_rx_ring - Free Rx Buffers per Queue -* @adapter: board private structure +* @rx_ring: ring structure pointer to free buffers from **/ static void igbvf_clean_rx_ring (struct igbvf_ring *rx_ring) {
@@ -760,7 +766,7 @@ static void igbvf_set_itr(struct igbvf_adapter *adapter)/** * igbvf_clean_tx_irq - Reclaim resources after transmit completes -* @adapter: board private structure +* @tx_ring: ring structure to clean descriptors from * * returns true if ring is completely cleaned **/
@@ -1891,7 +1897,7 @@ static bool igbvf_has_link(struct igbvf_adapter *adapter)/** * igbvf_watchdog - Timer Call-back -* @data: pointer to adapter cast into an unsigned long +* @t: timer list pointer containing private struct **/ static void igbvf_watchdog (struct timer_list *t) {
@@ -2372,8 +2378,9 @@ static netdev_tx_t igbvf_xmit_frame(struct sk_buff *skb,/** * igbvf_tx_timeout - Respond to a Tx Hang * @netdev: network interface device structure +* @txqueue: queue timing out (unused) **/ -static void igbvf_tx_timeout (struct net_device *netdev,unsigned int txqueue) +static void igbvf_tx_timeout (struct net_device *netdev,unsigned int __always_unused txqueue) {struct igbvf_adapter *adapter =netdev_priv (netdev);
drivers/net/ethernet/intel/igc/igc_main.c +1 -1
@@ -4664,7 +4664,7 @@ int igc_close(struct net_device *netdev)/** * igc_ioctl - Access the hwtstamp interface * @netdev: network interface device structure -* @ifreq: interface request data +* @ifr: interface request data * @cmd: ioctl command **/ static int igc_ioctl (struct net_device *netdev,struct ifreq *ifr,int cmd)
drivers/net/ethernet/intel/igc/igc_ptp.c +2 -2
@@ -424,7 +424,7 @@ static void igc_ptp_tx_work(struct work_struct *work)/** * igc_ptp_set_ts_config - set hardware time stamping config * @netdev: network interface device structure -* @ifreq: interface request data +* @ifr: interface request data * **/ int igc_ptp_set_ts_config (struct net_device *netdev,struct ifreq *ifr)
@@ -451,7 +451,7 @@ int igc_ptp_set_ts_config(struct net_device *netdev, struct ifreq *ifr)/** * igc_ptp_get_ts_config - get hardware time stamping config * @netdev: network interface device structure -* @ifreq: interface request data +* @ifr: interface request data * * Get the hwtstamp_config settings to return to the user. Rather than attempt * to deconstruct the settings from the registers, just return a shadow copy
drivers/net/ethernet/intel/ixgb/ixgb_hw.c +63 -72
183 lines not on this page · raw message
drivers/net/ethernet/intel/ixgb/ixgb_main.c +11 -6
@@ -1109,7 +1109,7 @@ ixgb_set_multi(struct net_device *netdev)/** * ixgb_watchdog - Timer Call-back -* @data: pointer to netdev cast into an unsigned long +* @t: pointer to timer_list containing our private info pointer **/ static void
@@ -1531,10 +1531,11 @@ ixgb_xmit_frame(struct sk_buff *skb, struct net_device *netdev)/** * ixgb_tx_timeout - Respond to a Tx Hang * @netdev: network interface device structure +* @txqueue: queue hanging (unused) **/ static void -ixgb_tx_timeout (struct net_device *netdev,unsigned int txqueue) +ixgb_tx_timeout (struct net_device *netdev,unsigned int __always_unused txqueue) {struct ixgb_adapter *adapter =netdev_priv (netdev);
@@ -1746,7 +1747,8 @@ ixgb_intr(int irq, void *data)/** * ixgb_clean - NAPI Rx polling callback -* @adapter: board private structure +* @napi: napi struct pointer +* @budget: max number of receives to clean **/ static int
@@ -1865,7 +1867,7 @@ ixgb_clean_tx_irq(struct ixgb_adapter *adapter)* ixgb_rx_checksum - Receive Checksum Offload for 82597. * @adapter: board private structure * @rx_desc: receive descriptor -* @sk_buff: socket buffer with received data +* @skb: socket buffer with received data **/ static void
@@ -1923,6 +1925,8 @@ static void ixgb_check_copybreak(struct napi_struct *napi,/** * ixgb_clean_rx_irq - Send received data up the network stack, * @adapter: board private structure +* @work_done: output pointer to amount of packets cleaned +* @work_to_do: how much work we can complete **/ static bool
@@ -2042,6 +2046,7 @@ ixgb_clean_rx_irq(struct ixgb_adapter *adapter, int *work_done, int work_to_do)/** * ixgb_alloc_rx_buffers - Replace used receive buffers * @adapter: address of board private structure +* @cleaned_count: how many buffers to allocate **/ static void
@@ -2211,7 +2216,7 @@ static pci_ers_result_t ixgb_io_error_detected(struct pci_dev *pdev,/** * ixgb_io_slot_reset - called after the pci bus has been reset. -* @pdev pointer to pci device with error +* @pdev: pointer to pci device with error * * This callback is called after the PCI bus has been reset. * Basically, this tries to restart the card from scratch.
@@ -2259,7 +2264,7 @@ static pci_ers_result_t ixgb_io_slot_reset(struct pci_dev *pdev)/** * ixgb_io_resume - called when its OK to resume normal operations -* @pdev pointer to pci device with error +* @pdev: pointer to pci device with error * * The error recovery driver tells us that its OK to resume * normal operation. Implementation resembles the second-half
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c +2 -1
@@ -246,8 +246,9 @@ static void ixgbevf_tx_timeout_reset(struct ixgbevf_adapter *adapter)/** * ixgbevf_tx_timeout - Respond to a Tx Hang * @netdev: network interface device structure +* @txqueue: transmit queue hanging (unused) **/ -static void ixgbevf_tx_timeout (struct net_device *netdev,unsigned int txqueue) +static void ixgbevf_tx_timeout (struct net_device *netdev,unsigned int __always_unused txqueue) {struct ixgbevf_adapter *adapter =netdev_priv (netdev);
base-commit: 56823cd9594698aa11c6da0c708517fed65fe60b
Signature · 1 line
2.25.4
Brown
PATCH v2 1/1 intel-ethernet: make W=1 build cleanly
Quoted 41 lines
From: Intel-wired-lan <[email protected]> On Behalf Of Jesse Brandeburg
Sent: Friday, September 4, 2020 1:39 PM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [PATCH net-next v2] intel-ethernet: make W=1 build cleanlyThis takes care of all of the trivial W=1 fixes in the Intel Ethernet drivers, which allows developers and maintainers to build more of the networking tree with more complete warning checks.
Almost all of the changes were trivial comment updates on function headers, but some of the changes were for variables that were storing a return value from a register read, where the return value wasn't used. Those conversions to remove the lvalue of the assignment should be safe because the readl memory mapped reads are marked volatile and should not be optimized out without an lvalue (I suspect a very long time ago this wasn't guaranteed as it is today).
Inspired by Lee Jones' series of wireless work to do the same. Compile tested only.
Signed-off-by Jesse Brandeburg <[email protected]>---
v2: pointed at net-next insteaddrivers/net/ethernet/intel/e100.c | 8 +- drivers/net/ethernet/intel/e1000/e1000_hw.c | 147 ++++++++---------- drivers/net/ethernet/intel/e1000/e1000_main.c | 39 +++-- .../net/ethernet/intel/e1000e/80003es2lan.c | 1 - drivers/net/ethernet/intel/e1000e/ich8lan.c | 16 +- drivers/net/ethernet/intel/e1000e/netdev.c | 50 ++++-- drivers/net/ethernet/intel/e1000e/phy.c | 3 + drivers/net/ethernet/intel/e1000e/ptp.c | 2 +- drivers/net/ethernet/intel/igb/e1000_82575.c | 6 +- drivers/net/ethernet/intel/igb/e1000_i210.c | 5 +- drivers/net/ethernet/intel/igb/e1000_mac.c | 1 + drivers/net/ethernet/intel/igb/e1000_mbx.c | 1 + drivers/net/ethernet/intel/igb/igb_main.c | 28 ++--
Quoted 9 lines
drivers/net/ethernet/intel/igb/igb_ptp.c | 8 +- drivers/net/ethernet/intel/igbvf/netdev.c | 17 +- drivers/net/ethernet/intel/igc/igc_main.c | 2 +- drivers/net/ethernet/intel/igc/igc_ptp.c | 4 +- drivers/net/ethernet/intel/ixgb/ixgb_hw.c | 135 ++++++++-------- drivers/net/ethernet/intel/ixgb/ixgb_main.c | 17 +- .../net/ethernet/intel/ixgbevf/ixgbevf_main.c | 3 +- 20 files changed, 265 insertions(+), 228 deletions(-)