Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

iavf: fix kernel-doc comment style in iavf_ethtool.c

iavf_ethtool.c contains 31 kernel-doc comment blocks using the legacy
`**/` terminator instead of the correct single `*/`. Two function
headers also use a colon separator (`iavf_get_channels:`,
`iavf_set_channels:`) instead of the ` - ` dash required by kernel-doc.

Additionally several comments embed their return-value descriptions in
the body paragraph, producing `scripts/kernel-doc -Wreturn` warnings.
Void functions that incorrectly say "Returns ..." are also rephrased.

Fix all issues across the full file:
- Replace every `**/` terminator with `*/`.
- Change `function_name:` doc headers to `function_name -`.
- Move inline "Returns ..." sentences into dedicated `Return:` sections
for non-void functions (iavf_get_msglevel, iavf_get_rxnfc,
iavf_set_channels, iavf_get_rxfh_key_size, iavf_get_rxfh_indir_size,
iavf_get_rxfh, iavf_set_rxfh).
- Rephrase body descriptions in void functions that incorrectly said
"Returns ..." (iavf_get_drvinfo, iavf_get_ringparam, iavf_get_coalesce).
- Remove boilerplate body text for iavf_get_rxfh_key_size and
iavf_get_rxfh_indir_size; the `Return:` line now conveys the same
information without the vague "Returns the table size." sentence.

Suggested-by: Anthony L. Nguyen <anthony.l.nguyen@intel.com>
Suggested-by: Leszek Pepiak <leszek.pepiak@intel.com>
Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Reviewed-by: Breno Leitao <leitao@debian.org>
Reviewed-by: Joe Damato <joe@dama.to>
Link: https://patch.msgid.link/20260409093020.3808687-1-aleksandr.loktionov@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Aleksandr Loktionov and committed by
Jakub Kicinski
3f3a2aef 43f7081d

