x86: clean up some kernel-doc comments
Subsystems (2)
cover x86: clean up some kernel-doc comments
Patches 1, 4, and 5 are new.
[PATCH 1/5] perf/x86/intel/pt: drop kernel-doc for deleted struct members [PATCH 2/5 RESEND] x86/barrier: use correct parameter names in kernel-doc [PATCH 3/5 RESEND] x86/lib: checksum_64.h: eliminate all kernel-doc warnings [PATCH 4/5] x86/speculation: drop Excess function parameter descriptions [PATCH 5/5] x86/intel/quark: clean up function kernel-doc
arch/x86/events/intel/pt.h | 2 - arch/x86/include/asm/barrier.h | 6 +-- arch/x86/include/asm/checksum_64.h | 29 +++++++++-------- arch/x86/include/asm/spec-ctrl.h | 2 - arch/x86/platform/intel-quark/imr_selftest.c | 7 ---- 5 files changed, 21 insertions(+), 25 deletions(-)
PATCH 1/5 perf/x86/intel/pt: drop kernel-doc for deleted struct members
@lost and @topa_index are no longer part of struct pt_buffer so delete their comment lines.
Warning: ../arch/x86/events/intel/pt.h:86 Excess struct member 'lost'
description in 'pt_buffer'
Warning: ../arch/x86/events/intel/pt.h:86 Excess struct member
'topa_index' description in 'pt_buffer'
---
New patch.
arch/x86/events/intel/pt.h | 2 -- 1 file changed, 2 deletions(-)
arch/x86/events/intel/pt.h +0 -2
@@ -58,7 +58,6 @@ struct pt_pmu {* @cur_idx: current output region's index within @cur table * @output_off: offset within the current output region * @data_size: running total of the amount of data in this buffer -* @lost: if data was lost/truncated * @head: logical write offset inside the buffer * @snapshot: if this is for a snapshot/overwrite counter * @single: use Single Range Output instead of ToPA
@@ -68,7 +67,6 @@ struct pt_pmu {* @stop_te: STOP topa entry pointer * @intr_te: INT topa entry pointer * @data_pages: array of pages from perf -* @topa_index: table of topa entries indexed by page offset */ struct pt_buffer {struct list_head tables;
[tip: perf/core] perf/x86/intel/pt: Drop kernel-doc for deleted struct members
The following commit has been merged into the perf/core branch of tip:
The following commit has been merged into the perf/core branch of tip:
Commit-ID: cfd364903af769934ea92d5e80c9b8e20f7b48d2 Gitweb: https://git.kernel.org/tip/cfd364903af769934ea92d5e80c9b8e20f7b48d2 Author: Randy Dunlap <[email protected]> AuthorDate: Thu, 30 Jul 2026 16:34:25 -07:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Fri, 31 Jul 2026 11:44:23 +02:00
perf/x86/intel/pt: Drop kernel-doc for deleted struct members
@lost and @topa_index are no longer part of struct pt_buffer so delete their comment lines.
Warning: ../arch/x86/events/intel/pt.h:86 Excess struct member 'lost' description in 'pt_buffer'
Warning: ../arch/x86/events/intel/pt.h:86 Excess struct member 'topa_index' description in 'pt_buffer'
--- arch/x86/events/intel/pt.h | 2 -- 1 file changed, 2 deletions(-)
arch/x86/events/intel/pt.h +0 -2
@@ -58,7 +58,6 @@ struct pt_pmu {* @cur_idx: current output region's index within @cur table * @output_off: offset within the current output region * @data_size: running total of the amount of data in this buffer -* @lost: if data was lost/truncated * @head: logical write offset inside the buffer * @snapshot: if this is for a snapshot/overwrite counter * @single: use Single Range Output instead of ToPA
@@ -68,7 +67,6 @@ struct pt_pmu {* @stop_te: STOP topa entry pointer * @intr_te: INT topa entry pointer * @data_pages: array of pages from perf -* @topa_index: table of topa entries indexed by page offset */ struct pt_buffer {struct list_head tables;
PATCH RESEND 2/5 x86/barrier: use correct parameter names in kernel-doc
In reply to Randy DunlapUse the correct macro parameter names in the kernel-doc comments to avoid kernel-doc warnings:
Warning: arch/x86/include/asm/barrier.h:35 function parameter 'idx' not
described in 'array_index_mask_nospec'
Warning: arch/x86/include/asm/barrier.h:35 function parameter 'sz' not
described in 'array_index_mask_nospec'
Warning: arch/x86/include/asm/barrier.h:35 Excess function parameter
'index' description in 'array_index_mask_nospec'
Warning: arch/x86/include/asm/barrier.h:35 Excess function parameter
'size' description in 'array_index_mask_nospec'
---
Cc: Thomas Gleixner <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: [email protected]
arch/x86/include/asm/barrier.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/x86/include/asm/barrier.h +3 -3
@@ -27,11 +27,11 @@/** * array_index_mask_nospec() - generate a mask that is ~0UL when the * bounds check succeeds and 0 otherwise -* @index: array element index -* @size: number of elements in array +* @idx: array element index +* @sz: number of elements in array * * Returns: -* 0 - (index < size) +* 0 - (@idx < @sz) */ #define array_index_mask_nospec (idx,sz) ({ \ typeof((idx)+(sz)) __idx = (idx); \
PATCH RESEND 3/5 x86/lib: checksum_64.h: eliminate all kernel-doc warnings
In reply to Randy Dunlap- correct missing function parameter names
- add missing function return value sections
- use the correct function name in comments
to avoid these warnings (samples):
Warning: arch/x86/include/asm/checksum_64.h:23 No description found for
return value of 'csum_fold'
Warning: arch/x86/include/asm/checksum_64.h:46 function parameter 'iph'
not described in 'ip_fast_csum'
Warning: arch/x86/include/asm/checksum_64.h:46 function parameter 'ihl'
not described in 'ip_fast_csum'
Warning: arch/x86/include/asm/checksum_64.h:46 No description found for
return value of 'ip_fast_csum'
Warning: arch/x86/include/asm/checksum_64.h:89 expecting prototype for
csum_tcpup_nofold(). Prototype was for csum_tcpudp_nofold() instead
Warning: arch/x86/include/asm/checksum_64.h:115 expecting prototype for
csum_tcpup_magic(). Prototype was for csum_tcpudp_magic() instead
Warning: arch/x86/include/asm/checksum_64.h:119 No description found for
return value of 'csum_tcpudp_magic'
Warning: arch/x86/include/asm/checksum_64.h:129 No description found for
return value of 'csum_partial'
Warning: ./arch/x86/include/asm/checksum_64.h:175 function parameter
'_saddr' not described in 'csum_ipv6_magic'
Warning: ./arch/x86/include/asm/checksum_64.h:175 function parameter
'_daddr' not described in 'csum_ipv6_magic'
Warning: ./arch/x86/include/asm/checksum_64.h:175 Excess function
parameter 'saddr' description in 'csum_ipv6_magic'
Warning: ./arch/x86/include/asm/checksum_64.h:175 Excess function
parameter 'daddr' description in 'csum_ipv6_magic'
---
Cc: Thomas Gleixner <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: [email protected]
arch/x86/include/asm/checksum_64.h | 29 +++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-)
arch/x86/include/asm/checksum_64.h +17 -12
@@ -14,11 +14,13 @@/** * csum_fold - Fold and invert a 32bit checksum. -* sum: 32bit unfolded sum +* @sum: 32bit unfolded sum * * Fold a 32bit running checksum to 16bit and invert it. This is usually * the last step before putting a checksum into a packet. * Make sure not to mix with 64bit checksums. +* +* Returns: new checksum value */ static inline __sum16 csum_fold (__wsum sum) {
@@ -40,8 +42,10 @@ static inline __sum16 csum_fold(__wsum s/** * ip_fast_csum - Compute the IPv4 header checksum efficiently. -* iph: ipv4 header -* ihl: length of header / 4 +* @iph: ipv4 header +* @ihl: length of header / 4 +* +* Returns: header checksum */ static inline __sum16 ip_fast_csum (const void *iph,unsigned int ihl) {
@@ -74,14 +78,14 @@ static inline __sum16 ip_fast_csum(const }/** -* csum_tcpup_nofold - Compute an IPv4 pseudo header checksum. +* csum_tcpudp_nofold - Compute an IPv4 pseudo header checksum. * @saddr: source address * @daddr: destination address * @len: length of packet * @proto: ip protocol of packet * @sum: initial sum to be added in (32bit unfolded) * -* Returns the pseudo header checksum the input data. Result is +* Returns: the pseudo header checksum the input data. Result is * 32bit unfolded. */ static inline __wsum
@@ -100,14 +104,14 @@ csum_tcpudp_nofold(__be32 saddr, __be32/** -* csum_tcpup_magic - Compute an IPv4 pseudo header checksum. +* csum_tcpudp_magic - Compute an IPv4 pseudo header checksum. * @saddr: source address * @daddr: destination address * @len: length of packet * @proto: ip protocol of packet * @sum: initial sum to be added in (32bit unfolded) * -* Returns the 16bit pseudo header checksum the input data already +* Returns: the 16bit pseudo header checksum the input data already * complemented and ready to be filled in. */ static inline __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr,
@@ -123,7 +127,7 @@ static inline __sum16 csum_tcpudp_magic(* @len: length of buffer. * @sum: initial sum to be added in (32bit unfolded) * -* Returns the 32bit unfolded internet checksum of the buffer. +* Returns: the 32bit unfolded internet checksum of the buffer. * Before filling it in it needs to be csum_fold()'ed. * buff should be aligned to a 64bit boundary if possible. */
@@ -141,7 +145,7 @@ extern __wsum csum_partial_copy_nocheck(* @buff: buffer address. * @len: length of buffer. * -* Returns the 16bit folded/inverted checksum of the passed buffer. +* Returns: the 16bit folded/inverted checksum of the passed buffer. * Ready to fill in. */ extern __sum16 ip_compute_csum (const void *buff,int len);
@@ -159,15 +163,16 @@ static inline unsigned add32_with_carry(/** * csum_ipv6_magic - Compute checksum of an IPv6 pseudo header. -* @saddr: source address -* @daddr: destination address +* @_saddr: source address +* @_daddr: destination address * @len: length of packet * @proto: protocol of packet * @sum: initial sum (32bit unfolded) to be added in * * Computes an IPv6 pseudo header checksum. This sum is added the checksum * into UDP/TCP packets and contains some link layer information. -* Returns the unfolded 32bit checksum. +* +* Returns: the unfolded 32bit checksum. */ static inline __sum16 csum_ipv6_magic(
PATCH 4/5 x86/speculation: drop Excess function parameter descriptions
In reply to Randy DunlapThese function parameters don't exist so drop them to avoid kernel-doc warnings:
Warning: ../arch/x86/include/asm/spec-ctrl.h:28 Excess function parameter
'guest_spec_ctrl' description in 'x86_spec_ctrl_set_guest'
Warning: ../arch/x86/include/asm/spec-ctrl.h:42 Excess function parameter
'guest_spec_ctrl' description in 'x86_spec_ctrl_restore_host'
---
New patch.
arch/x86/include/asm/spec-ctrl.h | 2 -- 1 file changed, 2 deletions(-)
arch/x86/include/asm/spec-ctrl.h +0 -2
@@ -18,7 +18,6 @@ extern void x86_virt_spec_ctrl(u64 guest/** * x86_spec_ctrl_set_guest - Set speculation control registers for the guest -* @guest_spec_ctrl: The guest content of MSR_SPEC_CTRL * @guest_virt_spec_ctrl: The guest controlled bits of MSR_VIRT_SPEC_CTRL * (may get translated to MSR_AMD64_LS_CFG bits) *
@@ -32,7 +31,6 @@ void x86_spec_ctrl_set_guest(u64 guest_v/** * x86_spec_ctrl_restore_host - Restore host speculation control registers -* @guest_spec_ctrl: The guest content of MSR_SPEC_CTRL * @guest_virt_spec_ctrl: The guest controlled bits of MSR_VIRT_SPEC_CTRL * (may get translated to MSR_AMD64_LS_CFG bits) *
PATCH 5/5 x86/intel/quark: clean up function kernel-doc
In reply to Randy DunlapAdd a short description for imr_self_test() and drop the comments for the non-existent imr_self_test_exit() to avoid kernel-doc warnings:
Warning: arch/x86/platform/intel-quark/imr_selftest.c:52 missing initial
short description on line:
* imr_self_test
Warning: ../arch/x86/platform/intel-quark/imr_selftest.c:128 function
parameter 'imr_self_test_init' not described in 'device_initcall'
Warning: ../arch/x86/platform/intel-quark/imr_selftest.c:128 expecting
prototype for imr_self_test_exit(). Prototype was for device_initcall() instead
---
New patch.
arch/x86/platform/intel-quark/imr_selftest.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
arch/x86/platform/intel-quark/imr_selftest.c +1 -6
@@ -50,7 +50,7 @@ void __init imr_self_test_result(int res#undef SELFTEST/** -* imr_self_test +* imr_self_test - perform the IMR self-test * * Verify IMR self_test with some simple tests to verify overlap, * zero sized allocations and 1 KiB sized areas.
@@ -121,9 +121,4 @@ static int __init imr_self_test_init(voireturn 0 ; } -/** -* imr_self_test_exit - exit point for IMR code. -* -* return: -*/ device_initcall (imr_self_test_init);