public inbox for linux-m68k@lists.linux-m68k.org
 help / color / mirror / Atom feed
* [PATCH] m68k: add missing types to asm/irq.h
@ 2023-09-17  9:18 Rolf Eike Beer
  2023-10-04 15:16 ` Geert Uytterhoeven
  0 siblings, 1 reply; 2+ messages in thread
From: Rolf Eike Beer @ 2023-09-17  9:18 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: linux-m68k, linux-kernel

As reported in f8b648bf6628 ("net: sunhme: move asm includes to below linux
includes") when including this <asm/*> header before the needed <linux/*>
headers the compilation will fail because of missing types.

Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de>
---
 arch/m68k/include/asm/irq.h | 3 +++
 1 file changed, 3 insertions(+)

The patch is entirely untested.

diff --git a/arch/m68k/include/asm/irq.h b/arch/m68k/include/asm/irq.h
index 7829e955ca04..4b182bad0526 100644
--- a/arch/m68k/include/asm/irq.h
+++ b/arch/m68k/include/asm/irq.h
@@ -2,6 +2,8 @@
 #ifndef _M68K_IRQ_H_
 #define _M68K_IRQ_H_
 
+#include <linux/types.h>
+
 /*
  * This should be the same as the max(NUM_X_SOURCES) for all the
  * different m68k hosts compiled into the kernel.
@@ -59,6 +61,7 @@
 struct irq_data;
 struct irq_chip;
 struct irq_desc;
+struct pt_regs;
 extern unsigned int m68k_irq_startup(struct irq_data *data);
 extern unsigned int m68k_irq_startup_irq(unsigned int irq);
 extern void m68k_irq_shutdown(struct irq_data *data);
-- 
2.35.3





^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] m68k: add missing types to asm/irq.h
  2023-09-17  9:18 [PATCH] m68k: add missing types to asm/irq.h Rolf Eike Beer
@ 2023-10-04 15:16 ` Geert Uytterhoeven
  0 siblings, 0 replies; 2+ messages in thread
From: Geert Uytterhoeven @ 2023-10-04 15:16 UTC (permalink / raw)
  To: Rolf Eike Beer; +Cc: Simon Horman, linux-m68k, linux-kernel

Hi Rolf,

Thanks for your patch!

On Sun, Sep 17, 2023 at 11:18 AM Rolf Eike Beer <eike-kernel@sf-tec.de> wrote:
> As reported in f8b648bf6628 ("net: sunhme: move asm includes to below linux
> includes") when including this <asm/*> header before the needed <linux/*>
> headers the compilation will fail because of missing types.

    arch/m68k/include/asm/irq.h:66:20: warning: ‘struct pt_regs’
declared inside parameter list will not be visible outside of this
definition or declaration
       66 |             struct pt_regs *));
          |                    ^~~~~~~
    arch/m68k/include/asm/irq.h:78:11: error: expected ‘;’ before ‘void’
       78 | asmlinkage void do_IRQ(int irq, struct pt_regs *regs);
          |           ^~~~~
          |           ;
    arch/m68k/include/asm/irq.h:78:40: warning: ‘struct pt_regs’
declared inside parameter list will not be visible outside of this
definition or declaration
       78 | asmlinkage void do_IRQ(int irq, struct pt_regs *regs);
          |                                        ^~~~~~~
    arch/m68k/include/asm/irq.h:79:8: error: unknown type name ‘atomic_t’
       79 | extern atomic_t irq_err_count;
          |        ^~~~~~~~

> Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de>

> --- a/arch/m68k/include/asm/irq.h
> +++ b/arch/m68k/include/asm/irq.h
> @@ -2,6 +2,8 @@
>  #ifndef _M68K_IRQ_H_
>  #define _M68K_IRQ_H_
>
> +#include <linux/types.h>

When just including this file, that still leads to:

    arch/m68k/include/asm/irq.h:82:11: error: expected ‘;’ before ‘void’
       82 | asmlinkage void do_IRQ(int irq, struct pt_regs *regs);
          |           ^~~~~
          |           ;

Instead, you want:

    #include <linux/atomic.h>
    #include <linux/linkage.h>

> +
>  /*
>   * This should be the same as the max(NUM_X_SOURCES) for all the
>   * different m68k hosts compiled into the kernel.
> @@ -59,6 +61,7 @@
>  struct irq_data;
>  struct irq_chip;
>  struct irq_desc;
> +struct pt_regs;

OK

>  extern unsigned int m68k_irq_startup(struct irq_data *data);
>  extern unsigned int m68k_irq_startup_irq(unsigned int irq);
>  extern void m68k_irq_shutdown(struct irq_data *data);

Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
i.e. will queue in the m68k for-v6.7 branch, with the above fixed.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-10-04 15:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-17  9:18 [PATCH] m68k: add missing types to asm/irq.h Rolf Eike Beer
2023-10-04 15:16 ` Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox