Re: [PATCH] m68k: Prevent some compiler warnings in coldfire builds

2019-08-19 Thread Geert Uytterhoeven
On Mon, Aug 5, 2019 at 2:18 PM Greg Ungerer  wrote:
> On 5/8/19 5:14 pm, Geert Uytterhoeven wrote:
> > On Sat, Aug 3, 2019 at 1:36 AM Greg Ungerer  wrote:
> >> On 2/8/19 10:10 am, Finn Thain wrote:
> >>> Since commit d3b41b6bb49e ("m68k: Dispatch nvram_ops calls to Atari or
> >>> Mac functions"), Coldfire builds generate compiler warnings due to the
> >>> unconditional inclusion of asm/atarihw.h and asm/macintosh.h.
> >>>
> >>> The inclusion of asm/atarihw.h causes warnings like this:
> >>>
> >>> In file included from ./arch/m68k/include/asm/atarihw.h:25:0,
> >>>from arch/m68k/kernel/setup_mm.c:41,
> >>>from arch/m68k/kernel/setup.c:3:
> >>> ./arch/m68k/include/asm/raw_io.h:39:0: warning: "__raw_readb" redefined
> >>>#define __raw_readb in_8
> >>>
> >>> In file included from ./arch/m68k/include/asm/io.h:6:0,
> >>>from arch/m68k/kernel/setup_mm.c:36,
> >>>from arch/m68k/kernel/setup.c:3:
> >>> ./arch/m68k/include/asm/io_no.h:16:0: note: this is the location of the 
> >>> previous definition
> >>>#define __raw_readb(addr) \
> >>> ...
> >>>
> >>> This issue is resolved by dropping the asm/raw_io.h include. It turns out
> >>> that asm/io_mm.h already includes that header file.
> >>>
> >>> Moving the relevant macro definitions helps to clarify this dependency
> >>> and make it safe to include asm/atarihw.h.
> >>>
> >>> The other warnings look like this:
> >>>
> >>> In file included from arch/m68k/kernel/setup_mm.c:48:0,
> >>>from arch/m68k/kernel/setup.c:3:
> >>> ./arch/m68k/include/asm/macintosh.h:19:35: warning: 'struct irq_data' 
> >>> declared inside parameter list will not be visible outside of this 
> >>> definition or declaration
> >>>extern void mac_irq_enable(struct irq_data *data);
> >>>  ^~~~
> >>> ...
> >>>
> >>> This issue is resolved by adding the missing linux/irq.h include.
> >>>
> >>> Cc: Michael Schmitz 
> >>> Signed-off-by: Finn Thain 
> >
> >>
> >> Looks good to me:
> >>
> >> Acked-by: Greg Ungerer 
> >>
> >> Geert: I can take this via the m68knommu tree if you like?
> >> Or if you want to pick it up then no problem.
> >
> > If you have fixes for m68knommu for v5.3, feel free to queue it.
> > Else I can queue it for v5.4.
> >
> > Reviewed-by: Geert Uytterhoeven 
>
> I don't currently have any fixes for 5.3 queued.
> And there is no real hurry on this anyway, it can wait for 5.4.
> So please add to your queue for 5.4

Thanks, applied and queued for v5.4.


Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@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


Re: [PATCH] m68k: Prevent some compiler warnings in coldfire builds

2019-08-05 Thread Greg Ungerer

Hi Geert,

On 5/8/19 5:14 pm, Geert Uytterhoeven wrote:

On Sat, Aug 3, 2019 at 1:36 AM Greg Ungerer  wrote:

On 2/8/19 10:10 am, Finn Thain wrote:

Since commit d3b41b6bb49e ("m68k: Dispatch nvram_ops calls to Atari or
Mac functions"), Coldfire builds generate compiler warnings due to the
unconditional inclusion of asm/atarihw.h and asm/macintosh.h.

The inclusion of asm/atarihw.h causes warnings like this:

In file included from ./arch/m68k/include/asm/atarihw.h:25:0,
   from arch/m68k/kernel/setup_mm.c:41,
   from arch/m68k/kernel/setup.c:3:
./arch/m68k/include/asm/raw_io.h:39:0: warning: "__raw_readb" redefined
   #define __raw_readb in_8

In file included from ./arch/m68k/include/asm/io.h:6:0,
   from arch/m68k/kernel/setup_mm.c:36,
   from arch/m68k/kernel/setup.c:3:
./arch/m68k/include/asm/io_no.h:16:0: note: this is the location of the 
previous definition
   #define __raw_readb(addr) \
...

This issue is resolved by dropping the asm/raw_io.h include. It turns out
that asm/io_mm.h already includes that header file.

Moving the relevant macro definitions helps to clarify this dependency
and make it safe to include asm/atarihw.h.

The other warnings look like this:

In file included from arch/m68k/kernel/setup_mm.c:48:0,
   from arch/m68k/kernel/setup.c:3:
./arch/m68k/include/asm/macintosh.h:19:35: warning: 'struct irq_data' declared 
inside parameter list will not be visible outside of this definition or 
declaration
   extern void mac_irq_enable(struct irq_data *data);
 ^~~~
...

This issue is resolved by adding the missing linux/irq.h include.

Cc: Michael Schmitz 
Signed-off-by: Finn Thain 




Looks good to me:

Acked-by: Greg Ungerer 

Geert: I can take this via the m68knommu tree if you like?
Or if you want to pick it up then no problem.


If you have fixes for m68knommu for v5.3, feel free to queue it.
Else I can queue it for v5.4.

Reviewed-by: Geert Uytterhoeven 


I don't currently have any fixes for 5.3 queued.
And there is no real hurry on this anyway, it can wait for 5.4.
So please add to your queue for 5.4

Regards
Greg




Re: [PATCH] m68k: Prevent some compiler warnings in coldfire builds

2019-08-05 Thread Geert Uytterhoeven
Hi Greg,

On Sat, Aug 3, 2019 at 1:36 AM Greg Ungerer  wrote:
> On 2/8/19 10:10 am, Finn Thain wrote:
> > Since commit d3b41b6bb49e ("m68k: Dispatch nvram_ops calls to Atari or
> > Mac functions"), Coldfire builds generate compiler warnings due to the
> > unconditional inclusion of asm/atarihw.h and asm/macintosh.h.
> >
> > The inclusion of asm/atarihw.h causes warnings like this:
> >
> > In file included from ./arch/m68k/include/asm/atarihw.h:25:0,
> >   from arch/m68k/kernel/setup_mm.c:41,
> >   from arch/m68k/kernel/setup.c:3:
> > ./arch/m68k/include/asm/raw_io.h:39:0: warning: "__raw_readb" redefined
> >   #define __raw_readb in_8
> >
> > In file included from ./arch/m68k/include/asm/io.h:6:0,
> >   from arch/m68k/kernel/setup_mm.c:36,
> >   from arch/m68k/kernel/setup.c:3:
> > ./arch/m68k/include/asm/io_no.h:16:0: note: this is the location of the 
> > previous definition
> >   #define __raw_readb(addr) \
> > ...
> >
> > This issue is resolved by dropping the asm/raw_io.h include. It turns out
> > that asm/io_mm.h already includes that header file.
> >
> > Moving the relevant macro definitions helps to clarify this dependency
> > and make it safe to include asm/atarihw.h.
> >
> > The other warnings look like this:
> >
> > In file included from arch/m68k/kernel/setup_mm.c:48:0,
> >   from arch/m68k/kernel/setup.c:3:
> > ./arch/m68k/include/asm/macintosh.h:19:35: warning: 'struct irq_data' 
> > declared inside parameter list will not be visible outside of this 
> > definition or declaration
> >   extern void mac_irq_enable(struct irq_data *data);
> > ^~~~
> > ...
> >
> > This issue is resolved by adding the missing linux/irq.h include.
> >
> > Cc: Michael Schmitz 
> > Signed-off-by: Finn Thain 

>
> Looks good to me:
>
> Acked-by: Greg Ungerer 
>
> Geert: I can take this via the m68knommu tree if you like?
> Or if you want to pick it up then no problem.

If you have fixes for m68knommu for v5.3, feel free to queue it.
Else I can queue it for v5.4.

Reviewed-by: Geert Uytterhoeven 

Thanks!

Gr{oetje,eeting}s,

Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@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


Re: [PATCH] m68k: Prevent some compiler warnings in coldfire builds

2019-08-02 Thread Greg Ungerer

Hi Finn,

On 2/8/19 10:10 am, Finn Thain wrote:

Since commit d3b41b6bb49e ("m68k: Dispatch nvram_ops calls to Atari or
Mac functions"), Coldfire builds generate compiler warnings due to the
unconditional inclusion of asm/atarihw.h and asm/macintosh.h.

The inclusion of asm/atarihw.h causes warnings like this:

In file included from ./arch/m68k/include/asm/atarihw.h:25:0,
  from arch/m68k/kernel/setup_mm.c:41,
  from arch/m68k/kernel/setup.c:3:
./arch/m68k/include/asm/raw_io.h:39:0: warning: "__raw_readb" redefined
  #define __raw_readb in_8

In file included from ./arch/m68k/include/asm/io.h:6:0,
  from arch/m68k/kernel/setup_mm.c:36,
  from arch/m68k/kernel/setup.c:3:
./arch/m68k/include/asm/io_no.h:16:0: note: this is the location of the 
previous definition
  #define __raw_readb(addr) \
...

This issue is resolved by dropping the asm/raw_io.h include. It turns out
that asm/io_mm.h already includes that header file.

Moving the relevant macro definitions helps to clarify this dependency
and make it safe to include asm/atarihw.h.

The other warnings look like this:

In file included from arch/m68k/kernel/setup_mm.c:48:0,
  from arch/m68k/kernel/setup.c:3:
./arch/m68k/include/asm/macintosh.h:19:35: warning: 'struct irq_data' declared 
inside parameter list will not be visible outside of this definition or 
declaration
  extern void mac_irq_enable(struct irq_data *data);
^~~~
...

This issue is resolved by adding the missing linux/irq.h include.

Cc: Michael Schmitz 
Signed-off-by: Finn Thain 
---
  arch/m68k/include/asm/atarihw.h   | 9 -
  arch/m68k/include/asm/io_mm.h | 6 +-
  arch/m68k/include/asm/macintosh.h | 1 +
  3 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/arch/m68k/include/asm/atarihw.h b/arch/m68k/include/asm/atarihw.h
index 533008262b69..5e5601c382b8 100644
--- a/arch/m68k/include/asm/atarihw.h
+++ b/arch/m68k/include/asm/atarihw.h
@@ -22,7 +22,6 @@
  
  #include 

  #include 
-#include 
  #include 
  
  extern u_long atari_mch_cookie;

@@ -132,14 +131,6 @@ extern struct atari_hw_present atari_hw_present;
   */
  
  
-#define atari_readb   raw_inb

-#define atari_writeb  raw_outb
-
-#define atari_inb_p   raw_inb
-#define atari_outb_p  raw_outb
-
-
-
  #include 
  #include 
  
diff --git a/arch/m68k/include/asm/io_mm.h b/arch/m68k/include/asm/io_mm.h

index 6c03ca5bc436..819f611dccf2 100644
--- a/arch/m68k/include/asm/io_mm.h
+++ b/arch/m68k/include/asm/io_mm.h
@@ -29,7 +29,11 @@
  #include 
  
  #ifdef CONFIG_ATARI

-#include 
+#define atari_readb   raw_inb
+#define atari_writeb  raw_outb
+
+#define atari_inb_p   raw_inb
+#define atari_outb_p  raw_outb
  #endif
  
  
diff --git a/arch/m68k/include/asm/macintosh.h b/arch/m68k/include/asm/macintosh.h

index 8f0698bca3dc..8a43babcf53a 100644
--- a/arch/m68k/include/asm/macintosh.h
+++ b/arch/m68k/include/asm/macintosh.h
@@ -4,6 +4,7 @@
  
  #include 

  #include 
+#include 
  
  #include 
  


Looks good to me:

Acked-by: Greg Ungerer 

Geert: I can take this via the m68knommu tree if you like?
Or if you want to pick it up then no problem.

Regards
Greg




Re: [PATCH] m68k: Prevent some compiler warnings in coldfire builds

2019-08-01 Thread Finn Thain
[Cc'd to Coldfire maintainer.]

On Fri, 2 Aug 2019, Finn Thain wrote:

> Since commit d3b41b6bb49e ("m68k: Dispatch nvram_ops calls to Atari or
> Mac functions"), Coldfire builds generate compiler warnings due to the
> unconditional inclusion of asm/atarihw.h and asm/macintosh.h.
> 
> The inclusion of asm/atarihw.h causes warnings like this:
> 
> In file included from ./arch/m68k/include/asm/atarihw.h:25:0,
>  from arch/m68k/kernel/setup_mm.c:41,
>  from arch/m68k/kernel/setup.c:3:
> ./arch/m68k/include/asm/raw_io.h:39:0: warning: "__raw_readb" redefined
>  #define __raw_readb in_8
> 
> In file included from ./arch/m68k/include/asm/io.h:6:0,
>  from arch/m68k/kernel/setup_mm.c:36,
>  from arch/m68k/kernel/setup.c:3:
> ./arch/m68k/include/asm/io_no.h:16:0: note: this is the location of the 
> previous definition
>  #define __raw_readb(addr) \
> ...
> 
> This issue is resolved by dropping the asm/raw_io.h include. It turns out
> that asm/io_mm.h already includes that header file.
> 
> Moving the relevant macro definitions helps to clarify this dependency
> and make it safe to include asm/atarihw.h.
> 
> The other warnings look like this:
> 
> In file included from arch/m68k/kernel/setup_mm.c:48:0,
>  from arch/m68k/kernel/setup.c:3:
> ./arch/m68k/include/asm/macintosh.h:19:35: warning: 'struct irq_data' 
> declared inside parameter list will not be visible outside of this definition 
> or declaration
>  extern void mac_irq_enable(struct irq_data *data);
>^~~~
> ...
> 
> This issue is resolved by adding the missing linux/irq.h include.
> 
> Cc: Michael Schmitz 
> Signed-off-by: Finn Thain 
> ---
>  arch/m68k/include/asm/atarihw.h   | 9 -
>  arch/m68k/include/asm/io_mm.h | 6 +-
>  arch/m68k/include/asm/macintosh.h | 1 +
>  3 files changed, 6 insertions(+), 10 deletions(-)
> 
> diff --git a/arch/m68k/include/asm/atarihw.h b/arch/m68k/include/asm/atarihw.h
> index 533008262b69..5e5601c382b8 100644
> --- a/arch/m68k/include/asm/atarihw.h
> +++ b/arch/m68k/include/asm/atarihw.h
> @@ -22,7 +22,6 @@
>  
>  #include 
>  #include 
> -#include 
>  #include 
>  
>  extern u_long atari_mch_cookie;
> @@ -132,14 +131,6 @@ extern struct atari_hw_present atari_hw_present;
>   */
>  
>  
> -#define atari_readb   raw_inb
> -#define atari_writeb  raw_outb
> -
> -#define atari_inb_p   raw_inb
> -#define atari_outb_p  raw_outb
> -
> -
> -
>  #include 
>  #include 
>  
> diff --git a/arch/m68k/include/asm/io_mm.h b/arch/m68k/include/asm/io_mm.h
> index 6c03ca5bc436..819f611dccf2 100644
> --- a/arch/m68k/include/asm/io_mm.h
> +++ b/arch/m68k/include/asm/io_mm.h
> @@ -29,7 +29,11 @@
>  #include 
>  
>  #ifdef CONFIG_ATARI
> -#include 
> +#define atari_readb   raw_inb
> +#define atari_writeb  raw_outb
> +
> +#define atari_inb_p   raw_inb
> +#define atari_outb_p  raw_outb
>  #endif
>  
>  
> diff --git a/arch/m68k/include/asm/macintosh.h 
> b/arch/m68k/include/asm/macintosh.h
> index 8f0698bca3dc..8a43babcf53a 100644
> --- a/arch/m68k/include/asm/macintosh.h
> +++ b/arch/m68k/include/asm/macintosh.h
> @@ -4,6 +4,7 @@
>  
>  #include 
>  #include 
> +#include 
>  
>  #include 
>  
> 


[PATCH] m68k: Prevent some compiler warnings in coldfire builds

2019-08-01 Thread Finn Thain
Since commit d3b41b6bb49e ("m68k: Dispatch nvram_ops calls to Atari or
Mac functions"), Coldfire builds generate compiler warnings due to the
unconditional inclusion of asm/atarihw.h and asm/macintosh.h.

The inclusion of asm/atarihw.h causes warnings like this:

In file included from ./arch/m68k/include/asm/atarihw.h:25:0,
 from arch/m68k/kernel/setup_mm.c:41,
 from arch/m68k/kernel/setup.c:3:
./arch/m68k/include/asm/raw_io.h:39:0: warning: "__raw_readb" redefined
 #define __raw_readb in_8

In file included from ./arch/m68k/include/asm/io.h:6:0,
 from arch/m68k/kernel/setup_mm.c:36,
 from arch/m68k/kernel/setup.c:3:
./arch/m68k/include/asm/io_no.h:16:0: note: this is the location of the 
previous definition
 #define __raw_readb(addr) \
...

This issue is resolved by dropping the asm/raw_io.h include. It turns out
that asm/io_mm.h already includes that header file.

Moving the relevant macro definitions helps to clarify this dependency
and make it safe to include asm/atarihw.h.

The other warnings look like this:

In file included from arch/m68k/kernel/setup_mm.c:48:0,
 from arch/m68k/kernel/setup.c:3:
./arch/m68k/include/asm/macintosh.h:19:35: warning: 'struct irq_data' declared 
inside parameter list will not be visible outside of this definition or 
declaration
 extern void mac_irq_enable(struct irq_data *data);
   ^~~~
...

This issue is resolved by adding the missing linux/irq.h include.

Cc: Michael Schmitz 
Signed-off-by: Finn Thain 
---
 arch/m68k/include/asm/atarihw.h   | 9 -
 arch/m68k/include/asm/io_mm.h | 6 +-
 arch/m68k/include/asm/macintosh.h | 1 +
 3 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/arch/m68k/include/asm/atarihw.h b/arch/m68k/include/asm/atarihw.h
index 533008262b69..5e5601c382b8 100644
--- a/arch/m68k/include/asm/atarihw.h
+++ b/arch/m68k/include/asm/atarihw.h
@@ -22,7 +22,6 @@
 
 #include 
 #include 
-#include 
 #include 
 
 extern u_long atari_mch_cookie;
@@ -132,14 +131,6 @@ extern struct atari_hw_present atari_hw_present;
  */
 
 
-#define atari_readb   raw_inb
-#define atari_writeb  raw_outb
-
-#define atari_inb_p   raw_inb
-#define atari_outb_p  raw_outb
-
-
-
 #include 
 #include 
 
diff --git a/arch/m68k/include/asm/io_mm.h b/arch/m68k/include/asm/io_mm.h
index 6c03ca5bc436..819f611dccf2 100644
--- a/arch/m68k/include/asm/io_mm.h
+++ b/arch/m68k/include/asm/io_mm.h
@@ -29,7 +29,11 @@
 #include 
 
 #ifdef CONFIG_ATARI
-#include 
+#define atari_readb   raw_inb
+#define atari_writeb  raw_outb
+
+#define atari_inb_p   raw_inb
+#define atari_outb_p  raw_outb
 #endif
 
 
diff --git a/arch/m68k/include/asm/macintosh.h 
b/arch/m68k/include/asm/macintosh.h
index 8f0698bca3dc..8a43babcf53a 100644
--- a/arch/m68k/include/asm/macintosh.h
+++ b/arch/m68k/include/asm/macintosh.h
@@ -4,6 +4,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 
-- 
2.21.0