+53 -50
+53 -50
drivers/net/ethernet/intel/iavf/iavf_ethtool.c
··· 32 32 * statistics array. Thus, every statistic string in an array should have the 33 33 * same type and number of format specifiers, to be formatted by variadic 34 34 * arguments to the iavf_add_stat_string() helper function. 35 - **/ 35 + */ 36 36 struct iavf_stats { 37 37 char stat_string[ETH_GSTRING_LEN]; 38 38 int sizeof_stat; ··· 116 116 * the next empty location for successive calls to __iavf_add_ethtool_stats. 117 117 * If pointer is null, set the data values to zero and update the pointer to 118 118 * skip these stats. 119 - **/ 119 + */ 120 120 static void 121 121 __iavf_add_ethtool_stats(u64 **data, void *pointer, 122 122 const struct iavf_stats stats[], ··· 140 140 * 141 141 * The parameter @stats is evaluated twice, so parameters with side effects 142 142 * should be avoided. 143 - **/ 143 + */ 144 144 #define iavf_add_ethtool_stats(data, pointer, stats) \ 145 145 __iavf_add_ethtool_stats(data, pointer, stats, ARRAY_SIZE(stats)) 146 146 ··· 157 157 * buffer and update the data pointer when finished. 158 158 * 159 159 * This function expects to be called while under rcu_read_lock(). 160 - **/ 160 + */ 161 161 static void 162 162 iavf_add_queue_stats(u64 **data, struct iavf_ring *ring) 163 163 { ··· 189 189 * 190 190 * Format and copy the strings described by stats into the buffer pointed at 191 191 * by p. 192 - **/ 192 + */ 193 193 static void __iavf_add_stat_strings(u8 **p, const struct iavf_stats stats[], 194 194 const unsigned int size, ...) 195 195 { ··· 216 216 * The parameter @stats is evaluated twice, so parameters with side effects 217 217 * should be avoided. Additionally, stats must be an array such that 218 218 * ARRAY_SIZE can be called on it. 219 - **/ 219 + */ 220 220 #define iavf_add_stat_strings(p, stats, ...) \ 221 221 __iavf_add_stat_strings(p, stats, ARRAY_SIZE(stats), ## __VA_ARGS__) 222 222 ··· 249 249 * 250 250 * Reports speed/duplex settings. Because this is a VF, we don't know what 251 251 * kind of link we really have, so we fake it. 252 - **/ 252 + */ 253 253 static int iavf_get_link_ksettings(struct net_device *netdev, 254 254 struct ethtool_link_ksettings *cmd) 255 255 { ··· 308 308 * @sset: id of string set 309 309 * 310 310 * Reports size of various string tables. 311 - **/ 311 + */ 312 312 static int iavf_get_sset_count(struct net_device *netdev, int sset) 313 313 { 314 314 /* Report the maximum number queues, even if not every queue is ··· 331 331 * @data: pointer to data buffer 332 332 * 333 333 * All statistics are added to the data buffer as an array of u64. 334 - **/ 334 + */ 335 335 static void iavf_get_ethtool_stats(struct net_device *netdev, 336 336 struct ethtool_stats *stats, u64 *data) 337 337 { ··· 367 367 * @data: buffer for string data 368 368 * 369 369 * Builds the statistics string table 370 - **/ 370 + */ 371 371 static void iavf_get_stat_strings(struct net_device *netdev, u8 *data) 372 372 { 373 373 unsigned int i; ··· 392 392 * @data: buffer for string data 393 393 * 394 394 * Builds string tables for various string sets 395 - **/ 395 + */ 396 396 static void iavf_get_strings(struct net_device *netdev, u32 sset, u8 *data) 397 397 { 398 398 switch (sset) { ··· 408 408 * iavf_get_msglevel - Get debug message level 409 409 * @netdev: network interface device structure 410 410 * 411 - * Returns current debug message level. 412 - **/ 411 + * Return: current debug message level. 412 + */ 413 413 static u32 iavf_get_msglevel(struct net_device *netdev) 414 414 { 415 415 struct iavf_adapter *adapter = netdev_priv(netdev); ··· 424 424 * 425 425 * Set current debug message level. Higher values cause the driver to 426 426 * be noisier. 427 - **/ 427 + */ 428 428 static void iavf_set_msglevel(struct net_device *netdev, u32 data) 429 429 { 430 430 struct iavf_adapter *adapter = netdev_priv(netdev); ··· 439 439 * @netdev: network interface device structure 440 440 * @drvinfo: ethool driver info structure 441 441 * 442 - * Returns information about the driver and device for display to the user. 443 - **/ 442 + * Fills @drvinfo with information about the driver and device. 443 + */ 444 444 static void iavf_get_drvinfo(struct net_device *netdev, 445 445 struct ethtool_drvinfo *drvinfo) 446 446 { ··· 458 458 * @kernel_ring: ethtool extenal ringparam structure 459 459 * @extack: netlink extended ACK report struct 460 460 * 461 - * Returns current ring parameters. TX and RX rings are reported separately, 462 - * but the number of rings is not reported. 463 - **/ 461 + * Fills @ring with current ring parameters. TX and RX rings are reported 462 + * separately, but the number of rings is not reported. 463 + */ 464 464 static void iavf_get_ringparam(struct net_device *netdev, 465 465 struct ethtool_ringparam *ring, 466 466 struct kernel_ethtool_ringparam *kernel_ring, ··· 483 483 * 484 484 * Sets ring parameters. TX and RX rings are controlled separately, but the 485 485 * number of rings is not specified, so all rings get the same settings. 486 - **/ 486 + */ 487 487 static int iavf_set_ringparam(struct net_device *netdev, 488 488 struct ethtool_ringparam *ring, 489 489 struct kernel_ethtool_ringparam *kernel_ring, ··· 551 551 * Gets the per-queue settings for coalescence. Specifically Rx and Tx usecs 552 552 * are per queue. If queue is <0 then we default to queue 0 as the 553 553 * representative value. 554 - **/ 554 + */ 555 555 static int __iavf_get_coalesce(struct net_device *netdev, 556 556 struct ethtool_coalesce *ec, int queue) 557 557 { ··· 588 588 * @kernel_coal: ethtool CQE mode setting structure 589 589 * @extack: extack for reporting error messages 590 590 * 591 - * Returns current coalescing settings. This is referred to elsewhere in the 592 - * driver as Interrupt Throttle Rate, as this is how the hardware describes 593 - * this functionality. Note that if per-queue settings have been modified this 594 - * only represents the settings of queue 0. 595 - **/ 591 + * Fills @ec with current coalescing settings. This is referred to elsewhere 592 + * in the driver as Interrupt Throttle Rate, as this is how the hardware 593 + * describes this functionality. Note that if per-queue settings have been 594 + * modified this only represents the settings of queue 0. 595 + */ 596 596 static int iavf_get_coalesce(struct net_device *netdev, 597 597 struct ethtool_coalesce *ec, 598 598 struct kernel_ethtool_coalesce *kernel_coal, ··· 608 608 * @queue: the queue to read 609 609 * 610 610 * Read specific queue's coalesce settings. 611 - **/ 611 + */ 612 612 static int iavf_get_per_queue_coalesce(struct net_device *netdev, u32 queue, 613 613 struct ethtool_coalesce *ec) 614 614 { ··· 622 622 * @queue: the queue to modify 623 623 * 624 624 * Change the ITR settings for a specific queue. 625 - **/ 625 + */ 626 626 static int iavf_set_itr_per_queue(struct iavf_adapter *adapter, 627 627 struct ethtool_coalesce *ec, int queue) 628 628 { ··· 680 680 * @queue: the queue to change 681 681 * 682 682 * Sets the coalesce settings for a particular queue. 683 - **/ 683 + */ 684 684 static int __iavf_set_coalesce(struct net_device *netdev, 685 685 struct ethtool_coalesce *ec, int queue) 686 686 { ··· 722 722 * @extack: extack for reporting error messages 723 723 * 724 724 * Change current coalescing settings for every queue. 725 - **/ 725 + */ 726 726 static int iavf_set_coalesce(struct net_device *netdev, 727 727 struct ethtool_coalesce *ec, 728 728 struct kernel_ethtool_coalesce *kernel_coal, ··· 1639 1639 * @netdev: network interface device structure 1640 1640 * 1641 1641 * Return: number of RX rings. 1642 - **/ 1642 + */ 1643 1643 static u32 iavf_get_rx_ring_count(struct net_device *netdev) 1644 1644 { 1645 1645 struct iavf_adapter *adapter = netdev_priv(netdev); ··· 1653 1653 * @cmd: ethtool rxnfc command 1654 1654 * @rule_locs: pointer to store rule locations 1655 1655 * 1656 - * Returns Success if the command is supported. 1657 - **/ 1656 + * Return: 0 on success, -EOPNOTSUPP if the command is not supported. 1657 + */ 1658 1658 static int iavf_get_rxnfc(struct net_device *netdev, struct ethtool_rxnfc *cmd, 1659 1659 u32 *rule_locs) 1660 1660 { ··· 1684 1684 return ret; 1685 1685 } 1686 1686 /** 1687 - * iavf_get_channels: get the number of channels supported by the device 1687 + * iavf_get_channels - get the number of channels supported by the device 1688 1688 * @netdev: network interface device structure 1689 1689 * @ch: channel information structure 1690 1690 * 1691 1691 * For the purposes of our device, we only use combined channels, i.e. a tx/rx 1692 1692 * queue pair. Report one extra channel to match our "other" MSI-X vector. 1693 - **/ 1693 + */ 1694 1694 static void iavf_get_channels(struct net_device *netdev, 1695 1695 struct ethtool_channels *ch) 1696 1696 { ··· 1706 1706 } 1707 1707 1708 1708 /** 1709 - * iavf_set_channels: set the new channel count 1709 + * iavf_set_channels - set the new channel count 1710 1710 * @netdev: network interface device structure 1711 1711 * @ch: channel information structure 1712 1712 * 1713 - * Negotiate a new number of channels with the PF then do a reset. During 1714 - * reset we'll realloc queues and fix the RSS table. Returns 0 on success, 1715 - * negative on failure. 1716 - **/ 1713 + * Negotiate a new number of channels with the PF then do a reset. During 1714 + * reset we'll realloc queues and fix the RSS table. 1715 + * 1716 + * Return: 0 on success, negative on failure. 1717 + */ 1717 1718 static int iavf_set_channels(struct net_device *netdev, 1718 1719 struct ethtool_channels *ch) 1719 1720 { ··· 1751 1750 * iavf_get_rxfh_key_size - get the RSS hash key size 1752 1751 * @netdev: network interface device structure 1753 1752 * 1754 - * Returns the table size. 1755 - **/ 1753 + * Return: the RSS hash key size. 1754 + */ 1756 1755 static u32 iavf_get_rxfh_key_size(struct net_device *netdev) 1757 1756 { 1758 1757 struct iavf_adapter *adapter = netdev_priv(netdev); ··· 1764 1763 * iavf_get_rxfh_indir_size - get the rx flow hash indirection table size 1765 1764 * @netdev: network interface device structure 1766 1765 * 1767 - * Returns the table size. 1768 - **/ 1766 + * Return: the indirection table size. 1767 + */ 1769 1768 static u32 iavf_get_rxfh_indir_size(struct net_device *netdev) 1770 1769 { 1771 1770 struct iavf_adapter *adapter = netdev_priv(netdev); ··· 1778 1777 * @netdev: network interface device structure 1779 1778 * @rxfh: pointer to param struct (indir, key, hfunc) 1780 1779 * 1781 - * Reads the indirection table directly from the hardware. Always returns 0. 1782 - **/ 1780 + * Reads the indirection table directly from the hardware. 1781 + * 1782 + * Return: 0 always. 1783 + */ 1783 1784 static int iavf_get_rxfh(struct net_device *netdev, 1784 1785 struct ethtool_rxfh_param *rxfh) 1785 1786 { ··· 1809 1806 * @rxfh: pointer to param struct (indir, key, hfunc) 1810 1807 * @extack: extended ACK from the Netlink message 1811 1808 * 1812 - * Returns -EINVAL if the table specifies an invalid queue id, otherwise 1813 - * returns 0 after programming the table. 1814 - **/ 1809 + * Return: 0 on success, -EOPNOTSUPP if the hash function is not supported, 1810 + * -EINVAL if the table specifies an invalid queue id. 1811 + */ 1815 1812 static int iavf_set_rxfh(struct net_device *netdev, 1816 1813 struct ethtool_rxfh_param *rxfh, 1817 1814 struct netlink_ext_ack *extack) ··· 1888 1885 * 1889 1886 * Sets ethtool ops struct in our netdev so that ethtool can call 1890 1887 * our functions. 1891 - **/ 1888 + */ 1892 1889 void iavf_set_ethtool_ops(struct net_device *netdev) 1893 1890 { 1894 1891 netdev->ethtool_ops = &iavf_ethtool_ops;