Commit d0ea5cbd authored by Jesse Brandeburg's avatar Jesse Brandeburg Committed by David S. Miller
Browse files

drivers/net/ethernet: clean up mis-targeted comments



As part of the W=1 cleanups for ethernet, a million [*] driver
comments had to be cleaned up to get the W=1 compilation to
succeed. This change finally makes the drivers/net/ethernet tree
compile with W=1 set on the command line. NOTE: The kernel uses
kdoc style (see Documentation/process/kernel-doc.rst) when
documenting code, not doxygen or other styles.

After this patch the x86_64 build has no warnings from W=1, however
scripts/kernel-doc says there are 1545 more warnings in source files, that
I need to develop a script to fix in a followup patch.

The errors fixed here are all kdoc of a few classes, with a few outliers:
In file included from drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c:10:
drivers/net/ethernet/qlogic/netxen/netxen_nic.h:1193:18: warning: ‘FW_DUMP_LEVELS’ defined but not used [-Wunused-const-variable=]
 1193 | static const u32 FW_DUMP_LEVELS[] = { 0x3, 0x7, 0xf, 0x1f, 0x3f, 0x7f, 0xff };
      |                  ^~~~~~~~~~~~~~
... repeats 4 times...
drivers/net/ethernet/sun/cassini.c:2084:24: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body]
 2084 |    RX_USED_ADD(page, i);
drivers/net/ethernet/natsemi/ns83820.c: In function ‘phy_intr’:
drivers/net/ethernet/natsemi/ns83820.c:603:6: warning: variable ‘tbisr’ set but not used [-Wunused-but-set-variable]
  603 |  u32 tbisr, tanar, tanlpar;
      |      ^~~~~
drivers/net/ethernet/natsemi/ns83820.c: In function ‘ns83820_get_link_ksettings’:
drivers/net/ethernet/natsemi/ns83820.c:1207:11: warning: variable ‘tanar’ set but not used [-Wunused-but-set-variable]
 1207 |  u32 cfg, tanar, tbicr;
      |           ^~~~~
drivers/net/ethernet/packetengines/yellowfin.c:1063:18: warning: variable ‘yf_size’ set but not used [-Wunused-but-set-variable]
 1063 |   int data_size, yf_size;
      |                  ^~~~~~~

Normal kdoc fixes:
warning: Function parameter or member 'x' not described in 'y'
warning: Excess function parameter 'x' description in 'y'
warning: Cannot understand <string> on line <NNN> - I thought it was a doc line

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

Signed-off-by: default avatarJesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent add3c86a
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -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)
{
+5 −2
Original line number Diff line number Diff line
@@ -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)
{
+1 −1
Original line number Diff line number Diff line
@@ -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)
{
+4 −2
Original line number Diff line number Diff line
@@ -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)
{
+2 −0
Original line number Diff line number Diff line
@@ -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
Loading