diff mbox series

[RESEND,4/4] x86/apic: Fix W=1 build kernel-doc warning

Message ID 20250514062637.3287779-4-shivankg@amd.com
State New
Headers show
Series None | expand

Commit Message

Shivank Garg May 14, 2025, 6:26 a.m. UTC
Building the kernel with W=1 generates the following warning:

arch/x86/kernel/apic/apic.c:2140: warning: Function parameter or struct member 'spurious_interrupt' not described in 'DEFINE_IDTENTRY_IRQ'
arch/x86/kernel/apic/apic.c:2140: warning: expecting prototype for spurious_interrupt(). Prototype was for DEFINE_IDTENTRY_IRQ() instead

Fix the description format to fix the warning.

Signed-off-by: Shivank Garg <shivankg@amd.com>
---
 arch/x86/kernel/apic/apic.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Comments

Ingo Molnar May 15, 2025, 6:38 a.m. UTC | #1
* Shivank Garg <shivankg@amd.com> wrote:

> 
> 
> On 5/14/2025 1:26 PM, Ingo Molnar wrote:
> > 
> > * Shivank Garg <shivankg@amd.com> wrote:
> > 
> >> Building the kernel with W=1 generates the following warning:
> >>
> >> arch/x86/kernel/apic/apic.c:2140: warning: Function parameter or struct member 'spurious_interrupt' not described in 'DEFINE_IDTENTRY_IRQ'
> >> arch/x86/kernel/apic/apic.c:2140: warning: expecting prototype for spurious_interrupt(). Prototype was for DEFINE_IDTENTRY_IRQ() instead
> >>
> >> Fix the description format to fix the warning.
> >>
> >> Signed-off-by: Shivank Garg <shivankg@amd.com>
> >> ---
> >>  arch/x86/kernel/apic/apic.c | 7 ++++---
> >>  1 file changed, 4 insertions(+), 3 deletions(-)
> >>
> >> diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
> >> index 62584a347931..f888a28d400f 100644
> >> --- a/arch/x86/kernel/apic/apic.c
> >> +++ b/arch/x86/kernel/apic/apic.c
> >> @@ -2128,9 +2128,10 @@ static noinline void handle_spurious_interrupt(u8 vector)
> >>  }
> >>  
> >>  /**
> >> - * spurious_interrupt - Catch all for interrupts raised on unused vectors
> >> - * @regs:	Pointer to pt_regs on stack
> >> - * @vector:	The vector number
> >> + * DEFINE_IDTENTRY_IRQ - Handler for spurious interrupts
> >> + * @spurious_interrupt: Catch all for interrupts raised on unused vectors
> >> + * regs:	Pointer to pt_regs on stack
> >> + * vector:	The vector number
> > 
> > This is incorrect and is based on a misunderstanding of what the code 
> > does:
> > 
> > DEFINE_IDTENTRY_IRQ(spurious_interrupt)
> > {
> >         handle_spurious_interrupt(vector);
> > }
> 
> The kernel-doc tool doesn't handle macros properly.

Then we should not document that function in a misleading fashion, just 
to work around kernel-doc limitations.

> Can I change it to a normal comment instead?

Yeah, I think that's fine.

Thanks,

	Ingo
diff mbox series

Patch

diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index 62584a347931..f888a28d400f 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -2128,9 +2128,10 @@  static noinline void handle_spurious_interrupt(u8 vector)
 }
 
 /**
- * spurious_interrupt - Catch all for interrupts raised on unused vectors
- * @regs:	Pointer to pt_regs on stack
- * @vector:	The vector number
+ * DEFINE_IDTENTRY_IRQ - Handler for spurious interrupts
+ * @spurious_interrupt: Catch all for interrupts raised on unused vectors
+ * regs:	Pointer to pt_regs on stack
+ * vector:	The vector number
  *
  * This is invoked from ASM entry code to catch all interrupts which
  * trigger on an entry which is routed to the common_spurious idtentry