Skip to contentSkip to conversation

make drivers/net/ethernet W=1 clean

RFC PATCH Superseded Jesse Brandeburg 9 participants 38 messages Sep 11, 2020 – Sep 23, 2020

Subsystems (42)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover make drivers/net/ethernet W=1 clean

This series is a placeholder to show I've about finished this work.

After applying the patches below, the drivers/net/ethernet directory can be built as modules with W=1 with no warnings.

This series removes 1,283 warnings and hopefully allows the ethernet directory to move forward from here without more warnings being added.

Some of these patches are already sent to Intel Wired Lan, but the rest of the series titled drivers/net/ethernet affects other drivers, not just Intel, but they depend on the first five.

Jesse Brandeburg (11):
i40e: prepare flash string in a simpler way
i40e: clean up W=1 warnings in i40e
iavf: clean up W=1 warnings in iavf
ixgbe: clean up W=1 warnings in ixgbe
intel-ethernet: make W=1 build cleanly drivers/net/ethernet: clean up unused assignments drivers/net/ethernet: rid ethernet of no-prototype warnings drivers/net/ethernet: handle one warning explicitly drivers/net/ethernet: add some basic kdoc tags drivers/net/ethernet: remove incorrectly formatted doc drivers/net/ethernet: clean up mis-targeted comments

 drivers/net/ethernet/amazon/ena/ena_com.c     |   2 +-
 .../aquantia/atlantic/hw_atl/hw_atl_b0.c      |   2 +-
 drivers/net/ethernet/arc/emac_arc.c           |   2 +-
 .../net/ethernet/atheros/atl1c/atl1c_main.c   |   6 +-
 .../net/ethernet/atheros/atl1e/atl1e_main.c   |   7 +-
 drivers/net/ethernet/atheros/atlx/atl1.c      |   2 +-
 drivers/net/ethernet/atheros/atlx/atl2.c      |   6 +-
 .../net/ethernet/broadcom/bnx2x/bnx2x_cmn.c   |   2 +
 .../ethernet/broadcom/bnx2x/bnx2x_ethtool.c   |   6 +-
 .../net/ethernet/broadcom/bnx2x/bnx2x_main.c  |  12 +-
 .../net/ethernet/broadcom/bnx2x/bnx2x_sp.c    |  98 ++---
 drivers/net/ethernet/brocade/bna/bfa_cee.c    |  20 +-
 drivers/net/ethernet/brocade/bna/bfa_ioc.c    |   8 +-
 drivers/net/ethernet/brocade/bna/bnad.c       |   7 +-
 drivers/net/ethernet/cadence/macb_main.c      |   6 +-
 drivers/net/ethernet/cadence/macb_pci.c       |   2 +-
 drivers/net/ethernet/calxeda/xgmac.c          |   2 +
 .../ethernet/cavium/liquidio/cn68xx_device.c  |   1 +
 .../net/ethernet/cavium/liquidio/lio_core.c   |  92 ++---
 .../net/ethernet/cavium/liquidio/lio_main.c   | 355 +++++++++---------
 .../ethernet/cavium/liquidio/lio_vf_main.c    | 158 ++++----
 .../ethernet/cavium/liquidio/octeon_console.c |  12 +-
 .../ethernet/cavium/liquidio/octeon_device.c  |  17 +-
 .../ethernet/cavium/liquidio/octeon_droq.c    |   2 +-
 .../ethernet/cavium/liquidio/octeon_mailbox.c |   5 +-
 .../ethernet/cavium/liquidio/octeon_mem_ops.c |   1 +
 .../net/ethernet/chelsio/cxgb3/cxgb3_main.c   |   8 +-
 drivers/net/ethernet/chelsio/cxgb3/sge.c      |  28 +-
 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c    |   5 +-
 drivers/net/ethernet/cisco/enic/enic_api.c    |   2 +-
 .../net/ethernet/cisco/enic/enic_ethtool.c    |   2 +-
 drivers/net/ethernet/cortina/gemini.c         |   8 +-
 drivers/net/ethernet/dec/tulip/de4x5.c        |   4 +-
 drivers/net/ethernet/dec/tulip/media.c        |   5 -
 drivers/net/ethernet/dnet.c                   |   8 +-
 drivers/net/ethernet/ethoc.c                  |   6 +-
 .../net/ethernet/freescale/dpaa2/dpaa2-eth.c  |   2 +-
 drivers/net/ethernet/freescale/fec_ptp.c      |   8 +-
 drivers/net/ethernet/freescale/fman/fman.c    |  14 +-
 .../net/ethernet/freescale/fman/fman_muram.c  |   6 +-
 .../net/ethernet/freescale/fman/fman_port.c   |  23 +-
 drivers/net/ethernet/freescale/fman/mac.c     |   4 +-
 drivers/net/ethernet/hisilicon/hns/hnae.c     |   2 +-
 .../net/ethernet/hisilicon/hns/hns_dsaf_mac.c |  34 +-
 .../ethernet/hisilicon/hns/hns_dsaf_main.c    | 148 ++++----
 .../ethernet/hisilicon/hns/hns_dsaf_misc.c    |   7 +-
 .../net/ethernet/hisilicon/hns/hns_dsaf_ppe.c |  17 +-
 .../net/ethernet/hisilicon/hns/hns_dsaf_rcb.c |   7 +-
 .../ethernet/hisilicon/hns/hns_dsaf_xgmac.c   |   3 +-
 drivers/net/ethernet/hisilicon/hns/hns_enet.c |   4 +-
 .../net/ethernet/hisilicon/hns/hns_ethtool.c  |  48 +--
 .../hisilicon/hns3/hns3pf/hclge_dcb.c         |   1 +
 drivers/net/ethernet/hisilicon/hns_mdio.c     |   3 +-
 .../net/ethernet/huawei/hinic/hinic_hw_cmdq.c |   2 +-
 .../net/ethernet/huawei/hinic/hinic_hw_dev.c  |   6 +-
 .../net/ethernet/huawei/hinic/hinic_hw_eqs.c  |   1 +
 .../net/ethernet/huawei/hinic/hinic_hw_if.c   |   1 +
 .../net/ethernet/huawei/hinic/hinic_hw_mgmt.c |   1 +
 .../net/ethernet/huawei/hinic/hinic_main.c    |   2 +-
 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/i40e/i40e_client.c |   2 -
 drivers/net/ethernet/intel/i40e/i40e_common.c |   4 +-
 drivers/net/ethernet/intel/i40e/i40e_ddp.c    |   8 +-
 drivers/net/ethernet/intel/i40e/i40e_main.c   |  17 +-
 drivers/net/ethernet/intel/i40e/i40e_ptp.c    |   1 -
 drivers/net/ethernet/intel/i40e/i40e_txrx.c   |   7 +-
 .../ethernet/intel/i40e/i40e_virtchnl_pf.c    |   9 +-
 drivers/net/ethernet/intel/iavf/iavf_main.c   |  24 +-
 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 +-
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c |   3 +-
 drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c  |   8 +-
 .../net/ethernet/intel/ixgbevf/ixgbevf_main.c |   3 +-
 drivers/net/ethernet/marvell/mvneta.c         |   7 +-
 drivers/net/ethernet/marvell/pxa168_eth.c     |   3 +-
 drivers/net/ethernet/mellanox/mlx4/en_tx.c    |   2 +-
 drivers/net/ethernet/micrel/ksz884x.c         |  59 +--
 .../ethernet/microchip/encx24j600-regmap.c    |   2 +-
 drivers/net/ethernet/microchip/lan743x_main.c |   9 +-
 drivers/net/ethernet/natsemi/ns83820.c        |   6 +-
 drivers/net/ethernet/neterion/s2io.c          |  91 ++---
 .../net/ethernet/neterion/vxge/vxge-config.c  |   5 +-
 .../net/ethernet/neterion/vxge/vxge-ethtool.c |   2 +-
 .../net/ethernet/neterion/vxge/vxge-main.c    |  10 +-
 drivers/net/ethernet/neterion/vxge/vxge-reg.h |   4 +-
 .../net/ethernet/neterion/vxge/vxge-traffic.c |  72 ++--
 .../oki-semi/pch_gbe/pch_gbe_ethtool.c        |   4 +-
 .../ethernet/oki-semi/pch_gbe/pch_gbe_main.c  |   5 +-
 .../ethernet/oki-semi/pch_gbe/pch_gbe_param.c |  14 +-
 .../net/ethernet/packetengines/yellowfin.c    |   2 +-
 .../net/ethernet/qlogic/netxen/netxen_nic.h   |   3 -
 .../qlogic/netxen/netxen_nic_ethtool.c        |   3 +
 .../ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c   |   3 +-
 drivers/net/ethernet/qualcomm/emac/emac.c     |   1 +
 drivers/net/ethernet/realtek/8139cp.c         |   2 +
 drivers/net/ethernet/renesas/sh_eth.c         |   8 +
 .../net/ethernet/samsung/sxgbe/sxgbe_main.c   |  17 +-
 drivers/net/ethernet/sfc/falcon/farch.c       |  29 +-
 drivers/net/ethernet/sfc/falcon/rx.c          |   2 +
 drivers/net/ethernet/sfc/falcon/selftest.c    |   2 +-
 drivers/net/ethernet/sfc/net_driver.h         |   2 +-
 drivers/net/ethernet/sfc/ptp.c                |   6 +
 drivers/net/ethernet/sis/sis900.c             |   8 +-
 .../net/ethernet/stmicro/stmmac/dwmac-rk.c    |   2 +-
 .../net/ethernet/stmicro/stmmac/stmmac_main.c |  18 +-
 .../ethernet/stmicro/stmmac/stmmac_platform.c |   3 +-
 drivers/net/ethernet/sun/cassini.c            |   4 +-
 .../net/ethernet/synopsys/dwc-xlgmac-common.c |   2 +-
 drivers/net/ethernet/tehuti/tehuti.c          |  17 +-
 drivers/net/ethernet/ti/cpsw_new.c            |   2 -
 drivers/net/ethernet/ti/davinci_cpdma.c       |   2 +-
 drivers/net/ethernet/ti/davinci_emac.c        |  10 +-
 drivers/net/ethernet/ti/tlan.c                |   4 +-
 drivers/net/ethernet/via/via-rhine.c          |   2 +-
 drivers/net/ethernet/via/via-velocity.c       |  40 +-
 drivers/net/ethernet/xilinx/ll_temac_main.c   |  26 +-
 132 files changed, 1227 insertions(+), 1117 deletions(-)

base-commit: b55353e2cc1415c1ece3ae34a856309b40bb0b4b

Signature · 1 line
2.27.0
#1 lore raw

RFC PATCH 1/11 i40e: prepare flash string in a simpler way

The flash string handling code triggered a W=1 warning and upon investigation it seems everything can be handled in a simpler way with a single initialization and one strlcat. The buffer is filled with NULL after the end of the string by the initializer, and the strlcat checks total length, and makes sure the buffer is terminated cleanly.

I didn't mark this with a fixes tag as there is no apparent bug since the existing code would limit the input data + path to be the right size, but it does fix the W=1 warning.

---
 drivers/net/ethernet/intel/i40e/i40e_ddp.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_ddp.c +2 -6
index 5e08f100c413..9767fdf56124 100644
@@ -434,14 +434,10 @@ int i40e_ddp_flash(struct net_device *netdev, struct ethtool_flash *flash)
 	 * stored profile.
 	 */
 	if (strncmp(flash->data, "-", 2) != 0) {
+		char profile_name[ETHTOOL_FLASH_MAX_FILENAME] = I40E_DDP_PROFILE_PATH;
 		struct i40e_ddp_old_profile_list *list_entry;
-		char profile_name[sizeof(I40E_DDP_PROFILE_PATH)
-				  + I40E_DDP_PROFILE_NAME_MAX];
 
-		profile_name[sizeof(profile_name) - 1] = 0;
-		strncpy(profile_name, I40E_DDP_PROFILE_PATH,
-			sizeof(profile_name) - 1);
-		strncat(profile_name, flash->data, I40E_DDP_PROFILE_NAME_MAX);
+		strlcat(profile_name, flash->data, ETHTOOL_FLASH_MAX_FILENAME);
 		/* Load DDP recipe. */
 		status = request_firmware(&ddp_config, profile_name,
 					  &netdev->dev);
Signature · 1 line
2.27.0
#2 lore raw

RFC PATCH 2/11 i40e: clean up W=1 warnings in i40e

In reply to Jesse Brandeburg

Inspired by Lee Jones, this eliminates the remaining W=1 warnings in i40e.

---
 drivers/net/ethernet/intel/i40e/i40e_client.c   |  2 --
 drivers/net/ethernet/intel/i40e/i40e_common.c   |  4 ++--
 drivers/net/ethernet/intel/i40e/i40e_main.c     | 17 ++++++++++-------
 drivers/net/ethernet/intel/i40e/i40e_ptp.c      |  1 -
 drivers/net/ethernet/intel/i40e/i40e_txrx.c     |  7 ++++---
 .../net/ethernet/intel/i40e/i40e_virtchnl_pf.c  |  9 +++++----
 6 files changed, 21 insertions(+), 19 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_client.c +0 -2
index befd3018183f..a2dba32383f6 100644
@@ -278,8 +278,6 @@ void i40e_client_update_msix_info(struct i40e_pf *pf)
 /**
  * i40e_client_add_instance - add a client instance struct to the instance list
  * @pf: pointer to the board struct
- * @client: pointer to a client struct in the client list.
- * @existing: if there was already an existing instance
  *
  **/
 static void i40e_client_add_instance(struct i40e_pf *pf)
drivers/net/ethernet/intel/i40e/i40e_common.c +2 -2
index 6ab52cbd697a..adc9e4fa4789 100644
@@ -3766,9 +3766,7 @@ i40e_status i40e_aq_stop_lldp(struct i40e_hw *hw, bool shutdown_agent,
 /**
  * i40e_aq_start_lldp
  * @hw: pointer to the hw struct
- * @buff: buffer for result
  * @persist: True if start of LLDP should be persistent across power cycles
- * @buff_size: buffer size
  * @cmd_details: pointer to command details structure or NULL
  *
  * Start the embedded LLDP Agent on all ports.
@@ -5395,6 +5393,7 @@ static void i40e_mdio_if_number_selection(struct i40e_hw *hw, bool set_mdio,
  * @hw: pointer to the hw struct
  * @phy_select: select which phy should be accessed
  * @dev_addr: PHY device address
+ * @page_change: flag to indicate if phy page should be updated
  * @set_mdio: use MDIO I/F number specified by mdio_num
  * @mdio_num: MDIO I/F number
  * @reg_addr: PHY register address
@@ -5439,6 +5438,7 @@ enum i40e_status_code i40e_aq_set_phy_register_ext(struct i40e_hw *hw,
  * @hw: pointer to the hw struct
  * @phy_select: select which phy should be accessed
  * @dev_addr: PHY device address
+ * @page_change: flag to indicate if phy page should be updated
  * @set_mdio: use MDIO I/F number specified by mdio_num
  * @mdio_num: MDIO I/F number
  * @reg_addr: PHY register address
drivers/net/ethernet/intel/i40e/i40e_main.c +10 -7
index 05c6d3ea11e6..4553700ce686 100644
@@ -287,6 +287,7 @@ void i40e_service_event_schedule(struct i40e_pf *pf)
 /**
  * i40e_tx_timeout - Respond to a Tx Hang
  * @netdev: network interface device structure
+ * @txqueue: queue number timing out
  *
  * If any port has noticed a Tx timeout, it is likely that the whole
  * device is munged, not just the one netdev port, so go for the full
@@ -1609,6 +1610,8 @@ static int i40e_set_mac(struct net_device *netdev, void *p)
  * i40e_config_rss_aq - Prepare for RSS using AQ commands
  * @vsi: vsi structure
  * @seed: RSS hash seed
+ * @lut: pointer to lookup table of lut_size
+ * @lut_size: size of the lookup table
  **/
 static int i40e_config_rss_aq(struct i40e_vsi *vsi, const u8 *seed,
 			      u8 *lut, u16 lut_size)
@@ -5815,7 +5818,6 @@ static int i40e_vsi_reconfig_rss(struct i40e_vsi *vsi, u16 rss_size)
 /**
  * i40e_channel_setup_queue_map - Setup a channel queue map
  * @pf: ptr to PF device
- * @vsi: the VSI being setup
  * @ctxt: VSI context structure
  * @ch: ptr to channel structure
  *
@@ -6058,8 +6060,7 @@ static inline int i40e_setup_hw_channel(struct i40e_pf *pf,
 /**
  * i40e_setup_channel - setup new channel using uplink element
  * @pf: ptr to PF device
- * @type: type of channel to be created (VMDq2/VF)
- * @uplink_seid: underlying HW switching element (VEB) ID
+ * @vsi: pointer to the VSI to set up the channel within
  * @ch: ptr to channel structure
  *
  * Setup new channel (VSI) based on specified type (VMDq2/VF)
@@ -7780,7 +7781,7 @@ int i40e_add_del_cloud_filter_big_buf(struct i40e_vsi *vsi,
 /**
  * i40e_parse_cls_flower - Parse tc flower filters provided by kernel
  * @vsi: Pointer to VSI
- * @cls_flower: Pointer to struct flow_cls_offload
+ * @f: Pointer to struct flow_cls_offload
  * @filter: Pointer to cloud filter structure
  *
  **/
@@ -8161,8 +8162,8 @@ static int i40e_delete_clsflower(struct i40e_vsi *vsi,
 
 /**
  * i40e_setup_tc_cls_flower - flower classifier offloads
- * @netdev: net device to configure
- * @type_data: offload data
+ * @np: net device to configure
+ * @cls_flower: offload data
  **/
 static int i40e_setup_tc_cls_flower(struct i40e_netdev_priv *np,
 				    struct flow_cls_offload *cls_flower)
@@ -9586,6 +9587,7 @@ static int i40e_reconstitute_veb(struct i40e_veb *veb)
 /**
  * i40e_get_capabilities - get info about the HW
  * @pf: the PF struct
+ * @list_type: AQ capability to be queried
  **/
 static int i40e_get_capabilities(struct i40e_pf *pf,
 				 enum i40e_admin_queue_opc list_type)
@@ -10547,7 +10549,7 @@ static void i40e_service_task(struct work_struct *work)
 
 /**
  * i40e_service_timer - timer callback
- * @data: pointer to PF struct
+ * @t: timer list pointer
  **/
 static void i40e_service_timer(struct timer_list *t)
 {
@@ -12380,6 +12382,7 @@ static int i40e_get_phys_port_id(struct net_device *netdev,
  * @addr: the MAC address entry being added
  * @vid: VLAN ID
  * @flags: instructions from stack about fdb operation
+ * @extack: netlink extended ack, unused currently
  */
 static int i40e_ndo_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
 			    struct net_device *dev,
drivers/net/ethernet/intel/i40e/i40e_ptp.c +0 -1
index ff7b19c6bc73..7a879614ca55 100644
@@ -259,7 +259,6 @@ static u32 i40e_ptp_get_rx_events(struct i40e_pf *pf)
 /**
  * i40e_ptp_rx_hang - Detect error case when Rx timestamp registers are hung
  * @pf: The PF private data structure
- * @vsi: The VSI with the rings relevant to 1588
  *
  * This watchdog task is scheduled to detect error case where hardware has
  * dropped an Rx packet that was timestamped when the ring is full. The
drivers/net/ethernet/intel/i40e/i40e_txrx.c +4 -3
index 91ab824926b9..828dff2e7ed2 100644
@@ -1755,7 +1755,6 @@ static inline void i40e_rx_hash(struct i40e_ring *ring,
  * @rx_ring: rx descriptor ring packet is being transacted on
  * @rx_desc: pointer to the EOP Rx descriptor
  * @skb: pointer to current skb being populated
- * @rx_ptype: the packet type decoded by hardware
  *
  * This function checks the ring, descriptor, and packet information in
  * order to populate the hash, checksum, VLAN, protocol, and
@@ -3499,7 +3498,7 @@ static inline int i40e_tx_map(struct i40e_ring *tx_ring, struct sk_buff *skb,
 
 /**
  * i40e_xmit_xdp_ring - transmits an XDP buffer to an XDP Tx ring
- * @xdp: data to transmit
+ * @xdpf: data to transmit
  * @xdp_ring: XDP Tx ring
  **/
 static int i40e_xmit_xdp_ring(struct xdp_frame *xdpf,
@@ -3694,7 +3693,9 @@ netdev_tx_t i40e_lan_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
 /**
  * i40e_xdp_xmit - Implements ndo_xdp_xmit
  * @dev: netdev
- * @xdp: XDP buffer
+ * @n: number of frames
+ * @frames: array of XDP buffer pointers
+ * @flags: XDP extra info
  *
  * Returns number of frames successfully sent. Frames that fail are
  * free'ed via XDP return API.
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +5 -4
index 8e133d6545bd..f32a907b4419 100644
@@ -2234,7 +2234,8 @@ static int i40e_vc_config_queues_msg(struct i40e_vf *vf, u8 *msg)
 }
 
 /**
- * i40e_validate_queue_map
+ * i40e_validate_queue_map - check queue map is valid
+ * @vf: the VF structure pointer
  * @vsi_id: vsi id
  * @queuemap: Tx or Rx queue map
  *
@@ -3150,8 +3151,8 @@ static int i40e_vc_disable_vlan_stripping(struct i40e_vf *vf, u8 *msg)
 
 /**
  * i40e_validate_cloud_filter
- * @mask: mask for TC filter
- * @data: data for TC filter
+ * @vf: pointer to VF structure
+ * @tc_filter: pointer to filter requested
  *
  * This function validates cloud filter programmed as TC filter for ADq
  **/
@@ -3284,7 +3285,7 @@ static int i40e_validate_cloud_filter(struct i40e_vf *vf,
 /**
  * i40e_find_vsi_from_seid - searches for the vsi with the given seid
  * @vf: pointer to the VF info
- * @seid - seid of the vsi it is searching for
+ * @seid: seid of the vsi it is searching for
  **/
 static struct i40e_vsi *i40e_find_vsi_from_seid(struct i40e_vf *vf, u16 seid)
 {
Signature · 1 line
2.27.0
Tested-by on v1 2/11
#3 lore raw

RE: [Intel-wired-lan] [RFC PATCH net-next v1 02/11] i40e: clean up W=1 warnings in i40e

Quoted 11 lines

From: Intel-wired-lan <[email protected]> On Behalf Of Jesse Brandeburg
Sent: Thursday, September 10, 2020 6:23 PM
To: netdev at vger.kernel.org
Cc: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [RFC PATCH net-next v1 02/11] i40e: clean up W=1 warnings in i40e

Inspired by Lee Jones, this eliminates the remaining W=1 warnings in i40e.

Quoted 9 lines
---
 drivers/net/ethernet/intel/i40e/i40e_client.c   |  2 --
 drivers/net/ethernet/intel/i40e/i40e_common.c   |  4 ++--
 drivers/net/ethernet/intel/i40e/i40e_main.c     | 17 ++++++++++-------
 drivers/net/ethernet/intel/i40e/i40e_ptp.c      |  1 -
 drivers/net/ethernet/intel/i40e/i40e_txrx.c     |  7 ++++---
 .../net/ethernet/intel/i40e/i40e_virtchnl_pf.c  |  9 +++++----
 6 files changed, 21 insertions(+), 19 deletions(-)

Not sure if this is intended to be the final form, but it's in the tree I'm testing with and seems to work...

#4 lore raw

RFC PATCH 3/11 iavf: clean up W=1 warnings in iavf

In reply to Jesse Brandeburg

Inspired by Lee Jones, this eliminates the remaining W=1 warnings in iavf.

---
 drivers/net/ethernet/intel/iavf/iavf_main.c | 24 ++++++++++-----------
 1 file changed, 12 insertions(+), 12 deletions(-)
drivers/net/ethernet/intel/iavf/iavf_main.c +12 -12
index d870343cf689..814e59bf2c94 100644
@@ -147,6 +147,7 @@ void iavf_schedule_reset(struct iavf_adapter *adapter)
 /**
  * iavf_tx_timeout - Respond to a Tx Hang
  * @netdev: network interface device structure
+ * @txqueue: queue number that is timing out
  **/
 static void iavf_tx_timeout(struct net_device *netdev, unsigned int txqueue)
 {
@@ -2572,8 +2573,8 @@ static int iavf_validate_ch_config(struct iavf_adapter *adapter,
 }
 
 /**
- * iavf_del_all_cloud_filters - delete all cloud filters
- * on the traffic classes
+ * iavf_del_all_cloud_filters - delete all cloud filters on the traffic classes
+ * @adapter: board private structure
  **/
 static void iavf_del_all_cloud_filters(struct iavf_adapter *adapter)
 {
@@ -2592,7 +2593,7 @@ static void iavf_del_all_cloud_filters(struct iavf_adapter *adapter)
 /**
  * __iavf_setup_tc - configure multiple traffic classes
  * @netdev: network interface device structure
- * @type_date: tc offload data
+ * @type_data: tc offload data
  *
  * This function processes the config information provided by the
  * user to configure traffic classes/queue channels and packages the
@@ -2690,7 +2691,7 @@ static int __iavf_setup_tc(struct net_device *netdev, void *type_data)
 /**
  * iavf_parse_cls_flower - Parse tc flower filters provided by kernel
  * @adapter: board private structure
- * @cls_flower: pointer to struct flow_cls_offload
+ * @f: pointer to struct flow_cls_offload
  * @filter: pointer to cloud filter structure
  */
 static int iavf_parse_cls_flower(struct iavf_adapter *adapter,
@@ -3064,8 +3065,8 @@ static int iavf_delete_clsflower(struct iavf_adapter *adapter,
 
 /**
  * iavf_setup_tc_cls_flower - flower classifier offloads
- * @netdev: net device to configure
- * @type_data: offload data
+ * @adapter: board private structure
+ * @cls_flower: pointer to flow_cls_offload struct with flow info
  */
 static int iavf_setup_tc_cls_flower(struct iavf_adapter *adapter,
 				    struct flow_cls_offload *cls_flower)
@@ -3112,7 +3113,7 @@ static LIST_HEAD(iavf_block_cb_list);
  * iavf_setup_tc - configure multiple traffic classes
  * @netdev: network interface device structure
  * @type: type of offload
- * @type_date: tc offload data
+ * @type_data: tc offload data
  *
  * This function is the callback to ndo_setup_tc in the
  * netdev_ops.
@@ -3768,8 +3769,7 @@ static int iavf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 
 /**
  * iavf_suspend - Power management suspend routine
- * @pdev: PCI device information struct
- * @state: unused
+ * @dev_d: device info pointer
  *
  * Called when the system (VM) is entering sleep/suspend.
  **/
@@ -3799,15 +3799,15 @@ static int __maybe_unused iavf_suspend(struct device *dev_d)
 
 /**
  * iavf_resume - Power management resume routine
- * @pdev: PCI device information struct
+ * @dev_d: device info pointer
  *
  * Called when the system (VM) is resumed from sleep/suspend.
  **/
 static int __maybe_unused iavf_resume(struct device *dev_d)
 {
+	struct net_device *netdev = dev_get_drvdata(dev_d);
+	struct iavf_adapter *adapter = netdev_priv(netdev);
 	struct pci_dev *pdev = to_pci_dev(dev_d);
-	struct iavf_adapter *adapter = pci_get_drvdata(pdev);
-	struct net_device *netdev = adapter->netdev;
 	u32 err;
 
 	pci_set_master(pdev);
Signature · 1 line
2.27.0
#5 lore raw

RFC PATCH 3/11 iavf: clean up W=1 warnings in iavf

Quoted 8 lines

From: Intel-wired-lan <[email protected]> On Behalf Of Jesse Brandeburg
Sent: Thursday, September 10, 2020 6:23 PM
To: netdev at vger.kernel.org
Cc: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [RFC PATCH net-next v1 03/11] iavf: clean up W=1 warnings in iavf

Quoted 8 lines

Inspired by Lee Jones, this eliminates the remaining W=1 warnings in iavf.

---
 drivers/net/ethernet/intel/iavf/iavf_main.c | 24 ++++++++++-----------
 1 file changed, 12 insertions(+), 12 deletions(-)
#6 lore raw

RFC PATCH 4/11 ixgbe: clean up W=1 warnings in ixgbe

In reply to Jesse Brandeburg

Inspired by Lee Jones, this eliminates the remaining W=1 warnings in ixgbe.

---
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 3 ++-
 drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c  | 8 ++++----
 2 files changed, 6 insertions(+), 5 deletions(-)
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +2 -1
index 0b675c34ce49..02899f79f0ff 100644
@@ -6175,8 +6175,9 @@ static void ixgbe_set_eee_capable(struct ixgbe_adapter *adapter)
 /**
  * ixgbe_tx_timeout - Respond to a Tx Hang
  * @netdev: network interface device structure
+ * @txqueue: queue number that timed out
  **/
-static void ixgbe_tx_timeout(struct net_device *netdev, unsigned int txqueue)
+static void ixgbe_tx_timeout(struct net_device *netdev, unsigned int __always_unused txqueue)
 {
 	struct ixgbe_adapter *adapter = netdev_priv(netdev);
 
drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c +4 -4
index 7980d7265e10..f77fa3e4fdd1 100644
@@ -771,7 +771,7 @@ static s32 ixgbe_mii_bus_write_generic(struct ixgbe_hw *hw, int addr,
 
 /**
  *  ixgbe_mii_bus_read - Read a clause 22/45 register
- *  @hw: pointer to hardware structure
+ *  @bus: pointer to mii_bus structure which points to our driver private
  *  @addr: address
  *  @regnum: register number
  **/
@@ -786,7 +786,7 @@ static s32 ixgbe_mii_bus_read(struct mii_bus *bus, int addr, int regnum)
 
 /**
  *  ixgbe_mii_bus_write - Write a clause 22/45 register
- *  @hw: pointer to hardware structure
+ *  @bus: pointer to mii_bus structure which points to our driver private
  *  @addr: address
  *  @regnum: register number
  *  @val: value to write
@@ -803,7 +803,7 @@ static s32 ixgbe_mii_bus_write(struct mii_bus *bus, int addr, int regnum,
 
 /**
  *  ixgbe_x550em_a_mii_bus_read - Read a clause 22/45 register on x550em_a
- *  @hw: pointer to hardware structure
+ *  @bus: pointer to mii_bus structure which points to our driver private
  *  @addr: address
  *  @regnum: register number
  **/
@@ -820,7 +820,7 @@ static s32 ixgbe_x550em_a_mii_bus_read(struct mii_bus *bus, int addr,
 
 /**
  *  ixgbe_x550em_a_mii_bus_write - Write a clause 22/45 register on x550em_a
- *  @hw: pointer to hardware structure
+ *  @bus: pointer to mii_bus structure which points to our driver private
  *  @addr: address
  *  @regnum: register number
  *  @val: value to write
Signature · 1 line
2.27.0
#7 lore raw

RFC PATCH 4/11 ixgbe: clean up W=1 warnings in ixgbe

Quoted 8 lines

From: Intel-wired-lan <[email protected]> On Behalf Of Jesse Brandeburg
Sent: Thursday, September 10, 2020 6:24 PM
To: netdev at vger.kernel.org
Cc: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [RFC PATCH net-next v1 04/11] ixgbe: clean up W=1 warnings in ixgbe

Quoted 9 lines

Inspired by Lee Jones, this eliminates the remaining W=1 warnings in ixgbe.

---
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 3 ++-
 drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c  | 8 ++++----
 2 files changed, 6 insertions(+), 5 deletions(-)
#8 lore raw

RFC PATCH 5/11 intel-ethernet: make W=1 build cleanly

In reply to Jesse Brandeburg

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.

---
 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
index 36da059388dc..76bb77b4607a 100644
@@ -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
  */
@@ -2593,7 +2593,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);
@@ -2601,7 +2601,7 @@ static void e100_diag_test(struct net_device *netdev,
 	if (test->flags & ETH_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);
@@ -2610,7 +2610,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
index 1e6ec081fd9d..906591614553 100644
@@ -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
index 4b103cca8a39..be9c695dde12 100644
@@ -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
index b2f2fcfdf732..ded74304e8cf 100644
@@ -743,7 +743,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
  *
@@ -2266,7 +2266,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.
@@ -2405,8 +2405,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)
 {
@@ -2694,8 +2696,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
index e11c877595fb..bdd9dc163f15 100644
@@ -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
index 34b988d70488..8d21bcb427ec 100644
@@ -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
index a32391e82762..50863fd87d53 100644
@@ -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
index c393cb2c0f16..9265901455cd 100644
@@ -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
index 3254737c07a3..fd8eb2f9ab9d 100644
@@ -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
index 46debd991bfe..33cceb77e960 100644
@@ -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
index e1e37d0b7703..44157fcd3cf7 100644
@@ -549,8 +549,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
  **/
@@ -3868,6 +3867,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
  *
@@ -3985,6 +3985,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
  *
@@ -5219,7 +5220,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)
 {
@@ -6192,8 +6193,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;
@@ -8181,7 +8183,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
@@ -8460,8 +8461,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)
 {
@@ -8530,9 +8532,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)
 {
@@ -8560,9 +8562,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
index 490368d3d03c..7cc5428c3b3d 100644
@@ -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
index 19269f5d52bc..ee9f8c1dca83 100644
@@ -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
index c6968fdb6caa..3183150c7995 100644
@@ -4653,7 +4653,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
index 36c999250fcc..7aee56346656 100644
@@ -420,7 +420,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)
@@ -447,7 +447,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
index 048351cf0e4a..1588376d4c67 100644
@@ -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
index 50afec43e001..ba54c728aef2 100644
@@ -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);
 
Signature · 1 line
2.27.0
Reviewed-by on v1 5/11
#9 lore raw

Re: [Intel-wired-lan] [RFC PATCH net-next v1 05/11] intel-ethernet: make W=1 build cleanly

Quoted 41 lines · Jesse Brandeburg

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.

---
 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/e1000/e1000_hw.c static void e1000_phy_init_script(struct e1000_hw *hw) · line 143

Quoted 10 lines
drivers/net/ethernet/intel/e1000/e1000_hw.c +1 -0
index 4e7a0810eaeb..2120dacfd55c 100644
@@ -139,6 +139,7 @@ static void e1000_phy_init_script(struct e1000_hw *hw)
 		 * at the end of this routine.
 		 */
 		ret_val = e1000_read_phy_reg(hw, 0x2F5B, &phy_saved_data);
+		e_dbg("Reading PHY register 0x2F5B failed: %d\n", ret_val);
 

Adding this debug statement seems unrelated.

drivers/net/ethernet/intel/e1000/e1000_hw.c static void e1000_phy_init_script(struct e1000_hw *hw) · line 145

Quoted 2 lines
drivers/net/ethernet/intel/e1000/e1000_hw.c +0 -0
 		/* Disabled the PHY transmitter */
 		e1000_write_phy_reg(hw, 0x2F5B, 0x0003);

Apart from this,

Signature · 1 line
Vinicius
#10 lore raw

RFC PATCH 5/11 intel-ethernet: make W=1 build cleanly

Quoted 46 lines · Vinicius Costa Gomes
Quoted 41 lines · Jesse Brandeburg

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.

---
 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(-)

...

Quoted 12 lines

drivers/net/ethernet/intel/e1000/e1000_hw.c static void e1000_phy_init_script(struct e1000_hw *hw) · line 143

Quoted 10 lines
drivers/net/ethernet/intel/e1000/e1000_hw.c +1 -0
index 4e7a0810eaeb..2120dacfd55c 100644
@@ -139,6 +139,7 @@ static void e1000_phy_init_script(struct e1000_hw *hw)
 		 * at the end of this routine.
 		 */
 		ret_val = e1000_read_phy_reg(hw, 0x2F5B, &phy_saved_data);
+		e_dbg("Reading PHY register 0x2F5B failed: %d\n", ret_val);
 

Adding this debug statement seems unrelated.

Adding the debug statement does make ret_val become used, but yea it could have been called out in the commit message.

Quoted 8 lines

drivers/net/ethernet/intel/e1000/e1000_hw.c static void e1000_phy_init_script(struct e1000_hw *hw) · line 145

Quoted 3 lines
drivers/net/ethernet/intel/e1000/e1000_hw.c +0 -0
 		/* Disabled the PHY transmitter */
 		e1000_write_phy_reg(hw, 0x2F5B, 0x0003);

Apart from this,

#11 lore raw

Re: [Intel-wired-lan] [RFC PATCH net-next v1 05/11] intel-ethernet: make W=1 build cleanly

In reply to Vinicius Costa Gomes
Quoted 4 lines · Vinicius Costa Gomes
Quoted 4 lines
drivers/net/ethernet/intel/e1000/e1000_hw.c +0 -0
index 4e7a0810eaeb..2120dacfd55c 100644
Quoted 8 lines

drivers/net/ethernet/intel/e1000/e1000_hw.c static void e1000_phy_init_script(struct e1000_hw *hw) · line 143

Quoted 6 lines
drivers/net/ethernet/intel/e1000/e1000_hw.c +1 -0
@@ -139,6 +139,7 @@ static void e1000_phy_init_script(struct e1000_hw *hw)
 		 * at the end of this routine.
 		 */
 		ret_val = e1000_read_phy_reg(hw, 0x2F5B, &phy_saved_data);
+		e_dbg("Reading PHY register 0x2F5B failed: %d\n", ret_val);
 

Adding this debug statement seems unrelated.

Thanks, in the next version I actually addressed this in the commit message, that this one change was to solve the "you didn't use ret_val" with a conceivably useful message. I also rejiggered the patches to have the register read lvalue removals all in their own patch instead of squashed together with kdoc changes.

Quoted 8 lines

drivers/net/ethernet/intel/e1000/e1000_hw.c static void e1000_phy_init_script(struct e1000_hw *hw) · line 145

Quoted 3 lines
drivers/net/ethernet/intel/e1000/e1000_hw.c +0 -0
 		/* Disabled the PHY transmitter */
 		e1000_write_phy_reg(hw, 0x2F5B, 0x0003);

Apart from this,

Thanks for the review!

#12 lore raw

RFC PATCH 6/11 drivers/net/ethernet: clean up unused assignments

In reply to Jesse Brandeburg

As part of the W=1 compliation series, these lines all created warnings about unused variables that were assigned a value. Most of them are from register reads, but some are just picking up a return value from a function and never doing anything with it.

The register reads should be OK, because the current implementation of readl and friends will always execute even without an lvalue.

When it makes sense, just remove the lvalue assignment and the local. Other times, just remove the offending code, and occasionally, just mark the variable as maybe unused since it could be used in an ifdef or debug scenario.

Only compile tested with W=1 and an allyesconfig with all the network drivers turned into modules (to try to test all options).

---
 drivers/net/ethernet/brocade/bna/bnad.c       |  7 ++--
 .../net/ethernet/cavium/liquidio/lio_main.c   |  4 +--
 .../ethernet/cavium/liquidio/octeon_device.c  | 13 ++++----
 drivers/net/ethernet/cortina/gemini.c         |  6 ++--
 drivers/net/ethernet/dec/tulip/de4x5.c        |  4 +--
 drivers/net/ethernet/dec/tulip/media.c        |  5 ---
 drivers/net/ethernet/dnet.c                   |  8 ++---
 drivers/net/ethernet/freescale/fec_ptp.c      |  3 +-
 drivers/net/ethernet/marvell/mvneta.c         |  7 ++--
 drivers/net/ethernet/marvell/pxa168_eth.c     |  3 +-
 drivers/net/ethernet/mellanox/mlx4/en_tx.c    |  2 +-
 drivers/net/ethernet/micrel/ksz884x.c         | 13 +++-----
 drivers/net/ethernet/microchip/lan743x_main.c |  9 ++----
 drivers/net/ethernet/neterion/vxge/vxge-reg.h |  4 +--
 .../net/ethernet/neterion/vxge/vxge-traffic.c | 32 +++++++------------
 .../ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c   |  3 +-
 drivers/net/ethernet/sfc/falcon/farch.c       | 29 +++++++----------
 drivers/net/ethernet/sis/sis900.c             |  5 ++-
 .../net/ethernet/stmicro/stmmac/stmmac_main.c |  4 +--
 .../net/ethernet/synopsys/dwc-xlgmac-common.c |  2 +-
 drivers/net/ethernet/ti/cpsw_new.c            |  2 --
 drivers/net/ethernet/ti/davinci_emac.c        |  5 ++-
 drivers/net/ethernet/ti/tlan.c                |  4 +--
 drivers/net/ethernet/via/via-velocity.c       | 13 --------
 24 files changed, 65 insertions(+), 122 deletions(-)
drivers/net/ethernet/brocade/bna/bnad.c +2 -5
index cc80bbbefe87..7e4e831d720f 100644
@@ -3277,7 +3277,7 @@ bnad_change_mtu(struct net_device *netdev, int new_mtu)
 {
 	int err, mtu;
 	struct bnad *bnad = netdev_priv(netdev);
-	u32 rx_count = 0, frame, new_frame;
+	u32 frame, new_frame;
 
 	mutex_lock(&bnad->conf_mutex);
 
@@ -3293,12 +3293,9 @@ bnad_change_mtu(struct net_device *netdev, int new_mtu)
 		/* only when transition is over 4K */
 		if ((frame <= 4096 && new_frame > 4096) ||
 		    (frame > 4096 && new_frame <= 4096))
-			rx_count = bnad_reinit_rx(bnad);
+			bnad_reinit_rx(bnad);
 	}
 
-	/* rx_count > 0 - new rx created
-	 *	- Linux set err = 0 and return
-	 */
 	err = bnad_mtu_set(bnad, new_frame);
 	if (err)
 		err = -EBUSY;
drivers/net/ethernet/cavium/liquidio/lio_main.c +2 -2
index 8e0ed01e7f03..737ae69eec6e 100644
@@ -1,4 +1,4 @@
-/**********************************************************************
+/*
  * Author: Cavium, Inc.
  *
  * Contact: support at cavium.com
@@ -14,7 +14,7 @@
  * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty
  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or
  * NONINFRINGEMENT.  See the GNU General Public License for more details.
- ***********************************************************************/
+ */
 #include <linux/module.h>
 #include <linux/interrupt.h>
 #include <linux/pci.h>
drivers/net/ethernet/cavium/liquidio/octeon_device.c +6 -7
index ac32facaa427..1db29ffde3e5 100644
@@ -1,4 +1,4 @@
-/**********************************************************************
+/*
  * Author: Cavium, Inc.
  *
  * Contact: support at cavium.com
@@ -14,7 +14,7 @@
  * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty
  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or
  * NONINFRINGEMENT.  See the GNU General Public License for more details.
- ***********************************************************************/
+ */
 #include <linux/pci.h>
 #include <linux/netdevice.h>
 #include <linux/vmalloc.h>
@@ -1324,7 +1324,7 @@ u64 lio_pci_readq(struct octeon_device *oct, u64 addr)
 {
 	u64 val64;
 	unsigned long flags;
-	u32 val32, addrhi;
+	u32 addrhi;
 
 	spin_lock_irqsave(&oct->pci_win_lock, flags);
 
@@ -1339,10 +1339,10 @@ u64 lio_pci_readq(struct octeon_device *oct, u64 addr)
 	writel(addrhi, oct->reg_list.pci_win_rd_addr_hi);
 
 	/* Read back to preserve ordering of writes */
-	val32 = readl(oct->reg_list.pci_win_rd_addr_hi);
+	readl(oct->reg_list.pci_win_rd_addr_hi);
 
 	writel(addr & 0xffffffff, oct->reg_list.pci_win_rd_addr_lo);
-	val32 = readl(oct->reg_list.pci_win_rd_addr_lo);
+	readl(oct->reg_list.pci_win_rd_addr_lo);
 
 	val64 = readq(oct->reg_list.pci_win_rd_data);
 
@@ -1355,7 +1355,6 @@ void lio_pci_writeq(struct octeon_device *oct,
 		    u64 val,
 		    u64 addr)
 {
-	u32 val32;
 	unsigned long flags;
 
 	spin_lock_irqsave(&oct->pci_win_lock, flags);
@@ -1365,7 +1364,7 @@ void lio_pci_writeq(struct octeon_device *oct,
 	/* The write happens when the LSB is written. So write MSB first. */
 	writel(val >> 32, oct->reg_list.pci_win_wr_data_hi);
 	/* Read the MSB to ensure ordering of writes. */
-	val32 = readl(oct->reg_list.pci_win_wr_data_hi);
+	readl(oct->reg_list.pci_win_wr_data_hi);
 
 	writel(val & 0xffffffff, oct->reg_list.pci_win_wr_data_lo);
 
drivers/net/ethernet/cortina/gemini.c +2 -4
index 9dcf47f576c6..07e9dee03c98 100644
@@ -509,7 +509,6 @@ static int gmac_init(struct net_device *netdev)
 		.rel_threshold = 0,
 	} };
 	union gmac_config0 tmp;
-	u32 val;
 
 	config0.bits.max_len = gmac_pick_rx_max_len(netdev->mtu);
 	tmp.bits32 = readl(port->gmac_base + GMAC_CONFIG0);
@@ -519,7 +518,7 @@ static int gmac_init(struct net_device *netdev)
 	writel(config2.bits32, port->gmac_base + GMAC_CONFIG2);
 	writel(config3.bits32, port->gmac_base + GMAC_CONFIG3);
 
-	val = readl(port->dma_base + GMAC_AHB_WEIGHT_REG);
+	readl(port->dma_base + GMAC_AHB_WEIGHT_REG);
 	writel(ahb_weight.bits32, port->dma_base + GMAC_AHB_WEIGHT_REG);
 
 	writel(hw_weigh.bits32,
@@ -2107,9 +2106,8 @@ static void gmac_get_ringparam(struct net_device *netdev,
 			       struct ethtool_ringparam *rp)
 {
 	struct gemini_ethernet_port *port = netdev_priv(netdev);
-	union gmac_config0 config0;
 
-	config0.bits32 = readl(port->gmac_base + GMAC_CONFIG0);
+	readl(port->gmac_base + GMAC_CONFIG0);
 
 	rp->rx_max_pending = 1 << 15;
 	rp->rx_mini_max_pending = 0;
drivers/net/ethernet/dec/tulip/de4x5.c +2 -2
index f9dd1aa9f2da..683e328b5461 100644
@@ -4925,11 +4925,11 @@ mii_get_oui(u_char phyaddr, u_long ioaddr)
 	u_char breg[2];
     } a;
     int i, r2, r3, ret=0;*/
-    int r2, r3;
+    int r2;
 
     /* Read r2 and r3 */
     r2 = mii_rd(MII_ID0, phyaddr, ioaddr);
-    r3 = mii_rd(MII_ID1, phyaddr, ioaddr);
+    mii_rd(MII_ID1, phyaddr, ioaddr);
                                                 /* SEEQ and Cypress way * /
     / * Shuffle r2 and r3 * /
     a.reg=0;
drivers/net/ethernet/dec/tulip/media.c +0 -5
index dcf21a36a9cf..011604787b8e 100644
@@ -319,13 +319,8 @@ void tulip_select_media(struct net_device *dev, int startup)
 			break;
 		}
 		case 5: case 6: {
-			u16 setup[5];
-
 			new_csr6 = 0; /* FIXME */
 
-			for (i = 0; i < 5; i++)
-				setup[i] = get_u16(&p[i*2 + 1]);
-
 			if (startup && mtable->has_reset) {
 				struct medialeaf *rleaf = &mtable->mleaf[mtable->has_reset];
 				unsigned char *rst = rleaf->leafdata;
drivers/net/ethernet/dnet.c +4 -4
index 3143df9a398c..48c6eb142dcc 100644
@@ -507,12 +507,12 @@ static netdev_tx_t dnet_start_xmit(struct sk_buff *skb, struct net_device *dev)
 {
 
 	struct dnet *bp = netdev_priv(dev);
-	u32 tx_status, irq_enable;
 	unsigned int i, tx_cmd, wrsz;
 	unsigned long flags;
 	unsigned int *bufp;
+	u32 irq_enable;
 
-	tx_status = dnet_readl(bp, TX_STATUS);
+	dnet_readl(bp, TX_STATUS);
 
 	pr_debug("start_xmit: len %u head %p data %p\n",
 	       skb->len, skb->head, skb->data);
@@ -520,7 +520,7 @@ static netdev_tx_t dnet_start_xmit(struct sk_buff *skb, struct net_device *dev)
 
 	spin_lock_irqsave(&bp->lock, flags);
 
-	tx_status = dnet_readl(bp, TX_STATUS);
+	dnet_readl(bp, TX_STATUS);
 
 	bufp = (unsigned int *)(((unsigned long) skb->data) & ~0x3UL);
 	wrsz = (u32) skb->len + 3;
@@ -542,7 +542,7 @@ static netdev_tx_t dnet_start_xmit(struct sk_buff *skb, struct net_device *dev)
 
 	if (dnet_readl(bp, TX_FIFO_WCNT) > DNET_FIFO_TX_DATA_AF_TH) {
 		netif_stop_queue(dev);
-		tx_status = dnet_readl(bp, INTR_SRC);
+		dnet_readl(bp, INTR_SRC);
 		irq_enable = dnet_readl(bp, INTR_ENB);
 		irq_enable |= DNET_INTR_ENB_TX_FIFOAE;
 		dnet_writel(bp, irq_enable, INTR_ENB);
drivers/net/ethernet/freescale/fec_ptp.c +1 -2
index a0c1f4410306..0405a3975f3f 100644
@@ -520,13 +520,12 @@ static void fec_time_keep(struct work_struct *work)
 {
 	struct delayed_work *dwork = to_delayed_work(work);
 	struct fec_enet_private *fep = container_of(dwork, struct fec_enet_private, time_keep);
-	u64 ns;
 	unsigned long flags;
 
 	mutex_lock(&fep->ptp_clk_mutex);
 	if (fep->ptp_clk_on) {
 		spin_lock_irqsave(&fep->tmreg_lock, flags);
-		ns = timecounter_read(&fep->tc);
+		timecounter_read(&fep->tc);
 		spin_unlock_irqrestore(&fep->tmreg_lock, flags);
 	}
 	mutex_unlock(&fep->ptp_clk_mutex);
drivers/net/ethernet/marvell/mvneta.c +3 -4
index f75e05e899bb..4694242b7b3b 100644
@@ -751,13 +751,12 @@ static void mvneta_txq_inc_put(struct mvneta_tx_queue *txq)
 static void mvneta_mib_counters_clear(struct mvneta_port *pp)
 {
 	int i;
-	u32 dummy;
 
 	/* Perform dummy reads from MIB counters */
 	for (i = 0; i < MVNETA_MIB_LATE_COLLISION; i += 4)
-		dummy = mvreg_read(pp, (MVNETA_MIB_COUNTERS_BASE + i));
-	dummy = mvreg_read(pp, MVNETA_RX_DISCARD_FRAME_COUNT);
-	dummy = mvreg_read(pp, MVNETA_OVERRUN_FRAME_COUNT);
+		mvreg_read(pp, (MVNETA_MIB_COUNTERS_BASE + i));
+	mvreg_read(pp, MVNETA_RX_DISCARD_FRAME_COUNT);
+	mvreg_read(pp, MVNETA_OVERRUN_FRAME_COUNT);
 }
 
 /* Get System Network Statistics */
drivers/net/ethernet/marvell/pxa168_eth.c +1 -2
index faac94b2d5ff..d1e4d42e497d 100644
@@ -1187,11 +1187,10 @@ static int pxa168_eth_stop(struct net_device *dev)
 
 static int pxa168_eth_change_mtu(struct net_device *dev, int mtu)
 {
-	int retval;
 	struct pxa168_eth_private *pep = netdev_priv(dev);
 
 	dev->mtu = mtu;
-	retval = set_port_config_ext(pep);
+	set_port_config_ext(pep);
 
 	if (!netif_running(dev))
 		return 0;
drivers/net/ethernet/mellanox/mlx4/en_tx.c +1 -1
index 9dff7b086c9f..f69ff7fbf619 100644
@@ -842,6 +842,7 @@ netdev_tx_t mlx4_en_xmit(struct sk_buff *skb, struct net_device *dev)
 	struct mlx4_en_tx_desc *tx_desc;
 	struct mlx4_wqe_data_seg *data;
 	struct mlx4_en_tx_info *tx_info;
+	u32 __maybe_unused ring_cons;
 	int tx_ind;
 	int nr_txbb;
 	int desc_size;
@@ -855,7 +856,6 @@ netdev_tx_t mlx4_en_xmit(struct sk_buff *skb, struct net_device *dev)
 	bool stop_queue;
 	bool inline_ok;
 	u8 data_offset;
-	u32 ring_cons;
 	bool bf_ok;
 
 	tx_ind = skb_get_queue_mapping(skb);
drivers/net/ethernet/micrel/ksz884x.c +5 -8
index bb646b65cc95..c84a1e8c918b 100644
@@ -1649,8 +1649,7 @@ static inline void set_tx_len(struct ksz_desc *desc, u32 len)
 
 #define HW_DELAY(hw, reg)			\
 	do {					\
-		u16 dummy;			\
-		dummy = readw(hw->io + reg);	\
+		readw(hw->io + reg);		\
 	} while (0)
 
 /**
@@ -4978,7 +4977,6 @@ static inline int rx_proc(struct net_device *dev, struct ksz_hw* hw,
 	struct dev_info *hw_priv = priv->adapter;
 	struct ksz_dma_buf *dma_buf;
 	struct sk_buff *skb;
-	int rx_status;
 
 	/* Received length includes 4-byte CRC. */
 	packet_len = status.rx.frame_len - 4;
@@ -5014,7 +5012,7 @@ static inline int rx_proc(struct net_device *dev, struct ksz_hw* hw,
 	dev->stats.rx_bytes += packet_len;
 
 	/* Notify upper layer for received packet. */
-	rx_status = netif_rx(skb);
+	netif_rx(skb);
 
 	return 0;
 }
@@ -6509,7 +6507,6 @@ static void netdev_get_ethtool_stats(struct net_device *dev,
 	int i;
 	int n;
 	int p;
-	int rc;
 	u64 counter[TOTAL_PORT_COUNTER_NUM];
 
 	mutex_lock(&hw_priv->lock);
@@ -6530,19 +6527,19 @@ static void netdev_get_ethtool_stats(struct net_device *dev,
 
 	if (1 == port->mib_port_cnt && n < SWITCH_PORT_NUM) {
 		p = n;
-		rc = wait_event_interruptible_timeout(
+		wait_event_interruptible_timeout(
 			hw_priv->counter[p].counter,
 			2 == hw_priv->counter[p].read,
 			HZ * 1);
 	} else
 		for (i = 0, p = n; i < port->mib_port_cnt - n; i++, p++) {
 			if (0 == i) {
-				rc = wait_event_interruptible_timeout(
+				wait_event_interruptible_timeout(
 					hw_priv->counter[p].counter,
 					2 == hw_priv->counter[p].read,
 					HZ * 2);
 			} else if (hw->port_mib[p].cnt_ptr) {
-				rc = wait_event_interruptible_timeout(
+				wait_event_interruptible_timeout(
 					hw_priv->counter[p].counter,
 					2 == hw_priv->counter[p].read,
 					HZ * 1);
drivers/net/ethernet/microchip/lan743x_main.c +3 -6
index de93cc6ebc1a..4561021a5b1a 100644
@@ -158,9 +158,8 @@ static void lan743x_tx_isr(void *context, u32 int_sts, u32 flags)
 	struct lan743x_tx *tx = context;
 	struct lan743x_adapter *adapter = tx->adapter;
 	bool enable_flag = true;
-	u32 int_en = 0;
 
-	int_en = lan743x_csr_read(adapter, INT_EN_SET);
+	lan743x_csr_read(adapter, INT_EN_SET);
 	if (flags & LAN743X_VECTOR_FLAG_SOURCE_ENABLE_CLEAR) {
 		lan743x_csr_write(adapter, INT_EN_CLR,
 				  INT_BIT_DMA_TX_(tx->channel_number));
@@ -1699,10 +1698,9 @@ static int lan743x_tx_napi_poll(struct napi_struct *napi, int weight)
 	bool start_transmitter = false;
 	unsigned long irq_flags = 0;
 	u32 ioc_bit = 0;
-	u32 int_sts = 0;
 
 	ioc_bit = DMAC_INT_BIT_TX_IOC_(tx->channel_number);
-	int_sts = lan743x_csr_read(adapter, DMAC_INT_STS);
+	lan743x_csr_read(adapter, DMAC_INT_STS);
 	if (tx->vector_flags & LAN743X_VECTOR_FLAG_SOURCE_STATUS_W2C)
 		lan743x_csr_write(adapter, DMAC_INT_STS, ioc_bit);
 	spin_lock_irqsave(&tx->ring_lock, irq_flags);
@@ -3038,7 +3036,6 @@ static int lan743x_pm_suspend(struct device *dev)
 	struct pci_dev *pdev = to_pci_dev(dev);
 	struct net_device *netdev = pci_get_drvdata(pdev);
 	struct lan743x_adapter *adapter = netdev_priv(netdev);
-	int ret;
 
 	lan743x_pcidev_shutdown(pdev);
 
@@ -3051,7 +3048,7 @@ static int lan743x_pm_suspend(struct device *dev)
 		lan743x_pm_set_wol(adapter);
 
 	/* Host sets PME_En, put D3hot */
-	ret = pci_prepare_to_sleep(pdev);
+	pci_prepare_to_sleep(pdev);
 
 	return 0;
 }
drivers/net/ethernet/neterion/vxge/vxge-reg.h +2 -2
index 3e658b175947..3bb03b9c39b7 100644
@@ -1,4 +1,4 @@
-/******************************************************************************
+/*
  * This software may be used and distributed according to the terms of
  * the GNU General Public License (GPL), incorporated herein by reference.
  * Drivers based on or derived from this code fall under the GPL and must
@@ -10,7 +10,7 @@
  * vxge-reg.h: Driver for Exar Corp's X3100 Series 10GbE PCIe I/O Virtualized
  *             Server Adapter.
  * Copyright(c) 2002-2010 Exar Corp.
- ******************************************************************************/
+ */
 #ifndef VXGE_REG_H
 #define VXGE_REG_H
 
drivers/net/ethernet/neterion/vxge/vxge-traffic.c +11 -21
index 709d20d9938f..bd525e8eda10 100644
@@ -30,8 +30,6 @@
  */
 enum vxge_hw_status vxge_hw_vpath_intr_enable(struct __vxge_hw_vpath_handle *vp)
 {
-	u64 val64;
-
 	struct __vxge_hw_virtualpath *vpath;
 	struct vxge_hw_vpath_reg __iomem *vp_reg;
 	enum vxge_hw_status status = VXGE_HW_OK;
@@ -84,7 +82,7 @@ enum vxge_hw_status vxge_hw_vpath_intr_enable(struct __vxge_hw_vpath_handle *vp)
 	__vxge_hw_pio_mem_write32_upper((u32)VXGE_HW_INTR_MASK_ALL,
 			&vp_reg->xgmac_vp_int_status);
 
-	val64 = readq(&vp_reg->vpath_general_int_status);
+	readq(&vp_reg->vpath_general_int_status);
 
 	/* Mask unwanted interrupts */
 
@@ -157,8 +155,6 @@ enum vxge_hw_status vxge_hw_vpath_intr_enable(struct __vxge_hw_vpath_handle *vp)
 enum vxge_hw_status vxge_hw_vpath_intr_disable(
 			struct __vxge_hw_vpath_handle *vp)
 {
-	u64 val64;
-
 	struct __vxge_hw_virtualpath *vpath;
 	enum vxge_hw_status status = VXGE_HW_OK;
 	struct vxge_hw_vpath_reg __iomem *vp_reg;
@@ -179,8 +175,6 @@ enum vxge_hw_status vxge_hw_vpath_intr_disable(
 		(u32)VXGE_HW_INTR_MASK_ALL,
 		&vp_reg->vpath_general_int_mask);
 
-	val64 = VXGE_HW_TIM_CLR_INT_EN_VP(1 << (16 - vpath->vp_id));
-
 	writeq(VXGE_HW_INTR_MASK_ALL, &vp_reg->kdfcctl_errors_mask);
 
 	__vxge_hw_pio_mem_write32_upper((u32)VXGE_HW_INTR_MASK_ALL,
@@ -487,9 +481,7 @@ void vxge_hw_device_unmask_all(struct __vxge_hw_device *hldev)
  */
 void vxge_hw_device_flush_io(struct __vxge_hw_device *hldev)
 {
-	u32 val32;
-
-	val32 = readl(&hldev->common_reg->titan_general_int_status);
+	readl(&hldev->common_reg->titan_general_int_status);
 }
 
 /**
@@ -1716,8 +1708,8 @@ void vxge_hw_fifo_txdl_free(struct __vxge_hw_fifo *fifo, void *txdlh)
 enum vxge_hw_status
 vxge_hw_vpath_mac_addr_add(
 	struct __vxge_hw_vpath_handle *vp,
-	u8 (macaddr)[ETH_ALEN],
-	u8 (macaddr_mask)[ETH_ALEN],
+	u8 *macaddr,
+	u8 *macaddr_mask,
 	enum vxge_hw_vpath_mac_addr_add_mode duplicate_mode)
 {
 	u32 i;
@@ -1779,8 +1771,8 @@ vxge_hw_vpath_mac_addr_add(
 enum vxge_hw_status
 vxge_hw_vpath_mac_addr_get(
 	struct __vxge_hw_vpath_handle *vp,
-	u8 (macaddr)[ETH_ALEN],
-	u8 (macaddr_mask)[ETH_ALEN])
+	u8 *macaddr,
+	u8 *macaddr_mask)
 {
 	u32 i;
 	u64 data1 = 0ULL;
@@ -1831,8 +1823,8 @@ vxge_hw_vpath_mac_addr_get(
 enum vxge_hw_status
 vxge_hw_vpath_mac_addr_get_next(
 	struct __vxge_hw_vpath_handle *vp,
-	u8 (macaddr)[ETH_ALEN],
-	u8 (macaddr_mask)[ETH_ALEN])
+	u8 *macaddr,
+	u8 *macaddr_mask)
 {
 	u32 i;
 	u64 data1 = 0ULL;
@@ -1884,8 +1876,8 @@ vxge_hw_vpath_mac_addr_get_next(
 enum vxge_hw_status
 vxge_hw_vpath_mac_addr_delete(
 	struct __vxge_hw_vpath_handle *vp,
-	u8 (macaddr)[ETH_ALEN],
-	u8 (macaddr_mask)[ETH_ALEN])
+	u8 *macaddr,
+	u8 *macaddr_mask)
 {
 	u32 i;
 	u64 data1 = 0ULL;
@@ -2375,7 +2367,6 @@ enum vxge_hw_status vxge_hw_vpath_poll_rx(struct __vxge_hw_ring *ring)
 	u8 t_code;
 	enum vxge_hw_status status = VXGE_HW_OK;
 	void *first_rxdh;
-	u64 val64 = 0;
 	int new_count = 0;
 
 	ring->cmpl_cnt = 0;
@@ -2403,8 +2394,7 @@ enum vxge_hw_status vxge_hw_vpath_poll_rx(struct __vxge_hw_ring *ring)
 			}
 			writeq(VXGE_HW_PRC_RXD_DOORBELL_NEW_QW_CNT(new_count),
 				&ring->vp_reg->prc_rxd_doorbell);
-			val64 =
-			  readl(&ring->common_reg->titan_general_int_status);
+			readl(&ring->common_reg->titan_general_int_status);
 			ring->doorbell_cnt = 0;
 		}
 	}
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c +1 -2
index 29b9c728a65e..fc490881cd03 100644
@@ -658,11 +658,10 @@ int qlcnic_83xx_cam_lock(struct qlcnic_adapter *adapter)
 void qlcnic_83xx_cam_unlock(struct qlcnic_adapter *adapter)
 {
 	void __iomem *addr;
-	u32 val;
 	struct qlcnic_hardware_context *ahw = adapter->ahw;
 
 	addr = ahw->pci_base0 + QLC_83XX_SEM_UNLOCK_FUNC(ahw->pci_func);
-	val = readl(addr);
+	readl(addr);
 }
 
 void qlcnic_83xx_read_crb(struct qlcnic_adapter *adapter, char *buf,
drivers/net/ethernet/sfc/falcon/farch.c +11 -18
index fa1ade856b10..2c91792cec01 100644
@@ -870,17 +870,12 @@ static u16 ef4_farch_handle_rx_not_ok(struct ef4_rx_queue *rx_queue,
 {
 	struct ef4_channel *channel = ef4_rx_queue_channel(rx_queue);
 	struct ef4_nic *efx = rx_queue->efx;
-	bool rx_ev_buf_owner_id_err, rx_ev_ip_hdr_chksum_err;
+	bool __maybe_unused rx_ev_buf_owner_id_err, rx_ev_ip_hdr_chksum_err;
 	bool rx_ev_tcp_udp_chksum_err, rx_ev_eth_crc_err;
 	bool rx_ev_frm_trunc, rx_ev_drib_nib, rx_ev_tobe_disc;
-	bool rx_ev_other_err, rx_ev_pause_frm;
-	bool rx_ev_hdr_type, rx_ev_mcast_pkt;
-	unsigned rx_ev_pkt_type;
+	bool rx_ev_pause_frm;
 
-	rx_ev_hdr_type = EF4_QWORD_FIELD(*event, FSF_AZ_RX_EV_HDR_TYPE);
-	rx_ev_mcast_pkt = EF4_QWORD_FIELD(*event, FSF_AZ_RX_EV_MCAST_PKT);
 	rx_ev_tobe_disc = EF4_QWORD_FIELD(*event, FSF_AZ_RX_EV_TOBE_DISC);
-	rx_ev_pkt_type = EF4_QWORD_FIELD(*event, FSF_AZ_RX_EV_PKT_TYPE);
 	rx_ev_buf_owner_id_err = EF4_QWORD_FIELD(*event,
 						 FSF_AZ_RX_EV_BUF_OWNER_ID_ERR);
 	rx_ev_ip_hdr_chksum_err = EF4_QWORD_FIELD(*event,
@@ -893,10 +888,6 @@ static u16 ef4_farch_handle_rx_not_ok(struct ef4_rx_queue *rx_queue,
 			  0 : EF4_QWORD_FIELD(*event, FSF_AA_RX_EV_DRIB_NIB));
 	rx_ev_pause_frm = EF4_QWORD_FIELD(*event, FSF_AZ_RX_EV_PAUSE_FRM_ERR);
 
-	/* Every error apart from tobe_disc and pause_frm */
-	rx_ev_other_err = (rx_ev_drib_nib | rx_ev_tcp_udp_chksum_err |
-			   rx_ev_buf_owner_id_err | rx_ev_eth_crc_err |
-			   rx_ev_frm_trunc | rx_ev_ip_hdr_chksum_err);
 
 	/* Count errors that are not in MAC stats.  Ignore expected
 	 * checksum errors during self-test. */
@@ -916,6 +907,13 @@ static u16 ef4_farch_handle_rx_not_ok(struct ef4_rx_queue *rx_queue,
 	 * to a FIFO overflow.
 	 */
 #ifdef DEBUG
+	{
+	/* Every error apart from tobe_disc and pause_frm */
+
+	bool rx_ev_other_err = (rx_ev_drib_nib | rx_ev_tcp_udp_chksum_err |
+				rx_ev_buf_owner_id_err | rx_ev_eth_crc_err |
+				rx_ev_frm_trunc | rx_ev_ip_hdr_chksum_err);
+
 	if (rx_ev_other_err && net_ratelimit()) {
 		netif_dbg(efx, rx_err, efx->net_dev,
 			  " RX queue %d unexpected RX event "
@@ -932,6 +930,7 @@ static u16 ef4_farch_handle_rx_not_ok(struct ef4_rx_queue *rx_queue,
 			  rx_ev_tobe_disc ? " [TOBE_DISC]" : "",
 			  rx_ev_pause_frm ? " [PAUSE]" : "");
 	}
+	}
 #endif
 
 	/* The frame must be discarded if any of these are true. */
@@ -1643,15 +1642,11 @@ void ef4_farch_rx_push_indir_table(struct ef4_nic *efx)
  */
 void ef4_farch_dimension_resources(struct ef4_nic *efx, unsigned sram_lim_qw)
 {
-	unsigned vi_count, buftbl_min;
+	unsigned vi_count;
 
 	/* Account for the buffer table entries backing the datapath channels
 	 * and the descriptor caches for those channels.
 	 */
-	buftbl_min = ((efx->n_rx_channels * EF4_MAX_DMAQ_SIZE +
-		       efx->n_tx_channels * EF4_TXQ_TYPES * EF4_MAX_DMAQ_SIZE +
-		       efx->n_channels * EF4_MAX_EVQ_SIZE)
-		      * sizeof(ef4_qword_t) / EF4_BUF_SIZE);
 	vi_count = max(efx->n_channels, efx->n_tx_channels * EF4_TXQ_TYPES);
 
 	efx->tx_dc_base = sram_lim_qw - vi_count * TX_DC_ENTRIES;
@@ -2532,7 +2527,6 @@ int ef4_farch_filter_remove_safe(struct ef4_nic *efx,
 	enum ef4_farch_filter_table_id table_id;
 	struct ef4_farch_filter_table *table;
 	unsigned int filter_idx;
-	struct ef4_farch_filter_spec *spec;
 	int rc;
 
 	table_id = ef4_farch_filter_id_table_id(filter_id);
@@ -2543,7 +2537,6 @@ int ef4_farch_filter_remove_safe(struct ef4_nic *efx,
 	filter_idx = ef4_farch_filter_id_index(filter_id);
 	if (filter_idx >= table->size)
 		return -ENOENT;
-	spec = &table->spec[filter_idx];
 
 	spin_lock_bh(&efx->filter_lock);
 	rc = ef4_farch_filter_remove(efx, table, filter_idx, priority);
drivers/net/ethernet/sis/sis900.c +2 -3
index cfa460c7db23..869b7618e2ba 100644
@@ -789,10 +789,9 @@ static u16 sis900_default_phy(struct net_device * net_dev)
 static void sis900_set_capability(struct net_device *net_dev, struct mii_phy *phy)
 {
 	u16 cap;
-	u16 status;
 
-	status = mdio_read(net_dev, phy->phy_addr, MII_STATUS);
-	status = mdio_read(net_dev, phy->phy_addr, MII_STATUS);
+	mdio_read(net_dev, phy->phy_addr, MII_STATUS);
+	mdio_read(net_dev, phy->phy_addr, MII_STATUS);
 
 	cap = MII_NWAY_CSMA_CD |
 		((phy->status & MII_STAT_CAN_TX_FDX)? MII_NWAY_TX_FDX:0) |
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +2 -2
index c553047ff482..3fa24b310d20 100644
@@ -3630,15 +3630,15 @@ static unsigned int stmmac_rx_buf1_len(struct stmmac_priv *priv,
 				       struct dma_desc *p,
 				       int status, unsigned int len)
 {
-	int ret, coe = priv->hw->rx_csum;
 	unsigned int plen = 0, hlen = 0;
+	int coe = priv->hw->rx_csum;
 
 	/* Not first descriptor, buffer is always zero */
 	if (priv->sph && len)
 		return 0;
 
 	/* First descriptor, get split header length */
-	ret = stmmac_get_rx_header_len(priv, p, &hlen);
+	stmmac_get_rx_header_len(priv, p, &hlen);
 	if (priv->sph && hlen) {
 		priv->xstats.rx_split_hdr_pkt_n++;
 		return hlen;
drivers/net/ethernet/synopsys/dwc-xlgmac-common.c +1 -1
index eb1c6b03c329..df26cea45904 100644
@@ -513,7 +513,7 @@ void xlgmac_get_all_hw_features(struct xlgmac_pdata *pdata)
 
 void xlgmac_print_all_hw_features(struct xlgmac_pdata *pdata)
 {
-	char *str = NULL;
+	char __maybe_unused *str = NULL;
 
 	XLGMAC_PR("\n");
 	XLGMAC_PR("=====================================================\n");
drivers/net/ethernet/ti/cpsw_new.c +0 -2
index 8ed78577cded..f62f7fa7edae 100644
@@ -1660,12 +1660,10 @@ static int cpsw_dl_switch_mode_set(struct devlink *dl, u32 id,
 		for (i = 0; i < cpsw->data.slaves; i++) {
 			struct cpsw_slave *slave = &cpsw->slaves[i];
 			struct net_device *sl_ndev = slave->ndev;
-			struct cpsw_priv *priv;
 
 			if (!sl_ndev)
 				continue;
 
-			priv = netdev_priv(sl_ndev);
 			if (switch_en)
 				vlan = cpsw->data.default_vlan;
 			else
drivers/net/ethernet/ti/davinci_emac.c +2 -3
index de282531f68b..b36d0e412d23 100644
@@ -1227,7 +1227,7 @@ static int emac_poll(struct napi_struct *napi, int budget)
 	struct net_device *ndev = priv->ndev;
 	struct device *emac_dev = &ndev->dev;
 	u32 status = 0;
-	u32 num_tx_pkts = 0, num_rx_pkts = 0;
+	u32 num_rx_pkts = 0;
 
 	/* Check interrupt vectors and call packet processing */
 	status = emac_read(EMAC_MACINVECTOR);
@@ -1238,8 +1238,7 @@ static int emac_poll(struct napi_struct *napi, int budget)
 		mask = EMAC_DM646X_MAC_IN_VECTOR_TX_INT_VEC;
 
 	if (status & mask) {
-		num_tx_pkts = cpdma_chan_process(priv->txchan,
-					      EMAC_DEF_TX_MAX_SERVICE);
+		cpdma_chan_process(priv->txchan, EMAC_DEF_TX_MAX_SERVICE);
 	} /* TX processing */
 
 	mask = EMAC_DM644X_MAC_IN_VECTOR_RX_INT_VEC;
drivers/net/ethernet/ti/tlan.c +1 -3
index 76a342ea3797..c7a6af632654 100644
@@ -654,7 +654,6 @@ module_exit(tlan_exit);
 static void  __init tlan_eisa_probe(void)
 {
 	long	ioaddr;
-	int	rc = -ENODEV;
 	int	irq;
 	u16	device_id;
 
@@ -719,8 +718,7 @@ static void  __init tlan_eisa_probe(void)
 
 
 		/* Setup the newly found eisa adapter */
-		rc = tlan_probe1(NULL, ioaddr, irq,
-				 12, NULL);
+		tlan_probe1(NULL, ioaddr, irq, 12, NULL);
 		continue;
 
 out:
drivers/net/ethernet/via/via-velocity.c +0 -13
index 6d2a31488a74..722b44604ea8 100644
@@ -877,26 +877,13 @@ static u32 check_connection_type(struct mac_regs __iomem *regs)
  */
 static int velocity_set_media_mode(struct velocity_info *vptr, u32 mii_status)
 {
-	u32 curr_status;
 	struct mac_regs __iomem *regs = vptr->mac_regs;
 
 	vptr->mii_status = mii_check_media_mode(vptr->mac_regs);
-	curr_status = vptr->mii_status & (~VELOCITY_LINK_FAIL);
 
 	/* Set mii link status */
 	set_mii_flow_control(vptr);
 
-	/*
-	   Check if new status is consistent with current status
-	   if (((mii_status & curr_status) & VELOCITY_AUTONEG_ENABLE) ||
-	       (mii_status==curr_status)) {
-	   vptr->mii_status=mii_check_media_mode(vptr->mac_regs);
-	   vptr->mii_status=check_connection_type(vptr->mac_regs);
-	   netdev_info(vptr->netdev, "Velocity link no change\n");
-	   return 0;
-	   }
-	 */
-
 	if (PHYID_GET_PHY_ID(vptr->phy_id) == PHYID_CICADA_CS8201)
 		MII_REG_BITS_ON(AUXCR_MDPPS, MII_NCONFIG, vptr->mac_regs);
 
Signature · 1 line
2.27.0
Acked-by on v1 6/11
#13 lore raw

Re: [RFC PATCH net-next v1 06/11] drivers/net/ethernet: clean up unused assignments

Quoted 14 lines · Jesse Brandeburg

As part of the W=1 compliation series, these lines all created warnings about unused variables that were assigned a value. Most of them are from register reads, but some are just picking up a return value from a function and never doing anything with it.

The register reads should be OK, because the current implementation of readl and friends will always execute even without an lvalue.

When it makes sense, just remove the lvalue assignment and the local. Other times, just remove the offending code, and occasionally, just mark the variable as maybe unused since it could be used in an ifdef or debug scenario.

Quoted 4 lines

Only compile tested with W=1 and an allyesconfig with all the network drivers turned into modules (to try to test all options).

For the sfc/falcon part:

(it's not the same as the solution I went with for thevery ?similar code in the Siena driver (../farch.c), but it looks ?reasonable enough).

#14 lore raw

RFC PATCH 6/11 drivers/net/ethernet: clean up unused assignments

In reply to Jesse Brandeburg
Quoted 77 lines · Jesse Brandeburg

As part of the W=1 compliation series, these lines all created warnings about unused variables that were assigned a value. Most of them are from register reads, but some are just picking up a return value from a function and never doing anything with it.

The register reads should be OK, because the current implementation of readl and friends will always execute even without an lvalue.

When it makes sense, just remove the lvalue assignment and the local. Other times, just remove the offending code, and occasionally, just mark the variable as maybe unused since it could be used in an ifdef or debug scenario.

Only compile tested with W=1 and an allyesconfig with all the network drivers turned into modules (to try to test all options).

---
 drivers/net/ethernet/brocade/bna/bnad.c       |  7 ++--
 .../net/ethernet/cavium/liquidio/lio_main.c   |  4 +--
 .../ethernet/cavium/liquidio/octeon_device.c  | 13 ++++----
 drivers/net/ethernet/cortina/gemini.c         |  6 ++--
 drivers/net/ethernet/dec/tulip/de4x5.c        |  4 +--
 drivers/net/ethernet/dec/tulip/media.c        |  5 ---
 drivers/net/ethernet/dnet.c                   |  8 ++---
 drivers/net/ethernet/freescale/fec_ptp.c      |  3 +-
 drivers/net/ethernet/marvell/mvneta.c         |  7 ++--
 drivers/net/ethernet/marvell/pxa168_eth.c     |  3 +-
 drivers/net/ethernet/mellanox/mlx4/en_tx.c    |  2 +-
 drivers/net/ethernet/micrel/ksz884x.c         | 13 +++-----
 drivers/net/ethernet/microchip/lan743x_main.c |  9 ++----
 drivers/net/ethernet/neterion/vxge/vxge-reg.h |  4 +--
 .../net/ethernet/neterion/vxge/vxge-traffic.c | 32 +++++++------------
 .../ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c   |  3 +-
 drivers/net/ethernet/sfc/falcon/farch.c       | 29 +++++++----------
 drivers/net/ethernet/sis/sis900.c             |  5 ++-
 .../net/ethernet/stmicro/stmmac/stmmac_main.c |  4 +--
 .../net/ethernet/synopsys/dwc-xlgmac-common.c |  2 +-
 drivers/net/ethernet/ti/cpsw_new.c            |  2 --
 drivers/net/ethernet/ti/davinci_emac.c        |  5 ++-
 drivers/net/ethernet/ti/tlan.c                |  4 +--
 drivers/net/ethernet/via/via-velocity.c       | 13 --------
 24 files changed, 65 insertions(+), 122 deletions(-)
drivers/net/ethernet/brocade/bna/bnad.c +2 -5
index cc80bbbefe87..7e4e831d720f 100644
@@ -3277,7 +3277,7 @@ bnad_change_mtu(struct net_device *netdev, int new_mtu)
 {
 	int err, mtu;
 	struct bnad *bnad = netdev_priv(netdev);
-	u32 rx_count = 0, frame, new_frame;
+	u32 frame, new_frame;
 
 	mutex_lock(&bnad->conf_mutex);
 
@@ -3293,12 +3293,9 @@ bnad_change_mtu(struct net_device *netdev, int new_mtu)
 		/* only when transition is over 4K */
 		if ((frame <= 4096 && new_frame > 4096) ||
 		    (frame > 4096 && new_frame <= 4096))
-			rx_count = bnad_reinit_rx(bnad);
+			bnad_reinit_rx(bnad);
 	}
 
-	/* rx_count > 0 - new rx created
-	 *	- Linux set err = 0 and return
-	 */
 	err = bnad_mtu_set(bnad, new_frame);
 	if (err)
 		err = -EBUSY;
drivers/net/ethernet/cavium/liquidio/lio_main.c +0 -0
index 8e0ed01e7f03..737ae69eec6e 100644

drivers/net/ethernet/cavium/liquidio/lio_main.c line 1

Quoted 2 lines
drivers/net/ethernet/cavium/liquidio/lio_main.c +1 -1
@@ -1,4 +1,4 @@
-/**********************************************************************
+/*

I suspect this was meant to go into the kdoc patch instead?

Thanks,
Jake

#15 lore raw

RFC PATCH 6/11 drivers/net/ethernet: clean up unused assignments

Jacob Keller wrote:
err = -EBUSY;

Quoted 9 lines

drivers/net/ethernet/cavium/liquidio/lio_main.c line 1

Quoted 7 lines
drivers/net/ethernet/cavium/liquidio/lio_main.c +1 -1
index 8e0ed01e7f03..737ae69eec6e 100644
@@ -1,4 +1,4 @@
-/**********************************************************************
+/*

I suspect this was meant to go into the kdoc patch instead?

Actually it shouldn't be there at all, but it's fixed, thanks!

#16 lore raw

RFC PATCH 7/11 drivers/net/ethernet: rid ethernet of no-prototype warnings

In reply to Jesse Brandeburg

The W=1 builds showed a few files exporting functions (non-static) that were not prototyped. What actually happened is that there were prototypes, but the include file was forgotten in the implementation file.

Add the include file and remove the warnings.

---
 drivers/net/ethernet/cavium/liquidio/cn68xx_device.c   | 1 +
 drivers/net/ethernet/cavium/liquidio/octeon_mem_ops.c  | 1 +
 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_dcb.c | 1 +
 3 files changed, 3 insertions(+)
drivers/net/ethernet/cavium/liquidio/cn68xx_device.c +1 -0
index 50b533ff58e6..30254e4cf70f 100644
@@ -25,6 +25,7 @@
 #include "octeon_main.h"
 #include "cn66xx_regs.h"
 #include "cn66xx_device.h"
+#include "cn68xx_device.h"
 #include "cn68xx_regs.h"
 
 static void lio_cn68xx_set_dpi_regs(struct octeon_device *oct)
drivers/net/ethernet/cavium/liquidio/octeon_mem_ops.c +1 -0
index 4c85ae643b7b..7ccab36143c1 100644
@@ -22,6 +22,7 @@
 #include "octeon_iq.h"
 #include "response_manager.h"
 #include "octeon_device.h"
+#include "octeon_mem_ops.h"
 
 #define MEMOPS_IDX   BAR1_INDEX_DYNAMIC_MAP
 
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_dcb.c +1 -0
index d6c3952aba04..f28b8f3df857 100644
@@ -3,6 +3,7 @@
 
 #include "hclge_main.h"
 #include "hclge_tm.h"
+#include "hclge_dcb.h"
 #include "hnae3.h"
 
 #define BW_PERCENT	100
Signature · 1 line
2.27.0
#17 lore raw

RFC PATCH 8/11 drivers/net/ethernet: handle one warning explicitly

In reply to Jesse Brandeburg

While fixing the W=1 builds, this warning came up because the developers used a very tricky way to get structures initialized to a non-zero value, but this causes GCC to warn about an override. In this case the override was intentional, so just disable the warning for this code with a #pragma.

---
 drivers/net/ethernet/renesas/sh_eth.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/net/ethernet/renesas/sh_eth.c +8 -0
index 586642c33d2b..659530f9c117 100644
@@ -45,6 +45,13 @@
 #define SH_ETH_OFFSET_DEFAULTS			\
 	[0 ... SH_ETH_MAX_REGISTER_OFFSET - 1] = SH_ETH_OFFSET_INVALID
 
+/* use some intentionally tricky logic here to initialize the whole struct to
+ * 0xffff, but then override certain fields, requiring us to indicate that we
+ * "know" that there are overrides in this structure, and we'll need to disable
+ * that warning from W=1 builds
+ */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Woverride-init"
 static const u16 sh_eth_offset_gigabit[SH_ETH_MAX_REGISTER_OFFSET] = {
 	SH_ETH_OFFSET_DEFAULTS,
 
@@ -332,6 +339,7 @@ static const u16 sh_eth_offset_fast_sh3_sh2[SH_ETH_MAX_REGISTER_OFFSET] = {
 
 	[TSU_ADRH0]	= 0x0100,
 };
+#pragma GCC diagnostic pop
 
 static void sh_eth_rcv_snd_disable(struct net_device *ndev);
 static struct net_device_stats *sh_eth_get_stats(struct net_device *ndev);
Signature · 1 line
2.27.0
#18 lore raw

Re: [RFC PATCH net-next v1 08/11] drivers/net/ethernet: handle one warning explicitly

Quoted 16 lines · Jesse Brandeburg

While fixing the W=1 builds, this warning came up because the developers used a very tricky way to get structures initialized to a non-zero value, but this causes GCC to warn about an override. In this case the override was intentional, so just disable the warning for this code with a #pragma.

---
 drivers/net/ethernet/renesas/sh_eth.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/net/ethernet/renesas/sh_eth.c +0 -0
index 586642c33d2b..659530f9c117 100644

drivers/net/ethernet/renesas/sh_eth.c line 54

Quoted 10 lines
drivers/net/ethernet/renesas/sh_eth.c +7 -0
@@ -45,6 +45,13 @@
 #define SH_ETH_OFFSET_DEFAULTS			\
 	[0 ... SH_ETH_MAX_REGISTER_OFFSET - 1] = SH_ETH_OFFSET_INVALID
 
+/* use some intentionally tricky logic here to initialize the whole struct to
+ * 0xffff, but then override certain fields, requiring us to indicate that we
+ * "know" that there are overrides in this structure, and we'll need to disable
+ * that warning from W=1 builds
+ */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Woverride-init"

This should probably use something like the __diag() macros instead of GCC-specific code, e.g.

__diag_push()
__diag_ignore(GCC, <version>, "-Woverride-init")

...

__diag_pop()

Where <version> is the major GCC version that introduced this warning.

Thanks,
Jake

Quoted 12 lines
drivers/net/ethernet/renesas/sh_eth.c +1 -0
 static const u16 sh_eth_offset_gigabit[SH_ETH_MAX_REGISTER_OFFSET] = {
 	SH_ETH_OFFSET_DEFAULTS,
 
@@ -332,6 +339,7 @@ static const u16 sh_eth_offset_fast_sh3_sh2[SH_ETH_MAX_REGISTER_OFFSET] = {
 
 	[TSU_ADRH0]	= 0x0100,
 };
+#pragma GCC diagnostic pop
 
 static void sh_eth_rcv_snd_disable(struct net_device *ndev);
 static struct net_device_stats *sh_eth_get_stats(struct net_device *ndev);
#19 lore raw

RFC PATCH 9/11 drivers/net/ethernet: add some basic kdoc tags

In reply to Jesse Brandeburg

A couple of drivers had a "generic documentation" section that would trigger a "can't understand" message from W=1 compiles.

Fix by using correct DOC: tags.

---
 drivers/net/ethernet/arc/emac_arc.c     | 2 +-
 drivers/net/ethernet/cadence/macb_pci.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/arc/emac_arc.c +1 -1
index 1c7736b7eaf7..800620b8f10d 100644
@@ -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
  *
drivers/net/ethernet/cadence/macb_pci.c +1 -1
index cd7d0332cba3..35316c91f523 100644
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0-only
 /**
- * Cadence GEM PCI wrapper.
+ * DOC: Cadence GEM PCI wrapper.
  *
  * Copyright (C) 2016 Cadence Design Systems - https://www.cadence.com
  *
Signature · 1 line
2.27.0
#20 lore raw

RFC PATCH 10/11 drivers/net/ethernet: remove incorrectly formatted doc

In reply to Jesse Brandeburg

As part of the W=1 series for ethernet, these drivers were discovered to be using kdoc style comments but were not actually doing kdoc.

---
 drivers/net/ethernet/amazon/ena/ena_com.c     |  2 +-
 .../aquantia/atlantic/hw_atl/hw_atl_b0.c      |  2 +-
 drivers/net/ethernet/xilinx/ll_temac_main.c   | 26 +++++++++----------
 3 files changed, 15 insertions(+), 15 deletions(-)
drivers/net/ethernet/amazon/ena/ena_com.c +1 -1
index 452e66b39a17..6967d40b5ac7 100644
@@ -603,7 +603,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,
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c +1 -1
index 8941ac4df9e3..9f1b15077e7d 100644
@@ -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.
drivers/net/ethernet/xilinx/ll_temac_main.c +13 -13
index 9a15f14daa47..60c199fcb91e 100644
@@ -106,7 +106,7 @@ static bool hard_acs_rdy_or_timeout(struct temac_local *lp, ktime_t timeout)
  */
 #define HARD_ACS_RDY_POLL_NS (20 * NSEC_PER_MSEC)
 
-/**
+/*
  * temac_indirect_busywait - Wait for current indirect register access
  * to complete.
  */
@@ -121,7 +121,7 @@ int temac_indirect_busywait(struct temac_local *lp)
 		return 0;
 }
 
-/**
+/*
  * temac_indirect_in32 - Indirect register read access.  This function
  * must be called without lp->indirect_lock being held.
  */
@@ -136,7 +136,7 @@ u32 temac_indirect_in32(struct temac_local *lp, int reg)
 	return val;
 }
 
-/**
+/*
  * temac_indirect_in32_locked - Indirect register read access.  This
  * function must be called with lp->indirect_lock being held.  Use
  * this together with spin_lock_irqsave/spin_lock_irqrestore to avoid
@@ -164,7 +164,7 @@ u32 temac_indirect_in32_locked(struct temac_local *lp, int reg)
 	return temac_ior(lp, XTE_LSW0_OFFSET);
 }
 
-/**
+/*
  * temac_indirect_out32 - Indirect register write access.  This function
  * must be called without lp->indirect_lock being held.
  */
@@ -177,7 +177,7 @@ void temac_indirect_out32(struct temac_local *lp, int reg, u32 value)
 	spin_unlock_irqrestore(lp->indirect_lock, flags);
 }
 
-/**
+/*
  * temac_indirect_out32_locked - Indirect register write access.  This
  * function must be called with lp->indirect_lock being held.  Use
  * this together with spin_lock_irqsave/spin_lock_irqrestore to avoid
@@ -202,7 +202,7 @@ void temac_indirect_out32_locked(struct temac_local *lp, int reg, u32 value)
 	WARN_ON(temac_indirect_busywait(lp));
 }
 
-/**
+/*
  * temac_dma_in32_* - Memory mapped DMA read, these function expects a
  * register input that is based on DCR word addresses which are then
  * converted to memory mapped byte addresses.  To be assigned to
@@ -218,7 +218,7 @@ static u32 temac_dma_in32_le(struct temac_local *lp, int reg)
 	return ioread32(lp->sdma_regs + (reg << 2));
 }
 
-/**
+/*
  * temac_dma_out32_* - Memory mapped DMA read, these function expects
  * a register input that is based on DCR word addresses which are then
  * converted to memory mapped byte addresses.  To be assigned to
@@ -240,7 +240,7 @@ static void temac_dma_out32_le(struct temac_local *lp, int reg, u32 value)
  */
 #ifdef CONFIG_PPC_DCR
 
-/**
+/*
  * temac_dma_dcr_in32 - DCR based DMA read
  */
 static u32 temac_dma_dcr_in(struct temac_local *lp, int reg)
@@ -248,7 +248,7 @@ static u32 temac_dma_dcr_in(struct temac_local *lp, int reg)
 	return dcr_read(lp->sdma_dcrs, reg);
 }
 
-/**
+/*
  * temac_dma_dcr_out32 - DCR based DMA write
  */
 static void temac_dma_dcr_out(struct temac_local *lp, int reg, u32 value)
@@ -256,7 +256,7 @@ static void temac_dma_dcr_out(struct temac_local *lp, int reg, u32 value)
 	dcr_write(lp->sdma_dcrs, reg, value);
 }
 
-/**
+/*
  * temac_dcr_setup - If the DMA is DCR based, then setup the address and
  * I/O  functions
  */
@@ -293,7 +293,7 @@ static int temac_dcr_setup(struct temac_local *lp, struct platform_device *op,
 
 #endif
 
-/**
+/*
  * temac_dma_bd_release - Release buffer descriptor rings
  */
 static void temac_dma_bd_release(struct net_device *ndev)
@@ -323,7 +323,7 @@ static void temac_dma_bd_release(struct net_device *ndev)
 				  lp->tx_bd_v, lp->tx_bd_p);
 }
 
-/**
+/*
  * temac_dma_bd_init - Setup buffer descriptor rings
  */
 static int temac_dma_bd_init(struct net_device *ndev)
@@ -593,7 +593,7 @@ static struct temac_option {
 	{}
 };
 
-/**
+/*
  * temac_setoptions
  */
 static u32 temac_setoptions(struct net_device *ndev, u32 options)
Signature · 1 line
2.27.0
#21 lore raw

RFC PATCH 10/11 drivers/net/ethernet: remove incorrectly formatted doc

A lot of these look like they should probably just be converted to use kdoc format instead of removing the '/**'

Quoted 28 lines · Jesse Brandeburg

As part of the W=1 series for ethernet, these drivers were discovered to be using kdoc style comments but were not actually doing kdoc.

---
 drivers/net/ethernet/amazon/ena/ena_com.c     |  2 +-
 .../aquantia/atlantic/hw_atl/hw_atl_b0.c      |  2 +-
 drivers/net/ethernet/xilinx/ll_temac_main.c   | 26 +++++++++----------
 3 files changed, 15 insertions(+), 15 deletions(-)
drivers/net/ethernet/amazon/ena/ena_com.c +1 -1
index 452e66b39a17..6967d40b5ac7 100644
@@ -603,7 +603,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,
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c +0 -0
index 8941ac4df9e3..9f1b15077e7d 100644

drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c static int hw_atl_b0_hw_fl2_clear(struct aq_hw_s *self, · line 1542

Quoted 8 lines
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c +1 -1
@@ -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.

This looks like a doxygen style comment. I wonder if whoever maintains this code uses doxygen and expects this to get picked up.

drivers/net/ethernet/xilinx/ll_temac_main.c static bool hard_acs_rdy_or_timeout(struct temac_local *lp, ktime_t timeout) · line 112

Quoted 13 lines
drivers/net/ethernet/xilinx/ll_temac_main.c +1 -1
index 9a15f14daa47..60c199fcb91e 100644
@@ -106,7 +106,7 @@ static bool hard_acs_rdy_or_timeout(struct temac_local *lp, ktime_t timeout)
  */
 #define HARD_ACS_RDY_POLL_NS (20 * NSEC_PER_MSEC)
 
-/**
+/*
  * temac_indirect_busywait - Wait for current indirect register access
  * to complete.
  */

This looks like a function comment. Shouldn't this just be fixed/updated so that it is a valid kdoc comment instead?

Quoted 109 lines
drivers/net/ethernet/xilinx/ll_temac_main.c +12 -12
@@ -121,7 +121,7 @@ int temac_indirect_busywait(struct temac_local *lp)
 		return 0;
 }
 
-/**
+/*
  * temac_indirect_in32 - Indirect register read access.  This function
  * must be called without lp->indirect_lock being held.
  */
@@ -136,7 +136,7 @@ u32 temac_indirect_in32(struct temac_local *lp, int reg)
 	return val;
 }
 
-/**
+/*
  * temac_indirect_in32_locked - Indirect register read access.  This
  * function must be called with lp->indirect_lock being held.  Use
  * this together with spin_lock_irqsave/spin_lock_irqrestore to avoid
@@ -164,7 +164,7 @@ u32 temac_indirect_in32_locked(struct temac_local *lp, int reg)
 	return temac_ior(lp, XTE_LSW0_OFFSET);
 }
 
-/**
+/*
  * temac_indirect_out32 - Indirect register write access.  This function
  * must be called without lp->indirect_lock being held.
  */
@@ -177,7 +177,7 @@ void temac_indirect_out32(struct temac_local *lp, int reg, u32 value)
 	spin_unlock_irqrestore(lp->indirect_lock, flags);
 }
 
-/**
+/*
  * temac_indirect_out32_locked - Indirect register write access.  This
  * function must be called with lp->indirect_lock being held.  Use
  * this together with spin_lock_irqsave/spin_lock_irqrestore to avoid
@@ -202,7 +202,7 @@ void temac_indirect_out32_locked(struct temac_local *lp, int reg, u32 value)
 	WARN_ON(temac_indirect_busywait(lp));
 }
 
-/**
+/*
  * temac_dma_in32_* - Memory mapped DMA read, these function expects a
  * register input that is based on DCR word addresses which are then
  * converted to memory mapped byte addresses.  To be assigned to
@@ -218,7 +218,7 @@ static u32 temac_dma_in32_le(struct temac_local *lp, int reg)
 	return ioread32(lp->sdma_regs + (reg << 2));
 }
 
-/**
+/*
  * temac_dma_out32_* - Memory mapped DMA read, these function expects
  * a register input that is based on DCR word addresses which are then
  * converted to memory mapped byte addresses.  To be assigned to
@@ -240,7 +240,7 @@ static void temac_dma_out32_le(struct temac_local *lp, int reg, u32 value)
  */
 #ifdef CONFIG_PPC_DCR
 
-/**
+/*
  * temac_dma_dcr_in32 - DCR based DMA read
  */
 static u32 temac_dma_dcr_in(struct temac_local *lp, int reg)
@@ -248,7 +248,7 @@ static u32 temac_dma_dcr_in(struct temac_local *lp, int reg)
 	return dcr_read(lp->sdma_dcrs, reg);
 }
 
-/**
+/*
  * temac_dma_dcr_out32 - DCR based DMA write
  */
 static void temac_dma_dcr_out(struct temac_local *lp, int reg, u32 value)
@@ -256,7 +256,7 @@ static void temac_dma_dcr_out(struct temac_local *lp, int reg, u32 value)
 	dcr_write(lp->sdma_dcrs, reg, value);
 }
 
-/**
+/*
  * temac_dcr_setup - If the DMA is DCR based, then setup the address and
  * I/O  functions
  */
@@ -293,7 +293,7 @@ static int temac_dcr_setup(struct temac_local *lp, struct platform_device *op,
 
 #endif
 
-/**
+/*
  * temac_dma_bd_release - Release buffer descriptor rings
  */
 static void temac_dma_bd_release(struct net_device *ndev)
@@ -323,7 +323,7 @@ static void temac_dma_bd_release(struct net_device *ndev)
 				  lp->tx_bd_v, lp->tx_bd_p);
 }
 
-/**
+/*
  * temac_dma_bd_init - Setup buffer descriptor rings
  */
 static int temac_dma_bd_init(struct net_device *ndev)
@@ -593,7 +593,7 @@ static struct temac_option {
 	{}
 };
 
-/**
+/*
  * temac_setoptions
  */
 static u32 temac_setoptions(struct net_device *ndev, u32 options)
#22 lore raw

RFC PATCH 10/11 drivers/net/ethernet: remove incorrectly formatted doc

Quoted 2 lines · Jacob Keller

A lot of these look like they should probably just be converted to use kdoc format instead of removing the '/**'

I understand why you're saying that, and I spent a considerable amount of time fixing drivers that appeared to *try* to use kdoc but messed up. However, if they don't have anything that looks like doxygen or kdoc, then I just removed the "/**" to a /* and stopped kdoc processing.

The temac driver is a good example of not actually trying to kdoc at all.

However I will look over the patches and see if I see @brief anywhere that is left and try to fix those up. I've done so much now I might as well finish it, but the @brief doxygen style notes had never been processed into kdoc before, so changing the /** into /* doesn't actually remove any value, just makes the build clean.

Quoted 8 lines
Quoted 8 lines
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c +0 -0
index 8941ac4df9e3..9f1b15077e7d 100644
@@ -1536,7 +1536,7 @@ static int hw_atl_b0_hw_fl2_clear(struct aq_hw_s *self,
 	return aq_hw_err_from_flags(self);
 }
 
Quoted 8 lines

drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c static int hw_atl_b0_hw_fl2_clear(struct aq_hw_s *self, · line 1542

Quoted 5 lines
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c +1 -1
-/**
+/*
  * @brief Set VLAN filter table
  * @details Configure VLAN filter table to accept (and assign the queue) traffic
  *  for the particular vlan ids.

This looks like a doxygen style comment. I wonder if whoever maintains this code uses doxygen and expects this to get picked up.

It was never picked up by kdoc. And in this case this is the only kdoc comment in this whole file, so I didn't like the idea of this *one* being documented while the whole rest of the driver was not.

Quoted 8 lines
Quoted 8 lines
drivers/net/ethernet/xilinx/ll_temac_main.c +0 -0
index 9a15f14daa47..60c199fcb91e 100644
@@ -106,7 +106,7 @@ static bool hard_acs_rdy_or_timeout(struct temac_local *lp, ktime_t timeout)
  */
 #define HARD_ACS_RDY_POLL_NS (20 * NSEC_PER_MSEC)
 
Quoted 8 lines

drivers/net/ethernet/xilinx/ll_temac_main.c static bool hard_acs_rdy_or_timeout(struct temac_local *lp, ktime_t timeout) · line 112

Quoted 5 lines
drivers/net/ethernet/xilinx/ll_temac_main.c +1 -1
-/**
+/*
  * temac_indirect_busywait - Wait for current indirect register access
  * to complete.
  */

This looks like a function comment. Shouldn't this just be fixed/updated so that it is a valid kdoc comment instead?

As per above, this driver didn't even try to use kdoc, so I just honored their original intent and removed /**.

Thanks for the review and comments!

#23 lore raw

RFC PATCH 10/11 drivers/net/ethernet: remove incorrectly formatted doc

Quoted 10 lines · Jesse Brandeburg
Quoted 2 lines · Jacob Keller

A lot of these look like they should probably just be converted to use kdoc format instead of removing the '/**'

I understand why you're saying that, and I spent a considerable amount of time fixing drivers that appeared to *try* to use kdoc but messed up. However, if they don't have anything that looks like doxygen or kdoc, then I just removed the "/**" to a /* and stopped kdoc processing.

Quoted 9 lines

The temac driver is a good example of not actually trying to kdoc at all.

However I will look over the patches and see if I see @brief anywhere that is left and try to fix those up. I've done so much now I might as well finish it, but the @brief doxygen style notes had never been processed into kdoc before, so changing the /** into /* doesn't actually remove any value, just makes the build clean.

Sure, I think that's important. I just wanted to point out that we are probably breaking whoever maintained/wrote that code and used doxygen. (Since as far as I understand, doxygen also relies on the /** to find comments).

Basically: I think we should be clear that is what we are doing:

"We support kdoc, not doxygen, so if you want this, use kdoc format"

Thanks,
Jake

#24 lore raw

RFC PATCH 11/11 drivers/net/ethernet: clean up mis-targeted comments

In reply to Jesse Brandeburg

As part of the W=1 cleanups for ethernet, a million [1] 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.

[1] - ok it wasn't quite a million, but it felt like it.

---
Testing Hints: build with W=1 in the drivers/net/ethernet directory, I used:
make allmodconfig
make modules_prepare
make M=drivers/net/ethernet W=1 modules

---
 .../net/ethernet/atheros/atl1c/atl1c_main.c   |   6 +-
 .../net/ethernet/atheros/atl1e/atl1e_main.c   |   7 +-
 drivers/net/ethernet/atheros/atlx/atl1.c      |   2 +-
 drivers/net/ethernet/atheros/atlx/atl2.c      |   6 +-
 .../net/ethernet/broadcom/bnx2x/bnx2x_cmn.c   |   2 +
 .../ethernet/broadcom/bnx2x/bnx2x_ethtool.c   |   6 +-
 .../net/ethernet/broadcom/bnx2x/bnx2x_main.c  |  12 +-
 .../net/ethernet/broadcom/bnx2x/bnx2x_sp.c    |  98 ++---
 drivers/net/ethernet/brocade/bna/bfa_cee.c    |  20 +-
 drivers/net/ethernet/brocade/bna/bfa_ioc.c    |   8 +-
 drivers/net/ethernet/cadence/macb_main.c      |   6 +-
 drivers/net/ethernet/calxeda/xgmac.c          |   2 +
 .../net/ethernet/cavium/liquidio/lio_core.c   |  92 ++---
 .../net/ethernet/cavium/liquidio/lio_main.c   | 351 +++++++++---------
 .../ethernet/cavium/liquidio/lio_vf_main.c    | 158 ++++----
 .../ethernet/cavium/liquidio/octeon_console.c |  12 +-
 .../ethernet/cavium/liquidio/octeon_device.c  |   4 +-
 .../ethernet/cavium/liquidio/octeon_droq.c    |   2 +-
 .../ethernet/cavium/liquidio/octeon_mailbox.c |   5 +-
 .../net/ethernet/chelsio/cxgb3/cxgb3_main.c   |   8 +-
 drivers/net/ethernet/chelsio/cxgb3/sge.c      |  28 +-
 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c    |   5 +-
 drivers/net/ethernet/cisco/enic/enic_api.c    |   2 +-
 .../net/ethernet/cisco/enic/enic_ethtool.c    |   2 +-
 drivers/net/ethernet/cortina/gemini.c         |   2 +
 drivers/net/ethernet/ethoc.c                  |   6 +-
 .../net/ethernet/freescale/dpaa2/dpaa2-eth.c  |   2 +-
 drivers/net/ethernet/freescale/fec_ptp.c      |   5 +-
 drivers/net/ethernet/freescale/fman/fman.c    |  14 +-
 .../net/ethernet/freescale/fman/fman_muram.c  |   6 +-
 .../net/ethernet/freescale/fman/fman_port.c   |  23 +-
 drivers/net/ethernet/freescale/fman/mac.c     |   4 +-
 drivers/net/ethernet/hisilicon/hns/hnae.c     |   2 +-
 .../net/ethernet/hisilicon/hns/hns_dsaf_mac.c |  34 +-
 .../ethernet/hisilicon/hns/hns_dsaf_main.c    | 148 ++++----
 .../ethernet/hisilicon/hns/hns_dsaf_misc.c    |   7 +-
 .../net/ethernet/hisilicon/hns/hns_dsaf_ppe.c |  17 +-
 .../net/ethernet/hisilicon/hns/hns_dsaf_rcb.c |   7 +-
 .../ethernet/hisilicon/hns/hns_dsaf_xgmac.c   |   3 +-
 drivers/net/ethernet/hisilicon/hns/hns_enet.c |   4 +-
 .../net/ethernet/hisilicon/hns/hns_ethtool.c  |  48 +--
 drivers/net/ethernet/hisilicon/hns_mdio.c     |   3 +-
 .../net/ethernet/huawei/hinic/hinic_hw_cmdq.c |   2 +-
 .../net/ethernet/huawei/hinic/hinic_hw_dev.c  |   6 +-
 .../net/ethernet/huawei/hinic/hinic_hw_eqs.c  |   1 +
 .../net/ethernet/huawei/hinic/hinic_hw_if.c   |   1 +
 .../net/ethernet/huawei/hinic/hinic_hw_mgmt.c |   1 +
 .../net/ethernet/huawei/hinic/hinic_main.c    |   2 +-
 drivers/net/ethernet/micrel/ksz884x.c         |  46 ++-
 .../ethernet/microchip/encx24j600-regmap.c    |   2 +-
 drivers/net/ethernet/natsemi/ns83820.c        |   6 +-
 drivers/net/ethernet/neterion/s2io.c          |  91 ++---
 .../net/ethernet/neterion/vxge/vxge-config.c  |   5 +-
 .../net/ethernet/neterion/vxge/vxge-ethtool.c |   2 +-
 .../net/ethernet/neterion/vxge/vxge-main.c    |  10 +-
 .../net/ethernet/neterion/vxge/vxge-traffic.c |  40 +-
 .../oki-semi/pch_gbe/pch_gbe_ethtool.c        |   4 +-
 .../ethernet/oki-semi/pch_gbe/pch_gbe_main.c  |   5 +-
 .../ethernet/oki-semi/pch_gbe/pch_gbe_param.c |  14 +-
 .../net/ethernet/packetengines/yellowfin.c    |   2 +-
 .../net/ethernet/qlogic/netxen/netxen_nic.h   |   3 -
 .../qlogic/netxen/netxen_nic_ethtool.c        |   3 +
 drivers/net/ethernet/qualcomm/emac/emac.c     |   1 +
 drivers/net/ethernet/realtek/8139cp.c         |   2 +
 .../net/ethernet/samsung/sxgbe/sxgbe_main.c   |  17 +-
 drivers/net/ethernet/sfc/falcon/rx.c          |   2 +
 drivers/net/ethernet/sfc/falcon/selftest.c    |   2 +-
 drivers/net/ethernet/sfc/net_driver.h         |   2 +-
 drivers/net/ethernet/sfc/ptp.c                |   6 +
 drivers/net/ethernet/sis/sis900.c             |   3 +-
 .../net/ethernet/stmicro/stmmac/dwmac-rk.c    |   2 +-
 .../net/ethernet/stmicro/stmmac/stmmac_main.c |  14 +-
 .../ethernet/stmicro/stmmac/stmmac_platform.c |   3 +-
 drivers/net/ethernet/sun/cassini.c            |   4 +-
 drivers/net/ethernet/tehuti/tehuti.c          |  17 +-
 drivers/net/ethernet/ti/davinci_cpdma.c       |   2 +-
 drivers/net/ethernet/ti/davinci_emac.c        |   5 +-
 drivers/net/ethernet/via/via-rhine.c          |   2 +-
 drivers/net/ethernet/via/via-velocity.c       |  27 +-
 79 files changed, 828 insertions(+), 708 deletions(-)
drivers/net/ethernet/atheros/atl1c/atl1c_main.c +5 -1
index c7288e1fa3a2..00de463268a8 100644
@@ -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)
 {
@@ -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)
 {
@@ -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)
@@ -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)
 {
drivers/net/ethernet/atheros/atl1e/atl1e_main.c +5 -2
index fb78f6c31708..e43f71849daf 100644
@@ -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)
 {
@@ -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)
 {
@@ -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)
 {
@@ -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)
 {
drivers/net/ethernet/atheros/atlx/atl1.c +1 -1
index 60f8aa79deb2..eaf96d002fa5 100644
@@ -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)
 {
drivers/net/ethernet/atheros/atlx/atl2.c +4 -2
index e2526c0fb7cf..021fb0e6417a 100644
@@ -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)
 {
@@ -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)
 {
@@ -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)
 {
@@ -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)
 {
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +2 -0
index 2c0ccd4fba9b..1a6ec1a12d53 100644
@@ -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.
@@ -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
drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c +4 -2
index 7cea33803f7f..32245bbe88a8 100644
@@ -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
@@ -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.
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +5 -7
index 3c543dd7a8f3..207289fd16da 100644
@@ -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.
  */
@@ -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)
@@ -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.
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c +50 -48

290 lines not on this page · raw message

drivers/net/ethernet/brocade/bna/bfa_cee.c +11 -9
index 09fb9315d1ae..06f221c44802 100644
@@ -102,14 +102,10 @@ bfa_cee_get_stats_isr(struct bfa_cee *cee, enum bfa_status status)
 }
 
 /**
- * bfa_cee_get_attr_isr()
+ * bfa_cee_reset_stats_isr - CEE ISR for reset-stats responses from f/w
  *
- * @brief CEE ISR for reset-stats responses from f/w
- *
- * @param[in] cee - Pointer to the CEE module
- *            status - Return status from the f/w
- *
- * @return void
+ * @cee: Input Pointer to the CEE module
+ * @status: Return status from the f/w
  */
 static void
 bfa_cee_reset_stats_isr(struct bfa_cee *cee, enum bfa_status status)
@@ -148,9 +144,12 @@ bfa_nw_cee_mem_claim(struct bfa_cee *cee, u8 *dma_kva, u64 dma_pa)
 }
 
 /**
- * bfa_cee_get_attr - Send the request to the f/w to fetch CEE attributes.
+ * bfa_nw_cee_get_attr - Send the request to the f/w to fetch CEE attributes.
  *
  * @cee: Pointer to the CEE module data structure.
+ * @attr: attribute requested
+ * @cbfn: function pointer
+ * @cbarg: function pointer arguments
  *
  * Return: status
  */
@@ -181,7 +180,9 @@ bfa_nw_cee_get_attr(struct bfa_cee *cee, struct bfa_cee_attr *attr,
 }
 
 /**
- * bfa_cee_isrs - Handles Mail-box interrupts for CEE module.
+ * bfa_cee_isr - Handles Mail-box interrupts for CEE module.
+ * @cbarg: argument passed containing pointer to the CEE module data structure.
+ * @m: message pointer
  */
 
 static void
@@ -210,6 +211,7 @@ bfa_cee_isr(void *cbarg, struct bfi_mbmsg *m)
 /**
  * bfa_cee_notify - CEE module heart-beat failure handler.
  *
+ * @arg: argument passed containing pointer to the CEE module data structure.
  * @event: IOC event type
  */
 
drivers/net/ethernet/brocade/bna/bfa_ioc.c +7 -1
index b9dd06b12945..fd805c685d92 100644
@@ -1763,7 +1763,7 @@ bfa_ioc_flash_fwver_cmp(struct bfa_ioc *ioc,
 		return BFI_IOC_IMG_VER_INCOMP;
 }
 
-/**
+/*
  * Returns TRUE if driver is willing to work with current smem f/w version.
  */
 bool
@@ -2469,6 +2469,7 @@ bfa_ioc_isr(struct bfa_ioc *ioc, struct bfi_mbmsg *m)
  *
  * @ioc:	memory for IOC
  * @bfa:	driver instance structure
+ * @cbfn:	callback function
  */
 void
 bfa_nw_ioc_attach(struct bfa_ioc *ioc, void *bfa, struct bfa_ioc_cbfn *cbfn)
@@ -2500,7 +2501,9 @@ bfa_nw_ioc_detach(struct bfa_ioc *ioc)
 /**
  * bfa_nw_ioc_pci_init - Setup IOC PCI properties.
  *
+ * @ioc:	memory for IOC
  * @pcidev:	PCI device information for this IOC
+ * @clscode:	class code
  */
 void
 bfa_nw_ioc_pci_init(struct bfa_ioc *ioc, struct bfa_pcidev *pcidev,
@@ -2569,6 +2572,7 @@ bfa_nw_ioc_pci_init(struct bfa_ioc *ioc, struct bfa_pcidev *pcidev,
 /**
  * bfa_nw_ioc_mem_claim - Initialize IOC dma memory
  *
+ * @ioc:	memory for IOC
  * @dm_kva:	kernel virtual address of IOC dma memory
  * @dm_pa:	physical address of IOC dma memory
  */
@@ -2636,6 +2640,8 @@ bfa_nw_ioc_mbox_regisr(struct bfa_ioc *ioc, enum bfi_mclass mc,
  *
  * @ioc:	IOC instance
  * @cmd:	Mailbox command
+ * @cbfn:	callback function
+ * @cbarg:	arguments to callback
  *
  * Waits if mailbox is busy. Responsibility of caller to serialize
  */
drivers/net/ethernet/cadence/macb_main.c +3 -3
index 6761f404b8aa..7034dad10cbd 100644
@@ -458,9 +458,9 @@ static void macb_init_buffers(struct macb *bp)
 
 /**
  * macb_set_tx_clk() - Set a clock to a new frequency
- * @clk		Pointer to the clock to change
- * @rate	New frequency in Hz
- * @dev		Pointer to the struct net_device
+ * @clk:	Pointer to the clock to change
+ * @speed:	New frequency in Hz
+ * @dev:	Pointer to the struct net_device
  */
 static void macb_set_tx_clk(struct clk *clk, int speed, struct net_device *dev)
 {
drivers/net/ethernet/calxeda/xgmac.c +2 -0
index 05a3d067c3fc..bbb453c6a5f7 100644
@@ -1246,6 +1246,8 @@ static int xgmac_poll(struct napi_struct *napi, int budget)
 /**
  *  xgmac_tx_timeout
  *  @dev : Pointer to net device structure
+ *  @txqueue: index of the hung transmit queue
+ *
  *  Description: this function is called when a packet transmission fails to
  *   complete within a reasonable tmrate. The driver will mark the error in the
  *   netdev structure and arrange for the device to be reset to a sane state
drivers/net/ethernet/cavium/liquidio/lio_core.c +49 -43

191 lines not on this page · raw message

drivers/net/ethernet/cavium/liquidio/lio_main.c +180 -171

745 lines not on this page · raw message

drivers/net/ethernet/cavium/liquidio/lio_vf_main.c +80 -78

353 lines not on this page · raw message

drivers/net/ethernet/cavium/liquidio/octeon_console.c +6 -6
index 0d2831d10f65..28feabec8fbb 100644
@@ -15,7 +15,7 @@
  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or
  * NONINFRINGEMENT.  See the GNU General Public License for more details.
  ***********************************************************************/
-/**
+/*
  * @file octeon_console.c
  */
 #include <linux/moduleparam.h>
@@ -131,7 +131,7 @@ struct octeon_pci_console_desc {
 	/* Implicit storage for console_addr_array */
 };
 
-/**
+/*
  * This function is the implementation of the get macros defined
  * for individual structure members. The argument are generated
  * by the macros inorder to read only the needed memory.
@@ -160,7 +160,7 @@ static inline u64 __cvmx_bootmem_desc_get(struct octeon_device *oct,
 	}
 }
 
-/**
+/*
  * This function retrieves the string name of a named block. It is
  * more complicated than a simple memcpy() since the named block
  * descriptor may not be directly accessible.
@@ -182,7 +182,7 @@ static void CVMX_BOOTMEM_NAMED_GET_NAME(struct octeon_device *oct,
 
 /* See header file for descriptions of functions */
 
-/**
+/*
  * Check the version information on the bootmem descriptor
  *
  * @param exact_match
@@ -323,7 +323,7 @@ static u64 cvmx_bootmem_phy_named_block_find(struct octeon_device *oct,
 	return result;
 }
 
-/**
+/*
  * Find a named block on the remote Octeon
  *
  * @param name      Name of block to find
@@ -707,7 +707,7 @@ int octeon_add_console(struct octeon_device *oct, u32 console_num,
 	return ret;
 }
 
-/**
+/*
  * Removes all consoles
  *
  * @param oct         octeon device
drivers/net/ethernet/cavium/liquidio/octeon_device.c +2 -2
index 1db29ffde3e5..e506cbed30b1 100644
@@ -1307,7 +1307,7 @@ struct octeon_config *octeon_get_conf(struct octeon_device *oct)
 /* scratch register address is same in all the OCT-II and CN70XX models */
 #define CNXX_SLI_SCRATCH1   0x3C0
 
-/** Get the octeon device pointer.
+/* Get the octeon device pointer.
  *  @param octeon_id  - The id for which the octeon device pointer is required.
  *  @return Success: Octeon device pointer.
  *  @return Failure: NULL.
@@ -1410,7 +1410,7 @@ int octeon_wait_for_ddr_init(struct octeon_device *oct, u32 *timeout)
 	return ret;
 }
 
-/** Get the octeon id assigned to the octeon device passed as argument.
+/* Get the octeon id assigned to the octeon device passed as argument.
  *  This function is exported to other modules.
  *  @param dev - octeon device pointer passed as a void *.
  *  @return octeon device id
drivers/net/ethernet/cavium/liquidio/octeon_droq.c +1 -1
index cf4fe5b17f8a..d4080bddcb6b 100644
@@ -774,7 +774,7 @@ octeon_droq_process_packets(struct octeon_device *oct,
 	return 0;
 }
 
-/**
+/*
  * Utility function to poll for packets. check_hw_for_packets must be
  * called before calling this routine.
  */
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c +3 -2
index 614d07be7181..ad685f5d0a13 100644
@@ -28,7 +28,7 @@
 
 /**
  * octeon_mbox_read:
- * @oct: Pointer mailbox
+ * @mbox: Pointer mailbox
  *
  * Reads the 8-bytes of data from the mbox register
  * Writes back the acknowldgement inidcating completion of read
@@ -285,7 +285,8 @@ static int octeon_mbox_process_cmd(struct octeon_mbox *mbox,
 }
 
 /**
- *octeon_mbox_process_message:
+ * octeon_mbox_process_message
+ * @mbox: mailbox
  *
  * Process the received mbox message.
  */
drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c +4 -4
index 387c357e1b8e..6ed58bc12020 100644
@@ -148,7 +148,7 @@ struct workqueue_struct *cxgb3_wq;
 
 /**
  *	link_report - show link status and link speed/duplex
- *	@p: the port whose settings are to be reported
+ *	@dev: the port whose settings are to be reported
  *
  *	Shows the link status, speed, and duplex of a port.
  */
@@ -304,8 +304,8 @@ void t3_os_link_changed(struct adapter *adapter, int port_id, int link_stat,
 
 /**
  *	t3_os_phymod_changed - handle PHY module changes
- *	@phy: the PHY reporting the module change
- *	@mod_type: new module type
+ *	@adap: the adapter associated with the link change
+ *	@port_id: the port index whose limk status has changed
  *
  *	This is the OS-dependent handler for PHY module changes.  It is
  *	invoked when a PHY module is removed or inserted for any OS-specific
@@ -1200,7 +1200,7 @@ static void cxgb_vlan_mode(struct net_device *dev, netdev_features_t features)
 
 /**
  *	cxgb_up - enable the adapter
- *	@adapter: adapter being enabled
+ *	@adap: adapter being enabled
  *
  *	Called when the first port is enabled, this function performs the
  *	actions necessary to make an adapter operational, such as completing
drivers/net/ethernet/chelsio/cxgb3/sge.c +16 -12
index ee6188dea705..9f5526bfec83 100644
@@ -372,7 +372,7 @@ static void clear_rx_desc(struct pci_dev *pdev, const struct sge_fl *q,
 /**
  *	free_rx_bufs - free the Rx buffers on an SGE free list
  *	@pdev: the PCI device associated with the adapter
- *	@rxq: the SGE free list to clean up
+ *	@q: the SGE free list to clean up
  *
  *	Release the buffers on an SGE free-buffer Rx queue.  HW fetching from
  *	this queue should be stopped before calling this function.
@@ -493,7 +493,7 @@ static inline void ring_fl_db(struct adapter *adap, struct sge_fl *q)
 
 /**
  *	refill_fl - refill an SGE free-buffer list
- *	@adapter: the adapter
+ *	@adap: the adapter
  *	@q: the free-list to refill
  *	@n: the number of new buffers to allocate
  *	@gfp: the gfp flags for allocating new buffers
@@ -568,7 +568,7 @@ static inline void __refill_fl(struct adapter *adap, struct sge_fl *fl)
 
 /**
  *	recycle_rx_buf - recycle a receive buffer
- *	@adapter: the adapter
+ *	@adap: the adapter
  *	@q: the SGE free list
  *	@idx: index of buffer to recycle
  *
@@ -825,6 +825,7 @@ static struct sk_buff *get_packet(struct adapter *adap, struct sge_fl *fl,
  *	get_packet_pg - return the next ingress packet buffer from a free list
  *	@adap: the adapter that received the packet
  *	@fl: the SGE free list holding the packet
+ *	@q: the queue
  *	@len: the packet length including any SGE padding
  *	@drop_thres: # of remaining buffers before we start dropping packets
  *
@@ -1173,6 +1174,7 @@ static void write_wr_hdr_sgl(unsigned int ndesc, struct sk_buff *skb,
  *	@q: the Tx queue
  *	@ndesc: number of descriptors the packet will occupy
  *	@compl: the value of the COMPL bit to use
+ *	@addr: address
  *
  *	Generate a TX_PKT work request to send the supplied packet.
  */
@@ -1516,7 +1518,7 @@ static int ctrl_xmit(struct adapter *adap, struct sge_txq *q,
 
 /**
  *	restart_ctrlq - restart a suspended control queue
- *	@qs: the queue set cotaining the control queue
+ *	@data: the queue set containing the control queue
  *
  *	Resumes transmission on a suspended Tx control queue.
  */
@@ -1622,6 +1624,7 @@ static void setup_deferred_unmapping(struct sk_buff *skb, struct pci_dev *pdev,
  *	@pidx: index of the first Tx descriptor to write
  *	@gen: the generation value to use
  *	@ndesc: number of descriptors the packet will occupy
+ *	@addr: the address
  *
  *	Write an offload work request to send the supplied packet.  The packet
  *	data already carry the work request with most fields populated.
@@ -1733,7 +1736,7 @@ again:	reclaim_completed_tx(adap, q, TX_RECLAIM_CHUNK);
 
 /**
  *	restart_offloadq - restart a suspended offload queue
- *	@qs: the queue set cotaining the offload queue
+ *	@data: the queue set cotaining the offload queue
  *
  *	Resumes transmission on a suspended Tx offload queue.
  */
@@ -1883,7 +1886,7 @@ static inline void deliver_partial_bundle(struct t3cdev *tdev,
 
 /**
  *	ofld_poll - NAPI handler for offload packets in interrupt mode
- *	@dev: the network device doing the polling
+ *	@napi: the network device doing the polling
  *	@budget: polling budget
  *
  *	The NAPI handler for offload packets when a response queue is serviced
@@ -2007,7 +2010,7 @@ static void restart_tx(struct sge_qset *qs)
 
 /**
  *	cxgb3_arp_process - process an ARP request probing a private IP address
- *	@adapter: the adapter
+ *	@pi: the port info
  *	@skb: the skbuff containing the ARP request
  *
  *	Check if the ARP request is probing the private IP address
@@ -2069,7 +2072,8 @@ static void cxgb3_process_iscsi_prov_pack(struct port_info *pi,
  *	@adap: the adapter
  *	@rq: the response queue that received the packet
  *	@skb: the packet
- *	@pad: amount of padding at the start of the buffer
+ *	@pad: padding
+ *	@lro: large receive offload
  *
  *	Process an ingress ethernet pakcet and deliver it to the stack.
  *	The padding is 2 if the packet was delivered in an Rx buffer and 0
@@ -2239,7 +2243,7 @@ static inline void handle_rsp_cntrl_info(struct sge_qset *qs, u32 flags)
 
 /**
  *	check_ring_db - check if we need to ring any doorbells
- *	@adapter: the adapter
+ *	@adap: the adapter
  *	@qs: the queue set whose Tx queues are to be examined
  *	@sleeping: indicates which Tx queue sent GTS
  *
@@ -2899,7 +2903,7 @@ void t3_sge_err_intr_handler(struct adapter *adapter)
 
 /**
  *	sge_timer_tx - perform periodic maintenance of an SGE qset
- *	@data: the SGE queue set to maintain
+ *	@t: a timer list containing the SGE queue set to maintain
  *
  *	Runs periodically from a timer to perform maintenance of an SGE queue
  *	set.  It performs two tasks:
@@ -2943,7 +2947,7 @@ static void sge_timer_tx(struct timer_list *t)
 
 /**
  *	sge_timer_rx - perform periodic maintenance of an SGE qset
- *	@data: the SGE queue set to maintain
+ *	@t: the timer list containing the SGE queue set to maintain
  *
  *	a) Replenishes Rx queues that have run out due to memory shortage.
  *	Normally new Rx buffers are added when existing ones are consumed but
@@ -3021,7 +3025,7 @@ void t3_update_qset_coalesce(struct sge_qset *qs, const struct qset_params *p)
  *	@irq_vec_idx: the IRQ vector index for response queue interrupts
  *	@p: configuration parameters for this queue set
  *	@ntxq: number of Tx queues for the queue set
- *	@netdev: net device associated with this queue set
+ *	@dev: net device associated with this queue set
  *	@netdevq: net device TX queue associated with this queue set
  *
  *	Allocate resources and initialize an SGE queue set.  A queue set
drivers/net/ethernet/chelsio/cxgb3/t3_hw.c +3 -2
index 311fed38c101..7ff31d1026fb 100644
@@ -2484,6 +2484,7 @@ int t3_sge_disable_cqcntxt(struct adapter *adapter, unsigned int id)
  *	@adapter: the adapter
  *	@id: the context id
  *	@op: the operation to perform
+ *	@credits: credit value to write
  *
  *	Perform the selected operation on an SGE completion queue context.
  *	The caller is responsible for ensuring only one context operation
@@ -2885,7 +2886,7 @@ static void init_cong_ctrl(unsigned short *a, unsigned short *b)
  *	t3_load_mtus - write the MTU and congestion control HW tables
  *	@adap: the adapter
  *	@mtus: the unrestricted values for the MTU table
- *	@alphs: the values for the congestion control alpha parameter
+ *	@alpha: the values for the congestion control alpha parameter
  *	@beta: the values for the congestion control beta parameter
  *	@mtu_cap: the maximum permitted effective MTU
  *
@@ -3483,7 +3484,7 @@ static void get_pci_mode(struct adapter *adapter, struct pci_params *p)
 /**
  *	init_link_config - initialize a link's SW state
  *	@lc: structure holding the link state
- *	@ai: information about the current card
+ *	@caps: information about the current card
  *
  *	Initializes the SW state maintained for each link, including the link's
  *	capabilities and default speed/duplex/flow-control/autonegotiation
drivers/net/ethernet/cisco/enic/enic_api.c +1 -1
index b161f24522b8..89915681473c 100644
@@ -1,4 +1,4 @@
-/**
+/*
  * Copyright 2013 Cisco Systems, Inc.  All rights reserved.
  *
  * This program is free software; you may redistribute it and/or modify
drivers/net/ethernet/cisco/enic/enic_ethtool.c +1 -1
index 4d8e0aa447fb..a4dd52bba2c3 100644
@@ -1,4 +1,4 @@
-/**
+/*
  * Copyright 2013 Cisco Systems, Inc.  All rights reserved.
  *
  * This program is free software; you may redistribute it and/or modify
drivers/net/ethernet/cortina/gemini.c +2 -0
index 07e9dee03c98..8df6f081f244 100644
@@ -85,6 +85,8 @@ MODULE_PARM_DESC(debug, "Debug level (0=none,...,16=all)");
 
 /**
  * struct gmac_queue_page - page buffer per-page info
+ * @page: the page struct
+ * @mapping: the dma address handle
  */
 struct gmac_queue_page {
 	struct page *page;
drivers/net/ethernet/ethoc.c +5 -1
index a817ca661c1f..0981fe9652e5 100644
@@ -177,6 +177,7 @@ MODULE_PARM_DESC(buffer_size, "DMA buffer allocation size");
  * struct ethoc - driver-private device structure
  * @iobase:	pointer to I/O memory region
  * @membase:	pointer to buffer memory region
+ * @big_endian: just big or little (endian)
  * @num_bd:	number of buffer descriptors
  * @num_tx:	number of send buffers
  * @cur_tx:	last send buffer written
@@ -189,7 +190,10 @@ MODULE_PARM_DESC(buffer_size, "DMA buffer allocation size");
  * @msg_enable:	device state flags
  * @lock:	device lock
  * @mdio:	MDIO bus for PHY access
+ * @clk:	clock
  * @phy_id:	address of attached PHY
+ * @old_link:	previous link info
+ * @old_duplex: previous duplex info
  */
 struct ethoc {
 	void __iomem *iobase;
@@ -1015,7 +1019,7 @@ static const struct net_device_ops ethoc_netdev_ops = {
 
 /**
  * ethoc_probe - initialize OpenCores ethernet MAC
- * pdev:	platform device
+ * @pdev:	platform device
  */
 static int ethoc_probe(struct platform_device *pdev)
 {
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c +1 -1
index ceaf76158e23..03b3b4287fe8 100644
@@ -1194,7 +1194,7 @@ static int dpaa2_eth_seed_pool(struct dpaa2_eth_priv *priv, u16 bpid)
 	return 0;
 }
 
-/**
+/*
  * Drain the specified number of buffers from the DPNI's private buffer pool.
  * @count must not exceeed DPAA2_ETH_BUFS_PER_CMD
  */
drivers/net/ethernet/freescale/fec_ptp.c +3 -2
index 0405a3975f3f..2e344aada4c6 100644
@@ -512,7 +512,7 @@ int fec_ptp_get(struct net_device *ndev, struct ifreq *ifr)
 		-EFAULT : 0;
 }
 
-/**
+/*
  * fec_time_keep - call timecounter_read every second to avoid timer overrun
  *                 because ENET just support 32bit counter, will timeout in 4s
  */
@@ -566,7 +566,8 @@ static irqreturn_t fec_pps_interrupt(int irq, void *dev_id)
 
 /**
  * fec_ptp_init
- * @ndev: The FEC network adapter
+ * @pdev: The FEC network adapter
+ * @irq_idx: the interrupt index
  *
  * This function performs the required steps for enabling ptp
  * support. If ptp support has already been loaded it simply calls the
drivers/net/ethernet/freescale/fman/fman.c +7 -7
index ef67e8599b39..ce0a121580f6 100644
@@ -2063,11 +2063,11 @@ static int fman_set_exception(struct fman *fman,
 /**
  * fman_register_intr
  * @fman:	A Pointer to FMan device
- * @mod:	Calling module
+ * @module:	Calling module
  * @mod_id:	Module id (if more than 1 exists, '0' if not)
  * @intr_type:	Interrupt type (error/normal) selection.
- * @f_isr:	The interrupt service routine.
- * @h_src_arg:	Argument to be passed to f_isr.
+ * @isr_cb:	The interrupt service routine.
+ * @src_arg:	Argument to be passed to isr_cb.
  *
  * Used to register an event handler to be processed by FMan
  *
@@ -2091,7 +2091,7 @@ EXPORT_SYMBOL(fman_register_intr);
 /**
  * fman_unregister_intr
  * @fman:	A Pointer to FMan device
- * @mod:	Calling module
+ * @module:	Calling module
  * @mod_id:	Module id (if more than 1 exists, '0' if not)
  * @intr_type:	Interrupt type (error/normal) selection.
  *
@@ -2342,8 +2342,8 @@ EXPORT_SYMBOL(fman_get_bmi_max_fifo_size);
 
 /**
  * fman_get_revision
- * @fman		- Pointer to the FMan module
- * @rev_info		- A structure of revision information parameters.
+ * @fman:		- Pointer to the FMan module
+ * @rev_info:		- A structure of revision information parameters.
  *
  * Returns the FM revision
  *
@@ -2508,7 +2508,7 @@ EXPORT_SYMBOL(fman_get_rx_extra_headroom);
 
 /**
  * fman_bind
- * @dev:	FMan OF device pointer
+ * @fm_dev:	FMan OF device pointer
  *
  * Bind to a specific FMan device.
  *
drivers/net/ethernet/freescale/fman/fman_muram.c +3 -3
index 5ec94d243da0..7ad317e622bc 100644
@@ -144,9 +144,9 @@ unsigned long fman_muram_alloc(struct muram_info *muram, size_t size)
 
 /**
  * fman_muram_free_mem
- * muram:	FM-MURAM module pointer.
- * offset:	offset of the memory region to be freed.
- * size:	size of the memory to be freed.
+ * @muram:	FM-MURAM module pointer.
+ * @offset:	offset of the memory region to be freed.
+ * @size:	size of the memory to be freed.
  *
  * Free an allocated memory from FM-MURAM partition.
  */
drivers/net/ethernet/freescale/fman/fman_port.c +13 -10
index 624b2eb6f01d..d9baac0dbc7d 100644
@@ -1410,9 +1410,11 @@ int fman_port_config(struct fman_port *port, struct fman_port_params *params)
 }
 EXPORT_SYMBOL(fman_port_config);
 
-/**
+/*
  * fman_port_use_kg_hash
- * port:        A pointer to a FM Port module.
+ * @port: A pointer to a FM Port module.
+ * @enable: enable or disable
+ *
  * Sets the HW KeyGen or the BMI as HW Parser next engine, enabling
  * or bypassing the KeyGen hashing of Rx traffic
  */
@@ -1430,7 +1432,8 @@ EXPORT_SYMBOL(fman_port_use_kg_hash);
 
 /**
  * fman_port_init
- * port:	A pointer to a FM Port module.
+ * @port:	A pointer to a FM Port module.
+ *
  * Initializes the FM PORT module by defining the software structure and
  * configuring the hardware registers.
  *
@@ -1524,8 +1527,8 @@ EXPORT_SYMBOL(fman_port_init);
 
 /**
  * fman_port_cfg_buf_prefix_content
- * @port			A pointer to a FM Port module.
- * @buffer_prefix_content	A structure of parameters describing
+ * @port:			A pointer to a FM Port module.
+ * @buffer_prefix_content:	A structure of parameters describing
  *				the structure of the buffer.
  *				Out parameter:
  *				Start margin - offset of data from
@@ -1570,7 +1573,7 @@ EXPORT_SYMBOL(fman_port_cfg_buf_prefix_content);
 
 /**
  * fman_port_disable
- * port:	A pointer to a FM Port module.
+ * @port:	A pointer to a FM Port module.
  *
  * Gracefully disable an FM port. The port will not start new	tasks after all
  * tasks associated with the port are terminated.
@@ -1651,7 +1654,7 @@ EXPORT_SYMBOL(fman_port_disable);
 
 /**
  * fman_port_enable
- * port:	A pointer to a FM Port module.
+ * @port:	A pointer to a FM Port module.
  *
  * A runtime routine provided to allow disable/enable of port.
  *
@@ -1697,7 +1700,7 @@ EXPORT_SYMBOL(fman_port_enable);
 
 /**
  * fman_port_bind
- * dev:		FMan Port OF device pointer
+ * @dev:		FMan Port OF device pointer
  *
  * Bind to a specific FMan Port.
  *
@@ -1713,7 +1716,7 @@ EXPORT_SYMBOL(fman_port_bind);
 
 /**
  * fman_port_get_qman_channel_id
- * port:	Pointer to the FMan port devuce
+ * @port:	Pointer to the FMan port devuce
  *
  * Get the QMan channel ID for the specific port
  *
@@ -1727,7 +1730,7 @@ EXPORT_SYMBOL(fman_port_get_qman_channel_id);
 
 /**
  * fman_port_get_device
- * port:	Pointer to the FMan port device
+ * @port:	Pointer to the FMan port device
  *
  * Get the 'struct device' associated to the specified FMan port device
  *
drivers/net/ethernet/freescale/fman/mac.c +2 -2
index 43427c5b9396..901749a7a318 100644
@@ -359,8 +359,8 @@ EXPORT_SYMBOL(fman_set_mac_active_pause);
 /**
  * fman_get_pause_cfg
  * @mac_dev:	A pointer to the MAC device
- * @rx:		Return value for RX setting
- * @tx:		Return value for TX setting
+ * @rx_pause:	Return value for RX setting
+ * @tx_pause:	Return value for TX setting
  *
  * Determine the MAC RX/TX PAUSE frames settings based on PHY
  * autonegotiation or values set by eththool.
drivers/net/ethernet/hisilicon/hns/hnae.c +1 -1
index e017b7c34140..00fafc0f8512 100644
@@ -270,7 +270,7 @@ static void hnae_fini_queue(struct hnae_queue *q)
 	hnae_fini_ring(&q->rx_ring);
 }
 
-/**
+/*
  * ae_chain - define ae chain head
  */
 static RAW_NOTIFIER_HEAD(ae_chain);
drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c +17 -17
index 9a907947ba19..4a448138b4ec 100644
@@ -374,11 +374,12 @@ static void hns_mac_param_get(struct mac_params *param,
 }
 
 /**
- *hns_mac_queue_config_bc_en - set broadcast rx&tx enable
- *@mac_cb: mac device
- *@queue: queue number
- *@en:enable
- *retuen 0 - success , negative --fail
+ * hns_mac_queue_config_bc_en - set broadcast rx&tx enable
+ * @mac_cb: mac device
+ * @port_num: queue number
+ * @vlan_id: vlan id`
+ * @enable: enable
+ * return 0 - success , negative --fail
  */
 static int hns_mac_port_config_bc_en(struct hns_mac_cb *mac_cb,
 				     u32 port_num, u16 vlan_id, bool enable)
@@ -408,11 +409,11 @@ static int hns_mac_port_config_bc_en(struct hns_mac_cb *mac_cb,
 }
 
 /**
- *hns_mac_vm_config_bc_en - set broadcast rx&tx enable
- *@mac_cb: mac device
- *@vmid: vm id
- *@en:enable
- *retuen 0 - success , negative --fail
+ * hns_mac_vm_config_bc_en - set broadcast rx&tx enable
+ * @mac_cb: mac device
+ * @vmid: vm id
+ * @enable: enable
+ * return 0 - success , negative --fail
  */
 int hns_mac_vm_config_bc_en(struct hns_mac_cb *mac_cb, u32 vmid, bool enable)
 {
@@ -542,8 +543,8 @@ void hns_mac_stop(struct hns_mac_cb *mac_cb)
 /**
  * hns_mac_get_autoneg - get auto autonegotiation
  * @mac_cb: mac control block
- * @enable: enable or not
- * retuen 0 - success , negative --fail
+ * @auto_neg: output pointer to autoneg result
+ * return 0 - success , negative --fail
  */
 void hns_mac_get_autoneg(struct hns_mac_cb *mac_cb, u32 *auto_neg)
 {
@@ -560,7 +561,7 @@ void hns_mac_get_autoneg(struct hns_mac_cb *mac_cb, u32 *auto_neg)
  * @mac_cb: mac control block
  * @rx_en: rx enable status
  * @tx_en: tx enable status
- * retuen 0 - success , negative --fail
+ * return 0 - success , negative --fail
  */
 void hns_mac_get_pauseparam(struct hns_mac_cb *mac_cb, u32 *rx_en, u32 *tx_en)
 {
@@ -578,7 +579,7 @@ void hns_mac_get_pauseparam(struct hns_mac_cb *mac_cb, u32 *rx_en, u32 *tx_en)
  * hns_mac_set_autoneg - set auto autonegotiation
  * @mac_cb: mac control block
  * @enable: enable or not
- * retuen 0 - success , negative --fail
+ * return 0 - success , negative --fail
  */
 int hns_mac_set_autoneg(struct hns_mac_cb *mac_cb, u8 enable)
 {
@@ -623,7 +624,7 @@ int hns_mac_set_pauseparam(struct hns_mac_cb *mac_cb, u32 rx_en, u32 tx_en)
 /**
  * hns_mac_init_ex - mac init
  * @mac_cb: mac control block
- * retuen 0 - success , negative --fail
+ * return 0 - success , negative --fail
  */
 static int hns_mac_init_ex(struct hns_mac_cb *mac_cb)
 {
@@ -800,7 +801,6 @@ static const struct {
 /**
  *hns_mac_get_info  - get mac information from device node
  *@mac_cb: mac device
- *@np:device node
  * return: 0 --success, negative --fail
  */
 static int hns_mac_get_info(struct hns_mac_cb *mac_cb)
@@ -951,7 +951,7 @@ static int hns_mac_get_info(struct hns_mac_cb *mac_cb)
 /**
  * hns_mac_get_mode - get mac mode
  * @phy_if: phy interface
- * retuen 0 - gmac, 1 - xgmac , negative --fail
+ * return 0 - gmac, 1 - xgmac , negative --fail
  */
 static int hns_mac_get_mode(phy_interface_t phy_if)
 {
drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c +78 -70

412 lines not on this page · raw message

drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c +4 -3
index ed3829ae4ef1..d5c5887aa468 100644
@@ -330,11 +330,11 @@ static void hns_dsaf_xge_srst_by_port_acpi(struct dsaf_device *dsaf_dev,
  * hns_dsaf_srst_chns - reset dsaf channels
  * @dsaf_dev: dsaf device struct pointer
  * @msk: xbar channels mask value:
+ * @dereset: false - request reset , true - drop reset
  * bit0-5 for xge0-5
  * bit6-11 for ppe0-5
  * bit12-17 for roce0-5
  * bit18-19 for com/dfx
- * @enable: false - request reset , true - drop reset
  */
 static void
 hns_dsaf_srst_chns(struct dsaf_device *dsaf_dev, u32 msk, bool dereset)
@@ -353,11 +353,11 @@ hns_dsaf_srst_chns(struct dsaf_device *dsaf_dev, u32 msk, bool dereset)
  * hns_dsaf_srst_chns - reset dsaf channels
  * @dsaf_dev: dsaf device struct pointer
  * @msk: xbar channels mask value:
+ * @dereset: false - request reset , true - drop reset
  * bit0-5 for xge0-5
  * bit6-11 for ppe0-5
  * bit12-17 for roce0-5
  * bit18-19 for com/dfx
- * @enable: false - request reset , true - drop reset
  */
 static void
 hns_dsaf_srst_chns_acpi(struct dsaf_device *dsaf_dev, u32 msk, bool dereset)
@@ -612,7 +612,8 @@ static int hns_mac_get_sfp_prsnt_acpi(struct hns_mac_cb *mac_cb, int *sfp_prsnt)
 /**
  * hns_mac_config_sds_loopback - set loop back for serdes
  * @mac_cb: mac control block
- * retuen 0 == success
+ * @en: enable or disable
+ * return 0 == success
  */
 static int hns_mac_config_sds_loopback(struct hns_mac_cb *mac_cb, bool en)
 {
drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.c +9 -8
index 2b34b553acf3..d0f8b1fff333 100644
@@ -66,8 +66,8 @@ hns_ppe_common_get_ioaddr(struct ppe_common_cb *ppe_common)
 /**
  * hns_ppe_common_get_cfg - get ppe common config
  * @dsaf_dev: dasf device
- * comm_index: common index
- * retuen 0 - success , negative --fail
+ * @comm_index: common index
+ * return 0 - success , negative --fail
  */
 static int hns_ppe_common_get_cfg(struct dsaf_device *dsaf_dev, int comm_index)
 {
@@ -143,7 +143,7 @@ static void hns_ppe_set_vlan_strip(struct hns_ppe_cb *ppe_cb, int en)
 
 /**
  * hns_ppe_checksum_hw - set ppe checksum caculate
- * @ppe_device: ppe device
+ * @ppe_cb: ppe device
  * @value: value
  */
 static void hns_ppe_checksum_hw(struct hns_ppe_cb *ppe_cb, u32 value)
@@ -179,7 +179,7 @@ static void hns_ppe_set_qid(struct ppe_common_cb *ppe_common, u32 qid)
 
 /**
  * hns_ppe_set_port_mode - set port mode
- * @ppe_device: ppe device
+ * @ppe_cb: ppe device
  * @mode: port mode
  */
 static void hns_ppe_set_port_mode(struct hns_ppe_cb *ppe_cb,
@@ -344,7 +344,7 @@ static void hns_ppe_init_hw(struct hns_ppe_cb *ppe_cb)
 
 /**
  * ppe_uninit_hw - uninit ppe
- * @ppe_device: ppe device
+ * @ppe_cb: ppe device
  */
 static void hns_ppe_uninit_hw(struct hns_ppe_cb *ppe_cb)
 {
@@ -384,7 +384,8 @@ void hns_ppe_uninit(struct dsaf_device *dsaf_dev)
 /**
  * hns_ppe_reset - reinit ppe/rcb hw
  * @dsaf_dev: dasf device
- * retuen void
+ * @ppe_common_index: the index
+ * return void
  */
 void hns_ppe_reset_common(struct dsaf_device *dsaf_dev, u8 ppe_common_index)
 {
@@ -455,7 +456,7 @@ int hns_ppe_get_regs_count(void)
 
 /**
  * ppe_get_strings - get ppe srting
- * @ppe_device: ppe device
+ * @ppe_cb: ppe device
  * @stringset: string set type
  * @data: output string
  */
@@ -513,7 +514,7 @@ void hns_ppe_get_stats(struct hns_ppe_cb *ppe_cb, u64 *data)
 /**
  * hns_ppe_init - init ppe device
  * @dsaf_dev: dasf device
- * retuen 0 - success , negative --fail
+ * return 0 - success , negative --fail
  */
 int hns_ppe_init(struct dsaf_device *dsaf_dev)
 {
drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c +4 -3
index 5453597ec629..b6c8910cf7ba 100644
@@ -34,7 +34,7 @@
 /**
  *hns_rcb_wait_fbd_clean - clean fbd
  *@qs: ring struct pointer array
- *@qnum: num of array
+ *@q_num: num of array
  *@flag: tx or rx flag
  */
 void hns_rcb_wait_fbd_clean(struct hnae_queue **qs, int q_num, u32 flag)
@@ -191,7 +191,8 @@ void hns_rcbv2_int_clr_hw(struct hnae_queue *q, u32 flag)
 
 /**
  *hns_rcb_ring_enable_hw - enable ring
- *@ring: rcb ring
+ *@q: rcb ring
+ *@val: value to write
  */
 void hns_rcb_ring_enable_hw(struct hnae_queue *q, u32 val)
 {
@@ -844,7 +845,7 @@ void hns_rcb_update_stats(struct hnae_queue *queue)
 
 /**
  *hns_rcb_get_stats - get rcb statistic
- *@ring: rcb ring
+ *@queue: rcb ring
  *@data:statistic value
  */
 void hns_rcb_get_stats(struct hnae_queue *queue, u64 *data)
drivers/net/ethernet/hisilicon/hns/hns_dsaf_xgmac.c +2 -1
index d832cd018c1c..7e3609ce112a 100644
@@ -242,7 +242,8 @@ static void hns_xgmac_config_pad_and_crc(void *mac_drv, u8 newval)
 /**
  *hns_xgmac_pausefrm_cfg - set pause param about xgmac
  *@mac_drv: mac driver
- *@newval:enable of pad and crc
+ *@rx_en: enable receive
+ *@tx_en: enable transmit
  */
 static void hns_xgmac_pausefrm_cfg(void *mac_drv, u32 rx_en, u32 tx_en)
 {
drivers/net/ethernet/hisilicon/hns/hns_enet.c +3 -1
index b658b9de81d7..b9fd4a716527 100644
@@ -751,6 +751,8 @@ static void hns_update_rx_rate(struct hnae_ring *ring)
 
 /**
  * smooth_alg - smoothing algrithm for adjusting coalesce parameter
+ * @new_param: new value
+ * @old_param: old value
  **/
 static u32 smooth_alg(u32 new_param, u32 old_param)
 {
@@ -1828,7 +1830,7 @@ static int hns_nic_uc_unsync(struct net_device *netdev,
 }
 
 /**
- * nic_set_multicast_list - set mutl mac address
+ * hns_set_multicast_list - set mutl mac address
  * @ndev: net device
  *
  * return void
drivers/net/ethernet/hisilicon/hns/hns_ethtool.c +24 -24

51 lines not on this page · raw message

drivers/net/ethernet/hisilicon/hns_mdio.c +1 -2
index 7df5d7d211d4..883d0d7c6858 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c +1 -1
index e0eb294779ec..5a6bbee819cd 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c +5 -1
index 239685152f6e..7f1a92a6c7ec 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/huawei/hinic/hinic_hw_eqs.c +1 -0
index b30733f4a59e..83296c7aab90 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/huawei/hinic/hinic_hw_if.c +1 -0
index bc8925c0c982..50f14e014656 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c +1 -0
index c6ce5966284c..b6d5a34325f4 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/huawei/hinic/hinic_main.c +1 -1
index 797c55a1d9c6..8039bd329b3c 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/micrel/ksz884x.c +27 -19

46 lines not on this page · raw message

drivers/net/ethernet/microchip/encx24j600-regmap.c +1 -1
index 5bd7fb917b7a..796e46a53926 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/natsemi/ns83820.c +4 -2
index 8e24c7acf79b..1460d790240b 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/neterion/s2io.c +46 -45

91 lines not on this page · raw message

drivers/net/ethernet/neterion/vxge/vxge-config.c +4 -1
index 78eba10300ae..6aba267036dd 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/neterion/vxge/vxge-ethtool.c +1 -1
index 03c3d1230c17..4d91026485ae 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/neterion/vxge/vxge-main.c +7 -3
index 7afdb3bc631c..87892bd992b1 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/neterion/vxge/vxge-traffic.c +16 -24
index bd525e8eda10..ee164970b267 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_ethtool.c +2 -2
index b36aa5bf3c5f..a58f14aca10c 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c +3 -2
index 23f7c76737c9..ade8c44c01cd 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_param.c +7 -7
index dceec80fd642..81fc5a6e3221 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/packetengines/yellowfin.c +1 -1
index 3da075307178..d1dd9bc1bc7f 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/qlogic/netxen/netxen_nic.h +0 -3
index 86153660d245..e5c51256243a 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c +3 -0
index c3f50ddbe824..dd22cb056d03 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/qualcomm/emac/emac.c +1 -0
index 1166b98d8bb2..8543bf3c3484 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/realtek/8139cp.c +2 -0
index e291e6ac40cb..2f2567341710 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c +12 -5
index 2cc8184b7e6b..971f1e54b652 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/sfc/falcon/rx.c +2 -0
index 05ea3523890a..966f13e7475d 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/sfc/falcon/selftest.c +1 -1
index 147677c7c72f..6a454ac6f876 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/sfc/net_driver.h +1 -1
index 3fd0b59107d1..f7d1eeb71de0 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/sfc/ptp.c +6 -0
index bea4725a4499..00cbd3ac6d99 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/sis/sis900.c +2 -1
index 869b7618e2ba..620c26f71be8 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c +1 -1
index 2d5573b3dee1..6ef30252bfe0 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +9 -5
index 3fa24b310d20..505e3e0b8eb5 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +2 -1
index f32317fa75c8..af34a4cadbb0 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/sun/cassini.c +2 -2
index b624e177ec71..9ff894ba8d3e 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/tehuti/tehuti.c +12 -5
index e28727297563..036477aff29d 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/ti/davinci_cpdma.c +1 -1
index 6614fa3089b2..d2eab5cd1e0c 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/ti/davinci_emac.c +3 -2
index b36d0e412d23..c7031e1960d4 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/via/via-rhine.c +1 -1
index 803247d51fe9..26e6b087c0e4 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/via/via-velocity.c +14 -13
index 722b44604ea8..b65767f9e499 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.27.0

Part of the diff is not shown here. View the raw message.

#25 lore raw

Re: [RFC PATCH net-next v1 11/11] drivers/net/ethernet: clean up mis-targeted comments

Quoted 11 lines · Jesse Brandeburg

As part of the W=1 cleanups for ethernet, a million [1] 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.

[1] - ok it wasn't quite a million, but it felt like it.

---

drivers/net/ethernet/sfc/ptp.c struct efx_ptp_timeset { · line 271

Quoted 4 lines
drivers/net/ethernet/sfc/ptp.c +1 -0
@@ -263,6 +268,7 @@ struct efx_ptp_timeset {
  * @nic_ts_enabled: Flag indicating if NIC generated TS events are handled
  * @txbuf: Buffer for use when transmitting (PTP) packets to MC (avoids
  *         allocations in main data path).
+ * @MC_CMD_PTP_IN_TRANSMIT_LENMAX: hack to get W=1 to compile

I think I'd rather have a bogus warning than bogus kerneldocto suppress it; ?please drop this line (and encourage toolchain folks to figure out how to ?get kerneldoc to ignore macros it can't understand).
Apart from that, the sfc and sfc/falcon parts LGTM.

-ed

#26 lore raw

Re: [RFC PATCH net-next v1 11/11] drivers/net/ethernet: clean up mis-targeted comments

Quoted 9 lines · Edward Cree
Quoted 1 line · Jesse Brandeburg

+ * @MC_CMD_PTP_IN_TRANSMIT_LENMAX: hack to get W=1 to compile

I think I'd rather have a bogus warning than bogus kerneldocto suppress it; ?please drop this line (and encourage toolchain folks to figure out how to ?get kerneldoc to ignore macros it can't understand).
Apart from that, the sfc and sfc/falcon parts LGTM.

-ed

Thanks Ed, I think I might just remove the /** on that function then (removing it from kdoc processing), would that be acceptable in the meantime? Of course I'd remove the line I added as well.

- Jesse

#27 lore raw

Re: [RFC PATCH net-next v1 11/11] drivers/net/ethernet: clean up mis-targeted comments

Quoted 2 lines · Jesse Brandeburg

Thanks Ed, I think I might just remove the /** on that function then (removing it from kdoc processing)

I dunno, that means
a) kerneldoc won't generate html for this struct
b) new additions to the struct without corresponding kerneldoc won't ?? generate warnings
?both of which are not ideal outcomes.
I realise there's value in having totally warning-clean code, but in ?this case I think this one warning, even though it's indicating a ?toolchain problem rather than a codebase problem, should better stay ?(if only to put pressure on the toolchain to fix it). Otherwise, when and if the toolchain is fixed, what's the chance we'll ?remember to put the /** back?

That's just my opinion, though; I won't block patches that disagree.

-ed

maintainer
#28 lore raw

Re: [RFC PATCH net-next v1 11/11] drivers/net/ethernet: clean up mis-targeted comments

Quoted 15 lines · On Fri, 11 Sep 2020 22:55:54 +0100 Edward Cree wrote:
Quoted 2 lines · Jesse Brandeburg

Thanks Ed, I think I might just remove the /** on that function then (removing it from kdoc processing)

I dunno, that means
a) kerneldoc won't generate html for this struct
b) new additions to the struct without corresponding kerneldoc won't ?? generate warnings
?both of which are not ideal outcomes.
I realise there's value in having totally warning-clean code, but in ?this case I think this one warning, even though it's indicating a ?toolchain problem rather than a codebase problem, should better stay ?(if only to put pressure on the toolchain to fix it). Otherwise, when and if the toolchain is fixed, what's the chance we'll ?remember to put the /** back?

Quoted 1 line

That's just my opinion, though; I won't block patches that disagree.

"Toolchain" sounds a little grand in this context, the script that parses kdoc does basic regexps to convert the standard kernel macros:

	# replace DECLARE_BITMAP
	$members =~ s/__ETHTOOL_DECLARE_LINK_MODE_MASK\s*\(([^\)]+)\)/DECLARE_BITMAP($1, __ETHTOOL_LINK_MODE_MASK_NBITS)/gos;
	$members =~ s/DECLARE_BITMAP\s*\(([^,)]+),\s*([^,)]+)\)/unsigned long $1\[BITS_TO_LONGS($2)\]/gos;
	# replace DECLARE_HASHTABLE
	$members =~ s/DECLARE_HASHTABLE\s*\(([^,)]+),\s*([^,)]+)\)/unsigned long $1\[1 << (($2) - 1)\]/gos;
	# replace DECLARE_KFIFO
	$members =~ s/DECLARE_KFIFO\s*\(([^,)]+),\s*([^,)]+),\s*([^,)]+)\)/$2 \*$1/gos;
	# replace DECLARE_KFIFO_PTR
	$members =~ s/DECLARE_KFIFO_PTR\s*\(([^,)]+),\s*([^,)]+)\)/$2 \*$1/gos;

IDK if we can expect it to understand random driver's macros..

This is the only use of _MCDI_DECLARE_BUF() in the tree, how about converting the declaration to:

#declare _MCDI_BUF_LEN(_len) DIV_ROUND_UP(_len, 4)

	efx_dword_t txbuf[_MCDI_BUF_LEN(MC_CMD_PTP_IN_TRANSMIT_LENMAX)];

Would that work?

#29 lore raw

Re: [RFC PATCH net-next v1 11/11] drivers/net/ethernet: clean up mis-targeted comments

Quoted 4 lines · Jakub Kicinski

"Toolchain" sounds a little grand in this context, the script that parses kdoc does basic regexps to convert the standard kernel macros:
...
IDK if we can expect it to understand random driver's macros..

I wasn't suggesting it should _understand_ this macro, justrecognise ?when something _is_ a macro it doesn't understand, and refrain from ?warning about it in that case.
But I don't know how hard that would be to achieve ? not being fluent ?in Perl, scripts/kernel-doc is mostly line noise to me.? My best ?guess is that on seeing 'DECLARE_A_THING(name, argument);' it reads ?it as though it were 'DECLARE_A_THING name, argument;', mistaking ?the macro name for a type.
I think the only way non-macro declarations can legitimately contain ?parens is in function pointer types, in which case the contents of ?the parens are part of the type and not declared identifiers.? So ?shouldn't kernel-doc ignore anything within parens?

Quoted 1 line

This is the only use of _MCDI_DECLARE_BUF() in the tree

Well, except for mcdi.h's
??? #define MCDI_DECLARE_BUF(_name, _len) _MCDI_DECLARE_BUF(_name, _len) = {{{0}}}

Quoted 7 lines

, how about converting the declaration to:

#declare _MCDI_BUF_LEN(_len) DIV_ROUND_UP(_len, 4)

	efx_dword_t txbuf[_MCDI_BUF_LEN(MC_CMD_PTP_IN_TRANSMIT_LENMAX)];

Would that work?

That could work, yes.? Though, probably lose the leading underscore ?in that case.

-ed

#30 lore raw

Re: [RFC PATCH net-next v1 11/11] drivers/net/ethernet: clean up mis-targeted comments

Quoted 8 lines · Edward Cree
Quoted 5 lines · Jakub Kicinski

#declare _MCDI_BUF_LEN(_len) DIV_ROUND_UP(_len, 4)

	efx_dword_t txbuf[_MCDI_BUF_LEN(MC_CMD_PTP_IN_TRANSMIT_LENMAX)];

Would that work?

That could work, yes.? Though, probably lose the leading underscore ?in that case.

Ok, I made a split-out patch for that change in v2, it seems to work once I found a name that didn't collide.

Thanks for the useful discussion!

#31 lore raw

Re: [RFC PATCH net-next v1 11/11] drivers/net/ethernet: clean up mis-targeted comments

In reply to Edward Cree
Quoted 8 lines · Edward Cree
Quoted 4 lines · Jakub Kicinski

"Toolchain" sounds a little grand in this context, the script that parses kdoc does basic regexps to convert the standard kernel macros:
...
IDK if we can expect it to understand random driver's macros..

I wasn't suggesting it should _understand_ this macro, justrecognise ?when something _is_ a macro it doesn't understand, and refrain from ?warning about it in that case.

Is it possible to get the C preprocessor to expand the macros without stripping the comments? Run the kerneldoc validator on that?

Andrew

maintainer Reviewed-by on the v1 series
#32 lore raw
In reply to Jesse Brandeburg
Quoted 11 lines · On Thu, 10 Sep 2020 18:23:26 -0700 Jesse Brandeburg wrote:

This series is a placeholder to show I've about finished this work.

After applying the patches below, the drivers/net/ethernet directory can be built as modules with W=1 with no warnings.

This series removes 1,283 warnings and hopefully allows the ethernet directory to move forward from here without more warnings being added.

Some of these patches are already sent to Intel Wired Lan, but the rest of the series titled drivers/net/ethernet affects other drivers, not just Intel, but they depend on the first five.

Great stuff. Much easier to apply one large series than a thousand small patches. I haven't read all the comment changes but FWIW:

I feel slightly bad for saying this but I think your config did not include all the drivers, 'cause I'm still getting some warnings after patch 11. Regardless this is impressive effort, thanks!

#33 lore raw
Quoted 9 lines · Jakub Kicinski
Quoted 3 lines · On Thu, 10 Sep 2020 18:23:26 -0700 Jesse Brandeburg wrote:

Some of these patches are already sent to Intel Wired Lan, but the rest of the series titled drivers/net/ethernet affects other drivers, not just Intel, but they depend on the first five.

Great stuff. Much easier to apply one large series than a thousand small patches. I haven't read all the comment changes but FWIW:

Thanks!

Quoted 3 lines

I feel slightly bad for saying this but I think your config did not include all the drivers, 'cause I'm still getting some warnings after patch 11. Regardless this is impressive effort, thanks!

No worries! I want to get it right, can you share your methodology?

I saw from some other message that you're doing
make CC="ccache gcc" allmodconfig
make CC="ccache gcc" -j 64 W=1 C=1

Is that the right sequence? did you start with a make mrproper as well? I may have missed some drivers when I did this:
make allyesconfig
make menuconfig
<turn on all "Ethernet Drivers" = m manually>

but I'd like to target the actual job you're running and use that as the short-term goal.

Also, if you have any comments about the removal of the lvalue from some of the register read operations, I figure that is the riskiest part of all this.

maintainer
#34 lore raw
Quoted 11 lines · On Fri, 11 Sep 2020 12:00:05 -0700 Jesse Brandeburg wrote:
Quoted 3 lines

I feel slightly bad for saying this but I think your config did not include all the drivers, 'cause I'm still getting some warnings after patch 11. Regardless this is impressive effort, thanks!

No worries! I want to get it right, can you share your methodology?

I saw from some other message that you're doing
make CC="ccache gcc" allmodconfig
make CC="ccache gcc" -j 64 W=1 C=1

Is that the right sequence?

Yes, that's it.

Quoted 1 line

did you start with a make mrproper as well?

Nope, the machine is barely keeping up as is ;)

Quoted 4 lines

I may have missed some drivers when I did this:
make allyesconfig
make menuconfig
<turn on all "Ethernet Drivers" = m manually>

Yeah, maybe you need COMPILE_TEST? (full list of the warnings triggered by the last patch at the end of the email)

Quoted 2 lines

but I'd like to target the actual job you're running and use that as the short-term goal.

If the code is of any use:

https://github.com/kuba-moo/nipa

But it expects to run against a patchwork instance.

Quoted 3 lines

Also, if you have any comments about the removal of the lvalue from some of the register read operations, I figure that is the riskiest part of all this.

Nothing looked suspicious to me. Besides if the compiler is warning that the variable is unused I'm pretty sure it will optimize that variable out, anyway so machine code shouldn't change with this series.

../drivers/net/ethernet/atheros/atlx/atl1.c:1999:26: warning: cast to restricted __le16 ../drivers/net/ethernet/atheros/atlx/atl1.c:2060:33: warning: cast to restricted __le16 ../drivers/net/ethernet/atheros/atlx/atl1.c:2125:45: warning: invalid assignment: |=
../drivers/net/ethernet/atheros/atlx/atl1.c:2125:45: left side has type restricted __le32
../drivers/net/ethernet/atheros/atlx/atl1.c:2125:45: right side has type int
../drivers/net/ethernet/atheros/atlx/atl1.c:2127:45: warning: invalid assignment: |=
../drivers/net/ethernet/atheros/atlx/atl1.c:2127:45: left side has type restricted __le32
../drivers/net/ethernet/atheros/atlx/atl1.c:2127:45: right side has type unsigned int
../drivers/net/ethernet/atheros/atlx/atl1.c:2130:45: warning: invalid assignment: |=
../drivers/net/ethernet/atheros/atlx/atl1.c:2130:45: left side has type restricted __le32
../drivers/net/ethernet/atheros/atlx/atl1.c:2130:45: right side has type int
../drivers/net/ethernet/atheros/atlx/atl1.c:2131:45: warning: invalid assignment: |=
../drivers/net/ethernet/atheros/atlx/atl1.c:2131:45: left side has type restricted __le32
../drivers/net/ethernet/atheros/atlx/atl1.c:2131:45: right side has type int
../drivers/net/ethernet/atheros/atlx/atl1.c:2141:45: warning: invalid assignment: |=
../drivers/net/ethernet/atheros/atlx/atl1.c:2141:45: left side has type restricted __le32
../drivers/net/ethernet/atheros/atlx/atl1.c:2141:45: right side has type int
../drivers/net/ethernet/atheros/atlx/atl1.c:2145:37: warning: invalid assignment: |=
../drivers/net/ethernet/atheros/atlx/atl1.c:2145:37: left side has type restricted __le32
../drivers/net/ethernet/atheros/atlx/atl1.c:2145:37: right side has type int
../drivers/net/ethernet/atheros/atlx/atl1.c:2147:37: warning: invalid assignment: |=
../drivers/net/ethernet/atheros/atlx/atl1.c:2147:37: left side has type restricted __le32
../drivers/net/ethernet/atheros/atlx/atl1.c:2147:37: right side has type unsigned int
../drivers/net/ethernet/atheros/atlx/atl1.c:2149:37: warning: invalid assignment: |=
../drivers/net/ethernet/atheros/atlx/atl1.c:2149:37: left side has type restricted __le32
../drivers/net/ethernet/atheros/atlx/atl1.c:2149:37: right side has type int
../drivers/net/ethernet/atheros/atlx/atl1.c:2151:37: warning: invalid assignment: |=
../drivers/net/ethernet/atheros/atlx/atl1.c:2151:37: left side has type restricted __le32
../drivers/net/ethernet/atheros/atlx/atl1.c:2151:37: right side has type int
../drivers/net/ethernet/atheros/atlx/atl1.c:2173:29: warning: invalid assignment: |=
../drivers/net/ethernet/atheros/atlx/atl1.c:2173:29: left side has type restricted __le32
../drivers/net/ethernet/atheros/atlx/atl1.c:2173:29: right side has type int
../drivers/net/ethernet/atheros/atlx/atl1.c:2175:29: warning: invalid assignment: |=
../drivers/net/ethernet/atheros/atlx/atl1.c:2175:29: left side has type restricted __le32
../drivers/net/ethernet/atheros/atlx/atl1.c:2175:29: right side has type int
../drivers/net/ethernet/atheros/atlx/atl1.c:2177:29: warning: invalid assignment: |=
../drivers/net/ethernet/atheros/atlx/atl1.c:2177:29: left side has type restricted __le32
../drivers/net/ethernet/atheros/atlx/atl1.c:2177:29: right side has type int
../drivers/net/ethernet/atheros/atlx/atl1.c:2206:23: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/atheros/atlx/atl1.c:2303:28: warning: invalid assignment: &=
../drivers/net/ethernet/atheros/atlx/atl1.c:2303:28: left side has type restricted __le32
../drivers/net/ethernet/atheros/atlx/atl1.c:2303:28: right side has type int
../drivers/net/ethernet/atheros/atlx/atl1.c:2304:32: warning: restricted __le16 degrades to integer ../drivers/net/ethernet/atheros/atlx/atl1.c:2304:28: warning: invalid assignment: |=
../drivers/net/ethernet/atheros/atlx/atl1.c:2304:28: left side has type restricted __le32
../drivers/net/ethernet/atheros/atlx/atl1.c:2304:28: right side has type int
../drivers/net/ethernet/atheros/atlx/atl1.c:2311:27: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/atheros/atlx/atl1.c:2315:44: warning: invalid assignment: |=
../drivers/net/ethernet/atheros/atlx/atl1.c:2315:44: left side has type restricted __le32
../drivers/net/ethernet/atheros/atlx/atl1.c:2315:44: right side has type int
../drivers/net/ethernet/atheros/atlx/atl1.c:2317:44: warning: invalid assignment: &=
../drivers/net/ethernet/atheros/atlx/atl1.c:2317:44: left side has type restricted __le32
../drivers/net/ethernet/atheros/atlx/atl1.c:2317:44: right side has type int
../drivers/net/ethernet/atheros/atlx/atl1.c:2321:36: warning: invalid assignment: |=
../drivers/net/ethernet/atheros/atlx/atl1.c:2321:36: left side has type restricted __le32
../drivers/net/ethernet/atheros/atlx/atl1.c:2321:36: right side has type int
../drivers/net/ethernet/atheros/atlx/atl1.c:2401:29: warning: invalid assignment: |=
../drivers/net/ethernet/atheros/atlx/atl1.c:2401:29: left side has type restricted __le32
../drivers/net/ethernet/atheros/atlx/atl1.c:2401:29: right side has type int
../drivers/net/ethernet/atheros/atlx/atl1.c:2402:29: warning: invalid assignment: |=
../drivers/net/ethernet/atheros/atlx/atl1.c:2402:29: left side has type restricted __le32
../drivers/net/ethernet/atheros/atlx/atl1.c:2402:29: right side has type int
../drivers/net/ethernet/brocade/bna/bfa_ioc.c:1923:28: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/brocade/bna/bfa_ioc.c:1923:28: expected unsigned short [assigned] [usertype] clscode
../drivers/net/ethernet/brocade/bna/bfa_ioc.c:1923:28: got restricted __be16 [usertype]
../drivers/net/ethernet/brocade/bna/bfa_ioc.c:1924:25: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/brocade/bna/bfa_ioc.c:1924:25: expected unsigned short [assigned] [usertype] rsvd
../drivers/net/ethernet/brocade/bna/bfa_ioc.c:1924:25: got restricted __be16 [usertype]
../drivers/net/ethernet/brocade/bna/bfa_ioc.c:1926:29: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:1926:29: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:1926:29: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:1926:29: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:1926:29: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:1926:29: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:1937:29: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/brocade/bna/bfa_ioc.c:1937:29: expected unsigned short [assigned] [usertype] clscode
../drivers/net/ethernet/brocade/bna/bfa_ioc.c:1937:29: got restricted __be16 [usertype]
../drivers/net/ethernet/brocade/bna/bfa_ioc.c:1938:26: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/brocade/bna/bfa_ioc.c:1938:26: expected unsigned short [assigned] [usertype] rsvd
../drivers/net/ethernet/brocade/bna/bfa_ioc.c:1938:26: got restricted __be16 [usertype]
../drivers/net/ethernet/brocade/bna/bfa_ioc.c:1940:30: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:1940:30: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:1940:30: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:1940:30: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:1940:30: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:1940:30: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:1903:24: warning: incorrect type in argument 1 (different base types)
../drivers/net/ethernet/brocade/bna/bfa_ioc.c:1903:24: expected unsigned int val
../drivers/net/ethernet/brocade/bna/bfa_ioc.c:1903:24: got restricted __le32 [usertype]
../drivers/net/ethernet/brocade/bna/bfa_ioc.c:2105:31: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:2105:31: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:2105:31: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:2105:31: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:2105:31: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:2105:31: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:2106:31: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:2106:31: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:2106:31: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:2106:31: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:2106:31: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:2106:31: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:2107:31: warning: cast to restricted __be16 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:2107:31: warning: cast to restricted __be16 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:2107:31: warning: cast to restricted __be16 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:2107:31: warning: cast to restricted __be16 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:2209:26: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:2209:26: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:2209:26: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:2209:26: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:2209:26: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:2209:26: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:2422:25: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/brocade/bna/bfa_ioc.c:2422:25: expected unsigned int [usertype]
../drivers/net/ethernet/brocade/bna/bfa_ioc.c:2422:25: got restricted __be32 [usertype]
../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3068:21: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3068:21: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3068:21: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3068:21: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3068:21: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3068:21: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3070:23: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3070:23: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3070:23: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3070:23: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3070:23: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3070:23: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3073:23: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3073:23: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3073:23: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3073:23: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3073:23: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3073:23: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3101:21: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3101:21: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3101:21: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3101:21: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3101:21: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3101:21: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3103:23: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3103:23: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3103:23: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3103:23: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3103:23: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3103:23: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3106:23: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3106:23: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3106:23: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3106:23: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3106:23: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3106:23: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3140:26: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3140:26: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3140:26: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3140:26: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3140:26: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3140:26: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3147:40: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3147:40: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3147:40: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3147:40: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3147:40: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3147:40: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3148:39: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3148:39: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3148:39: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3148:39: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3148:39: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3148:39: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3151:41: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3151:41: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3151:41: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3151:41: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3151:41: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.c:3151:41: warning: too many warnings ../drivers/net/ethernet/brocade/bna/bfa_cee.c:42:25: warning: cast to restricted __be16 ../drivers/net/ethernet/brocade/bna/bfa_cee.c:42:25: warning: cast to restricted __be16 ../drivers/net/ethernet/brocade/bna/bfa_cee.c:42:25: warning: cast to restricted __be16 ../drivers/net/ethernet/brocade/bna/bfa_cee.c:42:25: warning: cast to restricted __be16 ../drivers/net/ethernet/brocade/bna/bfa_cee.c:44:25: warning: cast to restricted __be16 ../drivers/net/ethernet/brocade/bna/bfa_cee.c:44:25: warning: cast to restricted __be16 ../drivers/net/ethernet/brocade/bna/bfa_cee.c:44:25: warning: cast to restricted __be16 ../drivers/net/ethernet/brocade/bna/bfa_cee.c:44:25: warning: cast to restricted __be16 ../drivers/net/ethernet/brocade/bna/bfa_cee.c:34:29: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_cee.c:34:29: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_cee.c:34:29: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_cee.c:34:29: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_cee.c:34:29: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_cee.c:34:29: warning: cast to restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_cee.c: note: in included file (through ../drivers/net/ethernet/brocade/bna/bfa_cee.h):
../drivers/net/ethernet/brocade/bna/bfa_ioc.h:55:34: warning: cast from restricted __be32 ../drivers/net/ethernet/brocade/bna/bfa_ioc.h:56:34: warning: cast from restricted __be32 ../drivers/net/ethernet/cadence/macb_main.c:280:16: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/cadence/macb_main.c:280:16: expected unsigned int [usertype] bottom
../drivers/net/ethernet/cadence/macb_main.c:280:16: got restricted __le32 [usertype]
../drivers/net/ethernet/cadence/macb_main.c:282:13: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/cadence/macb_main.c:282:13: expected unsigned short [usertype] top
../drivers/net/ethernet/cadence/macb_main.c:282:13: got restricted __le16 [usertype]
../drivers/net/ethernet/cadence/macb_main.c:3087:39: warning: restricted __be32 degrades to integer ../drivers/net/ethernet/cadence/macb_main.c:3092:39: warning: restricted __be32 degrades to integer ../drivers/net/ethernet/cadence/macb_main.c:3097:40: warning: restricted __be16 degrades to integer ../drivers/net/ethernet/cadence/macb_main.c:3097:69: warning: restricted __be16 degrades to integer ../drivers/net/ethernet/cadence/macb_main.c:3119:20: warning: restricted __be32 degrades to integer ../drivers/net/ethernet/cadence/macb_main.c:3123:20: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/cadence/macb_main.c:3123:20: expected unsigned int [assigned] [usertype] w0
../drivers/net/ethernet/cadence/macb_main.c:3123:20: got restricted __be32 [usertype] ip4src
../drivers/net/ethernet/cadence/macb_main.c:3133:20: warning: restricted __be32 degrades to integer ../drivers/net/ethernet/cadence/macb_main.c:3137:20: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/cadence/macb_main.c:3137:20: expected unsigned int [assigned] [usertype] w0
../drivers/net/ethernet/cadence/macb_main.c:3137:20: got restricted __be32 [usertype] ip4dst
../drivers/net/ethernet/cadence/macb_main.c:3147:21: warning: restricted __be16 degrades to integer ../drivers/net/ethernet/cadence/macb_main.c:3147:50: warning: restricted __be16 degrades to integer ../drivers/net/ethernet/cadence/macb_main.c:3153:30: warning: restricted __be16 degrades to integer ../drivers/net/ethernet/cadence/macb_main.c:3154:30: warning: restricted __be16 degrades to integer ../drivers/net/ethernet/cadence/macb_main.c:3161:36: warning: restricted __be16 degrades to integer ../drivers/net/ethernet/cadence/macb_main.c:3162:38: warning: restricted __be16 degrades to integer ../drivers/net/ethernet/cadence/macb_main.c:3165:38: warning: restricted __be16 degrades to integer ../drivers/net/ethernet/cadence/macb_main.c:3201:9: warning: cast from restricted __be32 ../drivers/net/ethernet/cadence/macb_main.c:3201:9: warning: incorrect type in argument 1 (different base types)
../drivers/net/ethernet/cadence/macb_main.c:3201:9: expected unsigned int [usertype] val
../drivers/net/ethernet/cadence/macb_main.c:3201:9: got restricted __be32 [usertype] ip4src
../drivers/net/ethernet/cadence/macb_main.c:3201:9: warning: cast from restricted __be32 ../drivers/net/ethernet/cadence/macb_main.c:3201:9: warning: cast from restricted __be32 ../drivers/net/ethernet/cadence/macb_main.c:3201:9: warning: cast from restricted __be32 ../drivers/net/ethernet/cadence/macb_main.c:3201:9: warning: cast from restricted __be32 ../drivers/net/ethernet/cadence/macb_main.c:3201:9: warning: cast from restricted __be32 ../drivers/net/ethernet/cadence/macb_main.c:3201:9: warning: incorrect type in argument 1 (different base types)
../drivers/net/ethernet/cadence/macb_main.c:3201:9: expected unsigned int [usertype] val
../drivers/net/ethernet/cadence/macb_main.c:3201:9: got restricted __be32 [usertype] ip4dst
../drivers/net/ethernet/cadence/macb_main.c:3201:9: warning: cast from restricted __be32 ../drivers/net/ethernet/cadence/macb_main.c:3201:9: warning: cast from restricted __be32 ../drivers/net/ethernet/cadence/macb_main.c:3201:9: warning: cast from restricted __be32 ../drivers/net/ethernet/cadence/macb_main.c:3201:9: warning: cast from restricted __be32 ../drivers/net/ethernet/cadence/macb_main.c:3201:9: warning: cast from restricted __be16 ../drivers/net/ethernet/cadence/macb_main.c:3201:9: warning: incorrect type in argument 1 (different base types)
../drivers/net/ethernet/cadence/macb_main.c:3201:9: expected unsigned short [usertype] val
../drivers/net/ethernet/cadence/macb_main.c:3201:9: got restricted __be16 [usertype] psrc
../drivers/net/ethernet/cadence/macb_main.c:3201:9: warning: cast from restricted __be16 ../drivers/net/ethernet/cadence/macb_main.c:3201:9: warning: cast from restricted __be16 ../drivers/net/ethernet/cadence/macb_main.c:3201:9: warning: cast from restricted __be16 ../drivers/net/ethernet/cadence/macb_main.c:3201:9: warning: incorrect type in argument 1 (different base types)
../drivers/net/ethernet/cadence/macb_main.c:3201:9: expected unsigned short [usertype] val
../drivers/net/ethernet/cadence/macb_main.c:3201:9: got restricted __be16 [usertype] pdst
../drivers/net/ethernet/cadence/macb_main.c:3201:9: warning: cast from restricted __be16 ../drivers/net/ethernet/cadence/macb_main.c:3201:9: warning: cast from restricted __be16 ../drivers/net/ethernet/cadence/macb_main.c:3254:25: warning: cast from restricted __be32 ../drivers/net/ethernet/cadence/macb_main.c:3254:25: warning: incorrect type in argument 1 (different base types)
../drivers/net/ethernet/cadence/macb_main.c:3254:25: expected unsigned int [usertype] val
../drivers/net/ethernet/cadence/macb_main.c:3254:25: got restricted __be32 [usertype] ip4src
../drivers/net/ethernet/cadence/macb_main.c:3254:25: warning: cast from restricted __be32 ../drivers/net/ethernet/cadence/macb_main.c:3254:25: warning: cast from restricted __be32 ../drivers/net/ethernet/cadence/macb_main.c:3254:25: warning: cast from restricted __be32 ../drivers/net/ethernet/cadence/macb_main.c:3254:25: warning: cast from restricted __be32 ../drivers/net/ethernet/cadence/macb_main.c:3254:25: warning: cast from restricted __be32 ../drivers/net/ethernet/cadence/macb_main.c:3254:25: warning: incorrect type in argument 1 (different base types)
../drivers/net/ethernet/cadence/macb_main.c:3254:25: expected unsigned int [usertype] val
../drivers/net/ethernet/cadence/macb_main.c:3254:25: got restricted __be32 [usertype] ip4dst
../drivers/net/ethernet/cadence/macb_main.c:3254:25: warning: cast from restricted __be32 ../drivers/net/ethernet/cadence/macb_main.c:3254:25: warning: cast from restricted __be32 ../drivers/net/ethernet/cadence/macb_main.c:3254:25: warning: cast from restricted __be32 ../drivers/net/ethernet/cadence/macb_main.c:3254:25: warning: cast from restricted __be32 ../drivers/net/ethernet/cadence/macb_main.c:3254:25: warning: cast from restricted __be16 ../drivers/net/ethernet/cadence/macb_main.c:3254:25: warning: incorrect type in argument 1 (different base types)
../drivers/net/ethernet/cadence/macb_main.c:3254:25: expected unsigned short [usertype] val
../drivers/net/ethernet/cadence/macb_main.c:3254:25: got restricted __be16 [usertype] psrc
../drivers/net/ethernet/cadence/macb_main.c:3254:25: warning: cast from restricted __be16 ../drivers/net/ethernet/cadence/macb_main.c:3254:25: warning: cast from restricted __be16 ../drivers/net/ethernet/cadence/macb_main.c:3254:25: warning: cast from restricted __be16 ../drivers/net/ethernet/cadence/macb_main.c:3254:25: warning: incorrect type in argument 1 (different base types)
../drivers/net/ethernet/cadence/macb_main.c:3254:25: expected unsigned short [usertype] val
../drivers/net/ethernet/cadence/macb_main.c:3254:25: got restricted __be16 [usertype] pdst
../drivers/net/ethernet/cadence/macb_main.c:3254:25: warning: cast from restricted __be16 ../drivers/net/ethernet/cadence/macb_main.c:3254:25: warning: cast from restricted __be16 ../drivers/net/ethernet/cisco/enic/enic_ethtool.c:441:38: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/cisco/enic/enic_ethtool.c:441:38: expected restricted __be32 [usertype] ip4src
../drivers/net/ethernet/cisco/enic/enic_ethtool.c:441:38: got unsigned int [usertype]
../drivers/net/ethernet/cisco/enic/enic_ethtool.c:444:38: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/cisco/enic/enic_ethtool.c:444:38: expected restricted __be32 [usertype] ip4dst
../drivers/net/ethernet/cisco/enic/enic_ethtool.c:444:38: got unsigned int [usertype]
../drivers/net/ethernet/cisco/enic/enic_ethtool.c:447:36: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/cisco/enic/enic_ethtool.c:447:36: expected restricted __be16 [usertype] psrc
../drivers/net/ethernet/cisco/enic/enic_ethtool.c:447:36: got unsigned short [usertype]
../drivers/net/ethernet/cisco/enic/enic_ethtool.c:450:36: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/cisco/enic/enic_ethtool.c:450:36: expected restricted __be16 [usertype] pdst
../drivers/net/ethernet/cisco/enic/enic_ethtool.c:450:36: got unsigned short [usertype]
../drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c:521:30: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c:521:30: expected restricted __be16 [usertype] l2t_idx
../drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c:521:30: got restricted __be32 [usertype]
../drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c:279:11: warning: symbol 'dmae_reg_go_c' was not declared. Should it be static? ../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1446:45: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1474:46: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1663:44: warning: invalid assignment: |=
../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1663:44: left side has type restricted __le32
../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1663:44: right side has type int
../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1666:44: warning: invalid assignment: |=
../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1666:44: left side has type restricted __le32
../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1666:44: right side has type unsigned int
../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1669:44: warning: invalid assignment: |=
../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1669:44: left side has type restricted __le32
../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1669:44: right side has type int
../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1671:44: warning: invalid assignment: |=
../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1671:44: left side has type restricted __le32
../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1671:44: right side has type int
../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1688:36: warning: invalid assignment: |=
../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1688:36: left side has type restricted __le32
../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1688:36: right side has type int
../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1690:36: warning: invalid assignment: |=
../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1690:36: left side has type restricted __le32
../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1690:36: right side has type int
../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1692:36: warning: invalid assignment: |=
../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1692:36: left side has type restricted __le32
../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1692:36: right side has type int
../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1715:23: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1732:42: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1733:27: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1732:32: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1732:32: expected restricted __le32 [usertype] word2
../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1732:32: got unsigned int
../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1777:42: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1778:27: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1777:32: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1777:32: expected restricted __le32 [usertype] word2
../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1777:32: got unsigned int
../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1827:50: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1828:43: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1827:40: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1827:40: expected restricted __le32 [usertype] word2
../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1827:40: got unsigned int
../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1833:17: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1835:28: warning: invalid assignment: |=
../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1835:28: left side has type restricted __le32
../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1835:28: right side has type int
../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1838:24: warning: invalid assignment: |=
../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1838:24: left side has type restricted __le32
../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1838:24: right side has type int
../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1887:28: warning: invalid assignment: |=
../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1887:28: left side has type restricted __le32
../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1887:28: right side has type int
../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1889:28: warning: invalid assignment: |=
../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1889:28: left side has type restricted __le32
../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1889:28: right side has type int
../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1894:28: warning: invalid assignment: |=
../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1894:28: left side has type restricted __le32
../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1894:28: right side has type int
../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1897:28: warning: invalid assignment: |=
../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1897:28: left side has type restricted __le32
../drivers/net/ethernet/atheros/atl1e/atl1e_main.c:1897:28: right side has type int
../drivers/net/ethernet/chelsio/cxgb3/t3_hw.c:681:67: warning: incorrect type in argument 3 (different base types)
../drivers/net/ethernet/chelsio/cxgb3/t3_hw.c:681:67: expected restricted __le32 [usertype] data
../drivers/net/ethernet/chelsio/cxgb3/t3_hw.c:681:67: got int
../drivers/net/ethernet/chelsio/cxgb3/t3_hw.c:898:31: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/chelsio/cxgb3/t3_hw.c:898:31: expected unsigned int [usertype]
../drivers/net/ethernet/chelsio/cxgb3/t3_hw.c:898:31: got restricted __be32 [usertype]
../drivers/net/ethernet/chelsio/cxgb3/t3_hw.c:3666:52: warning: dubious: !x | y ../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:1804:21: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:1805:39: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:1818:24: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:1827:26: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:1827:26: warning: cast to restricted __le16 ../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:1831:41: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:1848:24: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:1851:25: warning: restricted __le16 degrades to integer ../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:1851:25: warning: restricted __le16 degrades to integer ../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:1852:32: warning: cast to restricted __le16 ../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:1761:28: warning: invalid assignment: &=
../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:1761:28: left side has type restricted __le32
../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:1761:28: right side has type unsigned int
../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:1774:25: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:2007:47: warning: invalid assignment: |=
../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:2007:47: left side has type restricted __le32
../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:2007:47: right side has type int
../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:2029:37: warning: invalid assignment: |=
../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:2029:37: left side has type restricted __le32
../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:2029:37: right side has type int
../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:2030:37: warning: invalid assignment: |=
../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:2030:37: left side has type restricted __le32
../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:2030:37: right side has type int
../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:2032:39: warning: invalid assignment: |=
../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:2032:39: left side has type restricted __le32
../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:2032:39: right side has type int
../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:2035:31: warning: invalid assignment: |=
../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:2035:31: left side has type restricted __le32
../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:2035:31: right side has type int
../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:2036:31: warning: invalid assignment: |=
../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:2036:31: left side has type restricted __le32
../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:2036:31: right side has type int
../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:2038:31: warning: invalid assignment: |=
../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:2038:31: left side has type restricted __le32
../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:2038:31: right side has type int
../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:2056:39: warning: invalid assignment: |=
../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:2056:39: left side has type restricted __le32
../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:2056:39: right side has type int
../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:2058:39: warning: invalid assignment: |=
../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:2058:39: left side has type restricted __le32
../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:2058:39: right side has type int
../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:2060:39: warning: invalid assignment: |=
../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:2060:39: left side has type restricted __le32
../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:2060:39: right side has type int
../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:2103:19: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:2172:24: warning: invalid assignment: |=
../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:2172:24: left side has type restricted __le32
../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:2172:24: right side has type int
../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:2228:22: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:2228:22: expected unsigned short [usertype] vlan
../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:2228:22: got restricted __le16 [usertype]
../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:2229:17: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:2229:17: expected restricted __le16 [usertype] tag
../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:2229:17: got int
../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:2230:28: warning: invalid assignment: |=
../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:2230:28: left side has type restricted __le32
../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:2230:28: right side has type int
../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:2235:28: warning: invalid assignment: |=
../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:2235:28: left side has type restricted __le32
../drivers/net/ethernet/atheros/atl1c/atl1c_main.c:2235:28: right side has type int
../drivers/net/ethernet/chelsio/cxgb3/sge.c:2373:50: warning: incorrect type in argument 1 (different base types)
../drivers/net/ethernet/chelsio/cxgb3/sge.c:2373:50: expected unsigned int [usertype] rss
../drivers/net/ethernet/chelsio/cxgb3/sge.c:2373:50: got restricted __be32 [assigned] [usertype] rss_hi
../drivers/net/ethernet/chelsio/cxgb3/sge.c:2436:43: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/chelsio/cxgb3/sge.c:2436:43: expected restricted __wsum [usertype] csum
../drivers/net/ethernet/chelsio/cxgb3/sge.c:2436:43: got restricted __be32 [assigned] [usertype] rss_hi
../drivers/net/ethernet/chelsio/cxgb3/sge.c:2437:47: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/chelsio/cxgb3/sge.c:2437:47: expected unsigned int [usertype] priority
../drivers/net/ethernet/chelsio/cxgb3/sge.c:2437:47: got restricted __be32 [assigned] [usertype] rss_lo
../drivers/net/ethernet/chelsio/cxgb3/sge.c:2118:16: warning: cast to restricted __be32 ../drivers/net/ethernet/chelsio/cxgb3/sge.c:2118:16: warning: cast to restricted __be32 ../drivers/net/ethernet/chelsio/cxgb3/sge.c:2118:16: warning: cast to restricted __be32 ../drivers/net/ethernet/chelsio/cxgb3/sge.c:2118:16: warning: cast to restricted __be32 ../drivers/net/ethernet/chelsio/cxgb3/sge.c:2118:16: warning: cast to restricted __be32 ../drivers/net/ethernet/chelsio/cxgb3/sge.c:2118:16: warning: cast to restricted __be32 ../drivers/net/ethernet/huawei/hinic/hinic_main.c:831:25: warning: cast to restricted __be16 ../drivers/net/ethernet/huawei/hinic/hinic_main.c:831:25: warning: cast to restricted __be16 ../drivers/net/ethernet/huawei/hinic/hinic_main.c:831:25: warning: cast to restricted __be16 ../drivers/net/ethernet/huawei/hinic/hinic_main.c:831:25: warning: cast to restricted __be16 ../drivers/net/ethernet/micrel/ksz884x.c:3519:50: warning: restricted pci_power_t degrades to integer ../drivers/net/ethernet/micrel/ksz884x.c:3840:37: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/micrel/ksz884x.c:3840:37: expected unsigned int [usertype] next
../drivers/net/ethernet/micrel/ksz884x.c:3840:37: got restricted __le32 [usertype]
../drivers/net/ethernet/micrel/ksz884x.c:3842:29: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/micrel/ksz884x.c:3842:29: expected unsigned int [usertype] next
../drivers/net/ethernet/micrel/ksz884x.c:3842:29: got restricted __le32 [usertype]
../drivers/net/ethernet/micrel/ksz884x.c:3844:33: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/micrel/ksz884x.c:3844:33: expected unsigned int [usertype] data
../drivers/net/ethernet/micrel/ksz884x.c:3844:33: got restricted __le32 [usertype]
../drivers/net/ethernet/micrel/ksz884x.c:4750:31: warning: cast to restricted __le32 ../drivers/net/ethernet/micrel/ksz884x.c:5043:31: warning: cast to restricted __le32 ../drivers/net/ethernet/micrel/ksz884x.c:5079:31: warning: cast to restricted __le32 ../drivers/net/ethernet/micrel/ksz884x.c:5124:31: warning: cast to restricted __le32 ../drivers/net/ethernet/micrel/ksz884x.c:1603:37: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/micrel/ksz884x.c:1603:37: expected unsigned int [usertype] data
../drivers/net/ethernet/micrel/ksz884x.c:1603:37: got restricted __le32 [usertype]
../drivers/net/ethernet/micrel/ksz884x.c:1605:30: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/micrel/ksz884x.c:1605:30: expected unsigned int [usertype] data
../drivers/net/ethernet/micrel/ksz884x.c:1605:30: got restricted __le32 [usertype]
../drivers/net/ethernet/micrel/ksz884x.c:1619:25: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/micrel/ksz884x.c:1619:25: expected unsigned int [usertype] addr
../drivers/net/ethernet/micrel/ksz884x.c:1619:25: got restricted __le32 [usertype]
../drivers/net/ethernet/micrel/ksz884x.c:1603:37: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/micrel/ksz884x.c:1603:37: expected unsigned int [usertype] data
../drivers/net/ethernet/micrel/ksz884x.c:1603:37: got restricted __le32 [usertype]
../drivers/net/ethernet/micrel/ksz884x.c:1605:30: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/micrel/ksz884x.c:1605:30: expected unsigned int [usertype] data
../drivers/net/ethernet/micrel/ksz884x.c:1605:30: got restricted __le32 [usertype]
../drivers/net/ethernet/micrel/ksz884x.c:1639:25: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/micrel/ksz884x.c:1639:25: expected unsigned int [usertype] addr
../drivers/net/ethernet/micrel/ksz884x.c:1639:25: got restricted __le32 [usertype]
../drivers/net/ethernet/micrel/ksz884x.c:1639:25: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/micrel/ksz884x.c:1639:25: expected unsigned int [usertype] addr
../drivers/net/ethernet/micrel/ksz884x.c:1639:25: got restricted __le32 [usertype]
../drivers/net/ethernet/micrel/ksz884x.c:1603:37: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/micrel/ksz884x.c:1603:37: expected unsigned int [usertype] data
../drivers/net/ethernet/micrel/ksz884x.c:1603:37: got restricted __le32 [usertype]
../drivers/net/ethernet/micrel/ksz884x.c:1605:30: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/micrel/ksz884x.c:1605:30: expected unsigned int [usertype] data
../drivers/net/ethernet/micrel/ksz884x.c:1605:30: got restricted __le32 [usertype]
../drivers/net/ethernet/micrel/ksz884x.c:1603:37: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/micrel/ksz884x.c:1603:37: expected unsigned int [usertype] data
../drivers/net/ethernet/micrel/ksz884x.c:1603:37: got restricted __le32 [usertype]
../drivers/net/ethernet/micrel/ksz884x.c:1605:30: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/micrel/ksz884x.c:1605:30: expected unsigned int [usertype] data
../drivers/net/ethernet/micrel/ksz884x.c:1605:30: got restricted __le32 [usertype]
../drivers/net/ethernet/micrel/ksz884x.c:1639:25: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/micrel/ksz884x.c:1639:25: expected unsigned int [usertype] addr
../drivers/net/ethernet/micrel/ksz884x.c:1639:25: got restricted __le32 [usertype]
../drivers/net/ethernet/micrel/ksz884x.c:1595:30: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/micrel/ksz884x.c:1595:30: expected unsigned int [usertype] data
../drivers/net/ethernet/micrel/ksz884x.c:1595:30: got restricted __le32 [usertype]
../drivers/net/ethernet/micrel/ksz884x.c:4966:18: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/micrel/ksz884x.c:4966:18: expected unsigned short protocol
../drivers/net/ethernet/micrel/ksz884x.c:4966:18: got restricted __be16 [usertype] protocol
../drivers/net/ethernet/micrel/ksz884x.c:4969:25: warning: restricted __be16 degrades to integer ../drivers/net/ethernet/micrel/ksz884x.c:4970:26: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/micrel/ksz884x.c:4970:26: expected unsigned short protocol
../drivers/net/ethernet/micrel/ksz884x.c:4970:26: got restricted __be16 [usertype] tot_len
../drivers/net/ethernet/micrel/ksz884x.c:4974:25: warning: restricted __be16 degrades to integer ../drivers/net/ethernet/micrel/ksz884x.c:1603:37: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/micrel/ksz884x.c:1603:37: expected unsigned int [usertype] data
../drivers/net/ethernet/micrel/ksz884x.c:1603:37: got restricted __le32 [usertype]
../drivers/net/ethernet/micrel/ksz884x.c:1605:30: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/micrel/ksz884x.c:1605:30: expected unsigned int [usertype] data
../drivers/net/ethernet/micrel/ksz884x.c:1605:30: got restricted __le32 [usertype]
../drivers/net/ethernet/micrel/ksz884x.c:4966:18: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/micrel/ksz884x.c:4966:18: expected unsigned short protocol
../drivers/net/ethernet/micrel/ksz884x.c:4966:18: got restricted __be16 [usertype] protocol
../drivers/net/ethernet/micrel/ksz884x.c:4969:25: warning: restricted __be16 degrades to integer ../drivers/net/ethernet/micrel/ksz884x.c:4970:26: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/micrel/ksz884x.c:4970:26: expected unsigned short protocol
../drivers/net/ethernet/micrel/ksz884x.c:4970:26: got restricted __be16 [usertype] tot_len
../drivers/net/ethernet/micrel/ksz884x.c:4974:25: warning: restricted __be16 degrades to integer ../drivers/net/ethernet/micrel/ksz884x.c:1603:37: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/micrel/ksz884x.c:1603:37: expected unsigned int [usertype] data
../drivers/net/ethernet/micrel/ksz884x.c:1603:37: got restricted __le32 [usertype]
../drivers/net/ethernet/micrel/ksz884x.c:1605:30: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/micrel/ksz884x.c:1605:30: expected unsigned int [usertype] data
../drivers/net/ethernet/micrel/ksz884x.c:1605:30: got restricted __le32 [usertype]
../drivers/net/ethernet/micrel/ksz884x.c:4966:18: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/micrel/ksz884x.c:4966:18: expected unsigned short protocol
../drivers/net/ethernet/micrel/ksz884x.c:4966:18: got restricted __be16 [usertype] protocol
../drivers/net/ethernet/micrel/ksz884x.c:4969:25: warning: restricted __be16 degrades to integer ../drivers/net/ethernet/micrel/ksz884x.c:4970:26: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/micrel/ksz884x.c:4970:26: expected unsigned short protocol
../drivers/net/ethernet/micrel/ksz884x.c:4970:26: got restricted __be16 [usertype] tot_len
../drivers/net/ethernet/micrel/ksz884x.c:4974:25: warning: restricted __be16 degrades to integer ../drivers/net/ethernet/micrel/ksz884x.c:1603:37: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/micrel/ksz884x.c:1603:37: expected unsigned int [usertype] data
../drivers/net/ethernet/micrel/ksz884x.c:1603:37: got restricted __le32 [usertype]
../drivers/net/ethernet/micrel/ksz884x.c:1605:30: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/micrel/ksz884x.c:1605:30: expected unsigned int [usertype] data
../drivers/net/ethernet/micrel/ksz884x.c:1605:30: got restricted __le32 [usertype]
../drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c:333:17: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c:333:17: expected unsigned int [addressable] [usertype] db_info
../drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c:333:17: got restricted __be32 [usertype]
../drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c:413:23: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c:413:23: expected unsigned long long [usertype]
../drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c:413:23: got restricted __be64 [usertype]
../drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c:536:27: warning: cast to restricted __be32 ../drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c:536:27: warning: cast to restricted __be32 ../drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c:536:27: warning: cast to restricted __be32 ../drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c:536:27: warning: cast to restricted __be32 ../drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c:536:27: warning: cast to restricted __be32 ../drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c:536:27: warning: cast to restricted __be32 ../drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c:577:21: warning: cast to restricted __be32 ../drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c:577:21: warning: cast to restricted __be32 ../drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c:577:21: warning: cast to restricted __be32 ../drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c:577:21: warning: cast to restricted __be32 ../drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c:577:21: warning: cast to restricted __be32 ../drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c:577:21: warning: cast to restricted __be32 ../drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c:625:14: warning: cast to restricted __be32 ../drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c:625:14: warning: cast to restricted __be32 ../drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c:625:14: warning: cast to restricted __be32 ../drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c:625:14: warning: cast to restricted __be32 ../drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c:625:14: warning: cast to restricted __be32 ../drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c:625:14: warning: cast to restricted __be32 ../drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c:630:19: warning: cast to restricted __be32 ../drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c:630:19: warning: cast to restricted __be32 ../drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c:630:19: warning: cast to restricted __be32 ../drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c:630:19: warning: cast to restricted __be32 ../drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c:630:19: warning: cast to restricted __be32 ../drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c:630:19: warning: cast to restricted __be32 ../drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c:661:30: warning: cast to restricted __be32 ../drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c:661:30: warning: cast to restricted __be32 ../drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c:661:30: warning: cast to restricted __be32 ../drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c:661:30: warning: cast to restricted __be32 ../drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c:661:30: warning: cast to restricted __be32 ../drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c:661:30: warning: cast to restricted __be32 ../drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c:707:31: warning: cast to restricted __be64 ../drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c:707:31: warning: cast to restricted __be64 ../drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c:707:31: warning: cast to restricted __be64 ../drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c:707:31: warning: cast to restricted __be64 ../drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c:707:31: warning: cast to restricted __be64 ../drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c:707:31: warning: cast to restricted __be64 ../drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c:707:31: warning: cast to restricted __be64 ../drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c:707:31: warning: cast to restricted __be64 ../drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c:707:31: warning: cast to restricted __be64 ../drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c:707:31: warning: cast to restricted __be64 ../drivers/net/ethernet/huawei/hinic/hinic_hw_eqs.c:324:24: warning: cast to restricted __be32 ../drivers/net/ethernet/huawei/hinic/hinic_hw_eqs.c:324:24: warning: cast to restricted __be32 ../drivers/net/ethernet/huawei/hinic/hinic_hw_eqs.c:324:24: warning: cast to restricted __be32 ../drivers/net/ethernet/huawei/hinic/hinic_hw_eqs.c:324:24: warning: cast to restricted __be32 ../drivers/net/ethernet/huawei/hinic/hinic_hw_eqs.c:324:24: warning: cast to restricted __be32 ../drivers/net/ethernet/huawei/hinic/hinic_hw_eqs.c:324:24: warning: cast to restricted __be32 ../drivers/net/ethernet/huawei/hinic/hinic_hw_eqs.c:617:25: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/huawei/hinic/hinic_hw_eqs.c:617:25: expected unsigned int [usertype]
../drivers/net/ethernet/huawei/hinic/hinic_hw_eqs.c:617:25: got restricted __be32 [usertype]
../drivers/net/ethernet/natsemi/ns83820.c:900:39: warning: cast to restricted __be16 ../drivers/net/ethernet/natsemi/ns83820.c:900:39: warning: cast to restricted __be16 ../drivers/net/ethernet/natsemi/ns83820.c:900:39: warning: cast to restricted __be16 ../drivers/net/ethernet/natsemi/ns83820.c:900:39: warning: cast to restricted __be16 ../drivers/net/ethernet/natsemi/ns83820.c:1119:42: warning: restricted __be16 degrades to integer ../drivers/net/ethernet/natsemi/ns83820.c:1982:29: warning: cast to restricted __le32 ../drivers/net/ethernet/neterion/s2io.c:6951:41: warning: cast to restricted __be32 ../drivers/net/ethernet/neterion/s2io.c:6951:41: warning: cast to restricted __be32 ../drivers/net/ethernet/neterion/s2io.c:6951:41: warning: cast to restricted __be32 ../drivers/net/ethernet/neterion/s2io.c:6951:41: warning: cast to restricted __be32 ../drivers/net/ethernet/neterion/s2io.c:6951:41: warning: cast to restricted __be32 ../drivers/net/ethernet/neterion/s2io.c:6951:41: warning: cast to restricted __be32
../drivers/net/ethernet/neterion/s2io.c: note: in included file:
../include/linux/io-64-nonatomic-lo-hi.h:21:16: warning: cast truncates bits from constant value (4c0d000000000000 becomes 0) ../include/linux/io-64-nonatomic-lo-hi.h:21:16: warning: cast truncates bits from constant value (4c0d000000000000 becomes 0) ../include/linux/io-64-nonatomic-lo-hi.h:21:16: warning: cast truncates bits from constant value (f00000000000000 becomes 0) ../include/linux/io-64-nonatomic-lo-hi.h:21:16: warning: cast truncates bits from constant value (ffbbffbbffbbffbb becomes ffbbffbb) ../include/linux/io-64-nonatomic-lo-hi.h:21:16: warning: cast truncates bits from constant value (ffbbffbbffbbffbb becomes ffbbffbb) ../include/linux/io-64-nonatomic-lo-hi.h:21:16: warning: cast truncates bits from constant value (4c0d000000000000 becomes 0) ../include/linux/io-64-nonatomic-lo-hi.h:21:16: warning: cast truncates bits from constant value (4c0d000000000000 becomes 0) ../include/linux/io-64-nonatomic-lo-hi.h:21:16: warning: cast truncates bits from constant value (4c0d000000000000 becomes 0) ../include/linux/io-64-nonatomic-lo-hi.h:21:16: warning: cast truncates bits from constant value (4c0d000000000000 becomes 0) ../include/linux/io-64-nonatomic-lo-hi.h:21:16: warning: cast truncates bits from constant value (7f00000001 becomes 1) ../include/linux/io-64-nonatomic-lo-hi.h:21:16: warning: cast truncates bits from constant value (102030405060000 becomes 5060000) ../include/linux/io-64-nonatomic-lo-hi.h:21:16: warning: cast truncates bits from constant value (feffffffffff0000 becomes ffff0000) ../include/linux/io-64-nonatomic-lo-hi.h:21:16: warning: cast truncates bits from constant value (4c0d000000000000 becomes 0) ../include/linux/io-64-nonatomic-lo-hi.h:21:16: warning: cast truncates bits from constant value (4c0d000000000000 becomes 0) ../include/linux/io-64-nonatomic-lo-hi.h:21:16: warning: cast truncates bits from constant value (4c0d000000000000 becomes 0) ../include/linux/io-64-nonatomic-lo-hi.h:21:16: warning: cast truncates bits from constant value (4c0d000000000000 becomes 0) ../drivers/net/ethernet/neterion/vxge/vxge-config.c:890:37: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:890:37: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:890:37: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:890:37: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:890:37: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:890:37: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:890:37: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:890:37: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:890:37: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:890:37: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:891:37: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:891:37: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:891:37: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:891:37: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:891:37: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:891:37: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:891:37: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:891:37: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:891:37: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:891:37: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:903:35: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:903:35: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:903:35: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:903:35: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:903:35: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:903:35: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:903:35: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:903:35: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:903:35: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:903:35: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:904:35: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:904:35: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:904:35: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:904:35: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:904:35: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:904:35: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:904:35: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:904:35: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:904:35: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:904:35: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:918:46: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:918:46: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:918:46: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:918:46: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:918:46: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:918:46: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:918:46: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:918:46: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:918:46: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:918:46: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:919:46: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:919:46: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:919:46: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:919:46: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:919:46: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:919:46: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:919:46: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:919:46: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:919:46: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:919:46: warning: cast to restricted __be64 ../drivers/net/ethernet/neterion/vxge/vxge-config.c:157:1: warning: context imbalance in 'vxge_hw_vpath_fw_api' - different lock contexts for basic block ../drivers/net/ethernet/neterion/vxge/vxge-traffic.c: note: in included file:
../include/linux/io-64-nonatomic-lo-hi.h:21:16: warning: cast truncates bits from constant value (1000000000000000 becomes 0) ../include/linux/io-64-nonatomic-lo-hi.h:21:16: warning: cast truncates bits from constant value (100000000000000 becomes 0) ../drivers/net/ethernet/neterion/vxge/vxge-config.c: note: in included file:
../include/linux/io-64-nonatomic-lo-hi.h:21:16: warning: cast truncates bits from constant value (8000000000000000 becomes 0) ../include/linux/io-64-nonatomic-lo-hi.h:21:16: warning: cast truncates bits from constant value (100000000000000 becomes 0) ../drivers/net/ethernet/packetengines/yellowfin.c:1248:37: warning: cast from restricted __le32 ../drivers/net/ethernet/packetengines/yellowfin.c:1248:37: warning: cast from restricted __le32 ../drivers/net/ethernet/packetengines/yellowfin.c:1248:37: warning: cast from restricted __le32 ../drivers/net/ethernet/packetengines/yellowfin.c:1248:37: warning: cast from restricted __le32 ../drivers/net/ethernet/packetengines/yellowfin.c:1248:37: warning: cast from restricted __le32 ../drivers/net/ethernet/packetengines/yellowfin.c:1248:37: warning: cast from restricted __le32 ../drivers/net/ethernet/packetengines/yellowfin.c:1248:37: warning: cast from restricted __le32 ../drivers/net/ethernet/packetengines/yellowfin.c:1248:37: warning: cast from restricted __le32 ../drivers/net/ethernet/packetengines/yellowfin.c:1248:37: warning: cast from restricted __le32 ../drivers/net/ethernet/packetengines/yellowfin.c:1253:49: warning: cast from restricted __le32 ../drivers/net/ethernet/packetengines/yellowfin.c:1253:49: warning: cast from restricted __le32 ../drivers/net/ethernet/packetengines/yellowfin.c:1253:49: warning: cast from restricted __le32 ../drivers/net/ethernet/packetengines/yellowfin.c:1253:49: warning: cast from restricted __le32 ../drivers/net/ethernet/packetengines/yellowfin.c:1253:49: warning: cast from restricted __le32 ../drivers/net/ethernet/packetengines/yellowfin.c:1253:49: warning: cast from restricted __le32 ../drivers/net/ethernet/packetengines/yellowfin.c:1253:49: warning: cast from restricted __le32 ../drivers/net/ethernet/packetengines/yellowfin.c:1253:49: warning: cast from restricted __le32 ../drivers/net/ethernet/packetengines/yellowfin.c:1253:49: warning: cast from restricted __le32 ../drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:2135:41: warning: incorrect type in argument 1 (different address spaces)
../drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:2135:41: expected void *reg
../drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:2135:41: got unsigned int [noderef] __iomem *
../drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:157:33: warning: incorrect type in argument 2 (different base types)
../drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:157:33: expected unsigned short [usertype] uid_hi
../drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:157:33: got restricted __be16 [usertype]
../drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:157:45: warning: incorrect type in argument 3 (different base types)
../drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:157:45: expected unsigned int [usertype] uid_lo
../drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:157:45: got restricted __be32 [usertype]
../drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:157:56: warning: incorrect type in argument 4 (different base types)
../drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:157:56: expected unsigned short [usertype] seqid
../drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:157:56: got restricted __be16 [usertype]
../drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:306:26: warning: incorrect type in argument 1 (different address spaces)
../drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:306:26: expected void const [noderef] __iomem *
../drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:306:26: got void *reg
../drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:336:33: warning: incorrect type in argument 1 (different address spaces)
../drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:336:33: expected void *reg
../drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:336:33: got unsigned int [noderef] __iomem *
../drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:343:33: warning: incorrect type in argument 1 (different address spaces)
../drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:343:33: expected void *reg
../drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:343:33: got unsigned int [noderef] __iomem *
../drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:356:33: warning: incorrect type in argument 1 (different address spaces)
../drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:356:33: expected void *reg
../drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:356:33: got unsigned int [noderef] __iomem *
../drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:397:33: warning: incorrect type in argument 1 (different address spaces)
../drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:397:33: expected void *reg
../drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:397:33: got unsigned int [noderef] __iomem *
../drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:466:41: warning: incorrect type in argument 1 (different address spaces)
../drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:466:41: expected void *reg
../drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:466:41: got unsigned int [noderef] __iomem *
../drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c:1035:24: warning: cast to restricted __le64 ../drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c:1037:24: warning: cast to restricted __le64 ../drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c:2133:17: warning: cast truncates bits from constant value (42110030 becomes 30) ../drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c:2133:17: warning: cast truncates bits from constant value (42110030 becomes 30) ../drivers/net/ethernet/neterion/vxge/vxge-main.c:116:27: warning: context imbalance in 'vxge_poll_inta' - different lock contexts for basic block ../drivers/net/ethernet/neterion/vxge/vxge-main.c:116:27: warning: context imbalance in 'vxge_netpoll' - different lock contexts for basic block ../drivers/net/ethernet/neterion/vxge/vxge-main.c:116:27: warning: context imbalance in 'vxge_tx_msix_handle' - different lock contexts for basic block ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:573:25: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:576:38: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:575:31: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:575:62: warning: incorrect type in initializer (different base types)
../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:575:62: expected restricted __le32 [usertype] offs
../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:575:62: got unsigned int
../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:577:35: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:579:21: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:580:66: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:603:54: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:603:64: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:603:20: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:617:22: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:629:63: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:629:26: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:628:20: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:635:18: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:635:55: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:634:16: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:638:21: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:638:50: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:652:22: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:664:63: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:664:26: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:663:20: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:670:18: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:670:55: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:669:16: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:672:21: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:672:50: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:699:55: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:699:65: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:699:20: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:705:25: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:712:38: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:711:24: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:711:22: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:711:22: expected restricted __le32 [usertype] offs
../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:711:22: got unsigned int
../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:713:25: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:714:32: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:719:33: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:720:62: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:768:19: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:768:19: warning: incorrect type in initializer (different base types)
../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:768:19: expected int idx
../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:768:19: got restricted __le32 [usertype]
../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:779:26: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:778:16: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:778:14: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:778:14: expected restricted __le32 [usertype] offs
../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:778:14: got unsigned int
../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:781:48: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:790:22: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:790:22: expected unsigned int [usertype] offs
../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:790:22: got restricted __le32 [usertype]
../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:803:22: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:803:22: expected unsigned int [usertype] offs
../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:803:22: got restricted __le32 [usertype]
../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:835:38: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:836:33: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:849:33: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:849:24: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:849:48: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:849:45: warning: incorrect type in return expression (different base types)
../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:849:45: expected restricted __le32
../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:849:45: got unsigned int
../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:862:28: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:864:25: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:864:45: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:865:58: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:864:70: warning: incorrect type in return expression (different base types)
../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:864:70: expected restricted __le32
../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:864:70: got unsigned int
../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:913:21: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:913:21: expected unsigned int [usertype] val
../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:913:21: got restricted __le32
../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:1001:72: warning: incorrect type in argument 3 (different base types)
../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:1001:72: expected unsigned long long [usertype]
../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:1001:72: got restricted __le64 [assigned] [usertype] data
../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:1016:60: warning: incorrect type in argument 3 (different base types)
../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:1016:60: expected unsigned long long [usertype]
../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:1016:60: got restricted __le64 [assigned] [usertype] data
../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:1027:60: warning: incorrect type in argument 3 (different base types)
../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:1027:60: expected unsigned long long [usertype]
../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:1027:60: got restricted __le64 [assigned] [usertype] data
../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:1101:23: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:1101:23: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:1101:23: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:1125:24: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:1125:24: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:1125:24: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:1125:22: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:1125:22: expected restricted __le32 [addressable] [usertype] flash_fw_ver
../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:1125:22: got unsigned int
../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:1129:46: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c:1141:21: warning: restricted __le32 degrades to integer ../drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c:894:25: warning: incorrect type in assignment (different base types)
../drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c:894:25: expected unsigned int [usertype]
../drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c:894:25: got restricted __le32 [usertype]
../drivers/net/ethernet/qlogic/netxen/netxen_nic_ctx.c:201:31: warning: cast to restricted __le32 ../drivers/net/ethernet/sun/cassini.c:236:9: warning: context imbalance in 'cas_shutdown' - different lock contexts for basic block ../drivers/net/ethernet/sun/cassini.c:236:9: warning: context imbalance in 'cas_reset_task' - different lock contexts for basic block ../drivers/net/ethernet/via/via-rhine.c:1149:39: warning: cast removes address space '__iomem' of expression ../drivers/net/ethernet/sun/cassini.c:236:9: warning: context imbalance in 'cas_link_timer' - different lock contexts for basic block ../drivers/net/ethernet/sun/cassini.c:236:9: warning: context imbalance in 'cas_open' - different lock contexts for basic block ../drivers/net/ethernet/sun/cassini.c:236:9: warning: context imbalance in 'cas_close' - different lock contexts for basic block ../drivers/net/ethernet/sun/cassini.c:236:9: warning: context imbalance in 'cas_suspend' - different lock contexts for basic block ../drivers/net/ethernet/sun/cassini.c:236:9: warning: context imbalance in 'cas_resume' - different lock contexts for basic block ../drivers/net/ethernet/via/via-velocity.c: note: in included file:
../drivers/net/ethernet/via/via-velocity.h:237:24: warning: mixed bitwiseness
../drivers/net/ethernet/via/via-velocity.c:88:26: warning: incorrect type in initializer (different address spaces)
../drivers/net/ethernet/via/via-velocity.c:88:26: expected void *addr
../drivers/net/ethernet/via/via-velocity.c:88:26: got struct mac_regs [noderef] __iomem *mac_regs
../drivers/net/ethernet/via/via-velocity.c:91:49: warning: incorrect type in argument 2 (different base types)
../drivers/net/ethernet/via/via-velocity.c:91:49: expected restricted pci_power_t [usertype] state
../drivers/net/ethernet/via/via-velocity.c:91:49: got char state
../drivers/net/ethernet/via/via-velocity.c:93:36: warning: incorrect type in argument 2 (different address spaces)
../drivers/net/ethernet/via/via-velocity.c:93:36: expected void volatile [noderef] __iomem *addr
../drivers/net/ethernet/via/via-velocity.c:93:36: got void *
../drivers/net/ethernet/via/via-velocity.c:1745:34: warning: cast from restricted __le16 ../drivers/net/ethernet/via/via-velocity.c:1745:34: warning: cast from restricted __le16 ../drivers/net/ethernet/via/via-velocity.c:1745:34: warning: cast from restricted __le16 ../drivers/net/ethernet/via/via-velocity.c:1745:34: warning: cast from restricted __le16 ../drivers/net/ethernet/via/via-velocity.c:1745:34: warning: cast from restricted __le16 ../drivers/net/ethernet/via/via-velocity.c:1745:34: warning: cast from restricted __le16 ../drivers/net/ethernet/via/via-velocity.c:1748:17: warning: cast to restricted __le16 ../drivers/net/ethernet/via/via-velocity.c:2241:40: warning: incorrect type in argument 2 (different base types)
../drivers/net/ethernet/via/via-velocity.c:2241:40: expected char state
../drivers/net/ethernet/via/via-velocity.c:2241:40: got restricted pci_power_t [usertype]
../drivers/net/ethernet/via/via-velocity.c:2249:48: warning: incorrect type in argument 2 (different base types)
../drivers/net/ethernet/via/via-velocity.c:2249:48: expected char state
../drivers/net/ethernet/via/via-velocity.c:2249:48: got restricted pci_power_t [usertype]
../drivers/net/ethernet/via/via-velocity.c:2436:48: warning: incorrect type in argument 2 (different base types)
../drivers/net/ethernet/via/via-velocity.c:2436:48: expected char state
../drivers/net/ethernet/via/via-velocity.c:2436:48: got restricted pci_power_t [usertype]
../drivers/net/ethernet/via/via-velocity.c:2449:48: warning: incorrect type in argument 2 (different base types)
../drivers/net/ethernet/via/via-velocity.c:2449:48: expected char state
../drivers/net/ethernet/via/via-velocity.c:2449:48: got restricted pci_power_t [usertype]
../drivers/net/ethernet/via/via-velocity.c:2874:40: warning: incorrect type in argument 2 (different base types)
../drivers/net/ethernet/via/via-velocity.c:2874:40: expected char state
../drivers/net/ethernet/via/via-velocity.c:2874:40: got restricted pci_power_t [usertype]
../drivers/net/ethernet/via/via-velocity.c:3149:48: warning: incorrect type in argument 2 (different base types)
../drivers/net/ethernet/via/via-velocity.c:3149:48: expected char state
../drivers/net/ethernet/via/via-velocity.c:3149:48: got restricted pci_power_t [usertype]
../drivers/net/ethernet/via/via-velocity.c:3155:48: warning: incorrect type in argument 2 (different base types)
../drivers/net/ethernet/via/via-velocity.c:3155:48: expected char state
../drivers/net/ethernet/via/via-velocity.c:3155:48: got restricted pci_power_t [usertype]
../drivers/net/ethernet/via/via-velocity.c:3207:40: warning: incorrect type in argument 2 (different base types)
../drivers/net/ethernet/via/via-velocity.c:3207:40: expected char state
../drivers/net/ethernet/via/via-velocity.c:3207:40: got restricted pci_power_t [usertype]
../drivers/net/ethernet/via/via-velocity.c:3277:48: warning: incorrect type in argument 2 (different base types)
../drivers/net/ethernet/via/via-velocity.c:3277:48: expected char state
../drivers/net/ethernet/via/via-velocity.c:3277:48: got restricted pci_power_t [usertype]
../drivers/net/ethernet/via/via-velocity.c:3294:48: warning: incorrect type in argument 2 (different base types)
../drivers/net/ethernet/via/via-velocity.c:3294:48: expected char state
../drivers/net/ethernet/via/via-velocity.c:3294:48: got restricted pci_power_t [usertype]
../drivers/net/ethernet/ethoc.c:317:13: warning: incorrect type in assignment (different address spaces)
../drivers/net/ethernet/ethoc.c:317:13: expected void *vma
../drivers/net/ethernet/ethoc.c:317:13: got void [noderef] __iomem *membase
../drivers/net/ethernet/ethoc.c:454:67: warning: incorrect type in argument 2 (different address spaces)
../drivers/net/ethernet/ethoc.c:454:67: expected void const volatile [noderef] __iomem *
../drivers/net/ethernet/ethoc.c:454:67: got void *src
../drivers/net/ethernet/ethoc.c:912:21: warning: incorrect type in argument 1 (different address spaces)
../drivers/net/ethernet/ethoc.c:912:21: expected void volatile [noderef] __iomem *
../drivers/net/ethernet/ethoc.c:912:21: got void *[assigned] dest
../drivers/net/ethernet/ethoc.c:1112:31: warning: incorrect type in assignment (different address spaces)
../drivers/net/ethernet/ethoc.c:1112:31: expected void [noderef] __iomem *membase
../drivers/net/ethernet/ethoc.c:1112:31: got void *

#35 lore raw
Quoted 2 lines · Jakub Kicinski

Yeah, maybe you need COMPILE_TEST? (full list of the warnings triggered by the last patch at the end of the email)

Ah, good idea, I checked and I have that set, however, I understand what's going on now.

Quoted 8 lines
Quoted 2 lines

but I'd like to target the actual job you're running and use that as the short-term goal.

If the code is of any use:

https://github.com/kuba-moo/nipa

But it expects to run against a patchwork instance.

Thanks! that's interesting on it's own!

Quoted 8 lines
Quoted 4 lines

Also, if you have any comments about the removal of the lvalue from some of the register read operations, I figure that is the riskiest part of all this.

Nothing looked suspicious to me. Besides if the compiler is warning that the variable is unused I'm pretty sure it will optimize that variable out, anyway so machine code shouldn't change with this series.

Good point, I'll check that.

Quoted 4 lines

../drivers/net/ethernet/atheros/atlx/atl1.c:1999:26: warning: cast to restricted __le16 ../drivers/net/ethernet/atheros/atlx/atl1.c:2060:33: warning: cast to restricted __le16 ../drivers/net/ethernet/atheros/atlx/atl1.c:2125:45: warning: invalid assignment: |=
../drivers/net/ethernet/atheros/atlx/atl1.c:2125:45: left side has type restricted __le32

<snip>

If I'm not mistaken *all* the warnings you had listed are from C=1 (sparse) which would be best fixed with a second set of patches. This set of patches only aimed to get rid of the W=1 (gcc warnings and kdoc warnings from scripts/kernel-doc)

If you run the commands separately you'll see what I mean. make W=1 M=drivers/net/ethernet
make C=2 M=drivers/net/ethernet

C=2 will force the sparse check but unfortunately will also rebuild everything again.

I see about 1188 unique sparse warnings in drivers/net/ethernet and only 16 unique errors from sparse. It's a lot but fixable. However my experience with these warnings is that I could break something in fixing them on drivers I can't test.

I just did some spelunking on the sparse warnings, there are only 82 different ones (many are repeated). About half are context imbalances where a lock maybe isn't released. I would bet a bunch are undetected bugs.

TL;DR

Here is a list of driver files with sparse warnings from C=1, maybe we can encourage some others to help me fix them?

drivers/net/ethernet/3com/3c509.c drivers/net/ethernet/3com/3c574_cs.c drivers/net/ethernet/3com/3c589_cs.c drivers/net/ethernet/3com/3c59x.c drivers/net/ethernet/3com/typhoon.c drivers/net/ethernet/8390/axnet_cs.c drivers/net/ethernet/8390/ne2k-pci.c drivers/net/ethernet/8390/pcnet_cs.c drivers/net/ethernet/adaptec/starfire.c drivers/net/ethernet/alacritech/slicoss.c drivers/net/ethernet/alteon/acenic.c drivers/net/ethernet/amd/pcnet32.c drivers/net/ethernet/aquantia/atlantic/hw_atl2/hw_atl2.c drivers/net/ethernet/arc/emac_main.c drivers/net/ethernet/atheros/alx/main.c drivers/net/ethernet/atheros/atl1c/atl1c_hw.c drivers/net/ethernet/atheros/atl1c/atl1c_main.c drivers/net/ethernet/atheros/atl1e/atl1e_main.c drivers/net/ethernet/atheros/atlx/atl1.c drivers/net/ethernet/broadcom/bnx2.c drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c drivers/net/ethernet/broadcom/cnic.c drivers/net/ethernet/broadcom/tg3.c drivers/net/ethernet/brocade/bna/bfa_cee.c drivers/net/ethernet/brocade/bna/bfa_ioc.c drivers/net/ethernet/brocade/bna/bfa_ioc.h drivers/net/ethernet/brocade/bna/bfa_msgq.c drivers/net/ethernet/brocade/bna/bnad.c drivers/net/ethernet/brocade/bna/bna_enet.c drivers/net/ethernet/brocade/bna/bna_tx_rx.c drivers/net/ethernet/cadence/macb_main.c drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c drivers/net/ethernet/cavium/liquidio/lio_core.c drivers/net/ethernet/cavium/liquidio/lio_main.c drivers/net/ethernet/cavium/liquidio/lio_vf_main.c drivers/net/ethernet/cavium/liquidio/lio_vf_rep.c drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c drivers/net/ethernet/cavium/liquidio/request_manager.c drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c drivers/net/ethernet/chelsio/cxgb3/sge.c drivers/net/ethernet/chelsio/cxgb3/t3_hw.c drivers/net/ethernet/chelsio/cxgb4vf/sge.c drivers/net/ethernet/chelsio/cxgb/sge.c drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.c drivers/net/ethernet/chelsio/libcxgb/libcxgb_ppm.c drivers/net/ethernet/cisco/enic/enic_ethtool.c drivers/net/ethernet/cisco/enic/enic_main.c drivers/net/ethernet/cisco/enic/enic_pp.c drivers/net/ethernet/cisco/enic/vnic_vic.c drivers/net/ethernet/dlink/dl2k.c drivers/net/ethernet/dlink/sundance.c drivers/net/ethernet/emulex/benet/be_cmds.c drivers/net/ethernet/emulex/benet/be_main.c drivers/net/ethernet/ethoc.c drivers/net/ethernet/freescale/dpaa2/dpmac.c drivers/net/ethernet/freescale/enetc/enetc_ethtool.c drivers/net/ethernet/freescale/enetc/enetc_hw.h drivers/net/ethernet/freescale/enetc/enetc_qos.c drivers/net/ethernet/freescale/fsl_pq_mdio.c drivers/net/ethernet/freescale/gianfar.c drivers/net/ethernet/freescale/xgmac_mdio.c drivers/net/ethernet/huawei/hinic/hinic_common.c drivers/net/ethernet/huawei/hinic/hinic_hw_api_cmd.c drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c drivers/net/ethernet/huawei/hinic/hinic_hw_eqs.c drivers/net/ethernet/huawei/hinic/hinic_hw_io.c drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c drivers/net/ethernet/huawei/hinic/hinic_hw_qp.c drivers/net/ethernet/huawei/hinic/hinic_hw_wq.c drivers/net/ethernet/huawei/hinic/hinic_main.c drivers/net/ethernet/huawei/hinic/hinic_port.c drivers/net/ethernet/huawei/hinic/hinic_rx.c drivers/net/ethernet/huawei/hinic/hinic_tx.c drivers/net/ethernet/intel/e1000/e1000_ethtool.c drivers/net/ethernet/intel/e100.c drivers/net/ethernet/intel/fm10k/fm10k_pci.c drivers/net/ethernet/intel/i40e/i40e_main.c drivers/net/ethernet/intel/i40e/i40e_txrx.c drivers/net/ethernet/intel/i40e/i40e_xsk.c drivers/net/ethernet/intel/igb/igb_ethtool.c drivers/net/ethernet/intel/igb/igb_main.c drivers/net/ethernet/intel/igb/igb_ptp.c drivers/net/ethernet/intel/igbvf/netdev.c drivers/net/ethernet/intel/igc/igc_dump.c drivers/net/ethernet/intel/igc/igc_ethtool.c drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c drivers/net/ethernet/jme.c drivers/net/ethernet/marvell/mv643xx_eth.c drivers/net/ethernet/marvell/mvneta.c drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c drivers/net/ethernet/marvell/octeontx2/af/rvu.c drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c drivers/net/ethernet/marvell/skge.c drivers/net/ethernet/marvell/sky2.c drivers/net/ethernet/micrel/ks8851_par.c drivers/net/ethernet/micrel/ksz884x.c drivers/net/ethernet/myricom/myri10ge/myri10ge.c drivers/net/ethernet/natsemi/ns83820.c drivers/net/ethernet/neterion/s2io.c drivers/net/ethernet/neterion/vxge/vxge-config.c drivers/net/ethernet/neterion/vxge/vxge-main.c drivers/net/ethernet/nvidia/forcedeth.c drivers/net/ethernet/nxp/lpc_eth.c drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c drivers/net/ethernet/packetengines/hamachi.c drivers/net/ethernet/qlogic/netxen/netxen_nic_ctx.c drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c drivers/net/ethernet/qlogic/qed/qed_mcp.c drivers/net/ethernet/qualcomm/emac/emac-mac.c drivers/net/ethernet/qualcomm/qca_7k_common.c drivers/net/ethernet/realtek/8139too.c drivers/net/ethernet/renesas/sh_eth.c drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c drivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c drivers/net/ethernet/stmicro/stmmac/dwxgmac2_descs.c drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c drivers/net/ethernet/sun/cassini.c drivers/net/ethernet/synopsys/dwc-xlgmac-hw.c drivers/net/ethernet/ti/tlan.c drivers/net/ethernet/via/via-rhine.c drivers/net/ethernet/via/via-velocity.c drivers/net/ethernet/via/via-velocity.h drivers/net/ethernet/xilinx/ll_temac_main.c drivers/net/ethernet/xilinx/xilinx_axienet_main.c

maintainer
#36 lore raw
Quoted 4 lines · On Fri, 11 Sep 2020 14:34:05 -0700 Jesse Brandeburg wrote:

If I'm not mistaken *all* the warnings you had listed are from C=1 (sparse) which would be best fixed with a second set of patches. This set of patches only aimed to get rid of the W=1 (gcc warnings and kdoc warnings from scripts/kernel-doc)

Oh damn, you're right. I got fooled by my own logs :/

#37 lore raw
In reply to Jesse Brandeburg
Quoted 2 lines · Jesse Brandeburg

Here is a list of driver files with sparse warnings from C=1, maybe we can encourage some others to help me fix them?

I can take care of drivers/net/ethernet/freescale, thanks for the effort so far! I'll try to send a patch tomorrow.

-Vladimir