* [PATCH] arch: m68k: include: asm: the 3rd parameter of 'insl' and 'outsl' need '<< 2' @ 2013-05-30 9:39 Chen Gang 2013-05-30 18:52 ` Geert Uytterhoeven 0 siblings, 1 reply; 16+ messages in thread From: Chen Gang @ 2013-05-30 9:39 UTC (permalink / raw) To: Geert Uytterhoeven, gerg, schmitz, Sam Ravnborg Cc: Greg KH, linux-m68k, linux-kernel@vger.kernel.org, Linux-Arch According to the original implementation in 2009, 'insl' and 'outsl' need '<< 2'. Also add '#ifdef' to avoid multiple defination, and beautify code to pass "./scripts/checkpatch.pl" The related git number: for parport.h: "4914802 m68k,m68knommu: merge header files" in 2009 for io_mm.h: "84b16b7 m68k/atari: ROM port ISA adapter support" in Apr 6 2013 The related warning (make EXTRA_CFLAG=-W ARCH=m68k allmodconfig): arch/m68k/include/asm/parport.h:14:0: warning: "insl" redefined [enabled by default] arch/m68k/include/asm/io_mm.h:403:0: note: this is the location of the previous definition arch/m68k/include/asm/parport.h:15:0: warning: "outsl" redefined [enabled by default] arch/m68k/include/asm/io_mm.h:406:0: note: this is the location of the previous definition Signed-off-by: Chen Gang <gang.chen@asianux.com> --- arch/m68k/include/asm/io_mm.h | 5 +++-- arch/m68k/include/asm/parport.h | 9 +++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/arch/m68k/include/asm/io_mm.h b/arch/m68k/include/asm/io_mm.h index ffdf54f4..66be3b2 100644 --- a/arch/m68k/include/asm/io_mm.h +++ b/arch/m68k/include/asm/io_mm.h @@ -400,10 +400,11 @@ static inline void isa_delay(void) #define insb(port, buf, nr) ((port) < 1024 ? isa_rom_insb((port), (buf), (nr)) : isa_insb((port), (buf), (nr))) #define insw(port, buf, nr) ((port) < 1024 ? isa_rom_insw((port), (buf), (nr)) : isa_insw((port), (buf), (nr))) -#define insl isa_insl +#define insl(port, buf, len) isa_insb((port), (buf), (len) << 2) + #define outsb(port, buf, nr) ((port) < 1024 ? isa_rom_outsb((port), (buf), (nr)) : isa_outsb((port), (buf), (nr))) #define outsw(port, buf, nr) ((port) < 1024 ? isa_rom_outsw((port), (buf), (nr)) : isa_outsw((port), (buf), (nr))) -#define outsl isa_outsl +#define outsl(port, buf, len) isa_outsb((port), (buf), (len) << 2) #define readb(addr) in_8(addr) #define writeb(val, addr) out_8((addr), (val)) diff --git a/arch/m68k/include/asm/parport.h b/arch/m68k/include/asm/parport.h index 5ea75e6..e8e4a2a 100644 --- a/arch/m68k/include/asm/parport.h +++ b/arch/m68k/include/asm/parport.h @@ -11,8 +11,13 @@ #ifndef _ASM_M68K_PARPORT_H #define _ASM_M68K_PARPORT_H 1 -#define insl(port,buf,len) isa_insb(port,buf,(len)<<2) -#define outsl(port,buf,len) isa_outsb(port,buf,(len)<<2) +#ifndef insl +#define insl(port, buf, len) isa_insb((port), (buf), (len) << 2) +#endif + +#ifndef outsl +#define outsl(port, buf, len) isa_outsb((port), (buf), (len) << 2) +#endif /* no dma, or IRQ autoprobing */ static int parport_pc_find_isa_ports (int autoirq, int autodma); -- 1.7.7.6 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH] arch: m68k: include: asm: the 3rd parameter of 'insl' and 'outsl' need '<< 2' 2013-05-30 9:39 [PATCH] arch: m68k: include: asm: the 3rd parameter of 'insl' and 'outsl' need '<< 2' Chen Gang @ 2013-05-30 18:52 ` Geert Uytterhoeven 2013-06-01 0:26 ` schmitz 0 siblings, 1 reply; 16+ messages in thread From: Geert Uytterhoeven @ 2013-05-30 18:52 UTC (permalink / raw) To: Chen Gang Cc: Greg Ungerer, schmitz, Sam Ravnborg, Greg KH, linux-m68k, linux-kernel@vger.kernel.org, Linux-Arch On Thu, May 30, 2013 at 11:39 AM, Chen Gang <gang.chen@asianux.com> wrote: > According to the original implementation in 2009, 'insl' and 'outsl' > need '<< 2'. Sorry, now I'm confused. Which original implementation? I can't find this one using "<< 2"? > Also add '#ifdef' to avoid multiple defination, and beautify code to > pass "./scripts/checkpatch.pl" > > The related git number: > for parport.h: "4914802 m68k,m68knommu: merge header files" in 2009 > for io_mm.h: "84b16b7 m68k/atari: ROM port ISA adapter support" in Apr 6 2013 > > The related warning (make EXTRA_CFLAG=-W ARCH=m68k allmodconfig): > arch/m68k/include/asm/parport.h:14:0: warning: "insl" redefined [enabled by default] > arch/m68k/include/asm/io_mm.h:403:0: note: this is the location of the previous definition > arch/m68k/include/asm/parport.h:15:0: warning: "outsl" redefined [enabled by default] > arch/m68k/include/asm/io_mm.h:406:0: note: this is the location of the previous definition > > > Signed-off-by: Chen Gang <gang.chen@asianux.com> > --- > arch/m68k/include/asm/io_mm.h | 5 +++-- > arch/m68k/include/asm/parport.h | 9 +++++++-- > 2 files changed, 10 insertions(+), 4 deletions(-) > > diff --git a/arch/m68k/include/asm/io_mm.h b/arch/m68k/include/asm/io_mm.h > index ffdf54f4..66be3b2 100644 > --- a/arch/m68k/include/asm/io_mm.h > +++ b/arch/m68k/include/asm/io_mm.h > @@ -400,10 +400,11 @@ static inline void isa_delay(void) > > #define insb(port, buf, nr) ((port) < 1024 ? isa_rom_insb((port), (buf), (nr)) : isa_insb((port), (buf), (nr))) > #define insw(port, buf, nr) ((port) < 1024 ? isa_rom_insw((port), (buf), (nr)) : isa_insw((port), (buf), (nr))) > -#define insl isa_insl > +#define insl(port, buf, len) isa_insb((port), (buf), (len) << 2) Oops, changes from 32-bit accesses to byte accesses? > #define outsb(port, buf, nr) ((port) < 1024 ? isa_rom_outsb((port), (buf), (nr)) : isa_outsb((port), (buf), (nr))) > #define outsw(port, buf, nr) ((port) < 1024 ? isa_rom_outsw((port), (buf), (nr)) : isa_outsw((port), (buf), (nr))) > -#define outsl isa_outsl > +#define outsl(port, buf, len) isa_outsb((port), (buf), (len) << 2) > > #define readb(addr) in_8(addr) > #define writeb(val, addr) out_8((addr), (val)) > diff --git a/arch/m68k/include/asm/parport.h b/arch/m68k/include/asm/parport.h > index 5ea75e6..e8e4a2a 100644 > --- a/arch/m68k/include/asm/parport.h > +++ b/arch/m68k/include/asm/parport.h > @@ -11,8 +11,13 @@ > #ifndef _ASM_M68K_PARPORT_H > #define _ASM_M68K_PARPORT_H 1 > > -#define insl(port,buf,len) isa_insb(port,buf,(len)<<2) > -#define outsl(port,buf,len) isa_outsb(port,buf,(len)<<2) > +#ifndef insl > +#define insl(port, buf, len) isa_insb((port), (buf), (len) << 2) > +#endif > + > +#ifndef outsl > +#define outsl(port, buf, len) isa_outsb((port), (buf), (len) << 2) > +#endif Now the (re)definitions are identical to the originals, so they can just be removed. But the ones in <asm/io.h> are not correct anymore, IMHO. 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] 16+ messages in thread
* Re: [PATCH] arch: m68k: include: asm: the 3rd parameter of 'insl' and 'outsl' need '<< 2' 2013-05-30 18:52 ` Geert Uytterhoeven @ 2013-06-01 0:26 ` schmitz 2013-06-01 0:38 ` schmitz 0 siblings, 1 reply; 16+ messages in thread From: schmitz @ 2013-06-01 0:26 UTC (permalink / raw) To: Geert Uytterhoeven Cc: Chen Gang, Greg Ungerer, schmitz, Sam Ravnborg, Greg KH, linux-m68k, linux-kernel@vger.kernel.org, Linux-Arch Geert , >> >> The related git number: >> for parport.h: "4914802 m68k,m68knommu: merge header files" in 2009 >> for io_mm.h: "84b16b7 m68k/atari: ROM port ISA adapter support" in Apr 6 2013 >> >> The related warning (make EXTRA_CFLAG=-W ARCH=m68k allmodconfig): >> arch/m68k/include/asm/parport.h:14:0: warning: "insl" redefined [enabled by default] >> arch/m68k/include/asm/io_mm.h:403:0: note: this is the location of the previous definition >> arch/m68k/include/asm/parport.h:15:0: warning: "outsl" redefined [enabled by default] >> arch/m68k/include/asm/io_mm.h:406:0: note: this is the location of the previous definition >> Is that the same problem Thorsten reported recently? parport.h should either use what the arch io.h include defined, or (in the case of Q40 on m68k) undef and redefine as needed. >> >> Signed-off-by: Chen Gang <gang.chen@asianux.com> >> --- >> arch/m68k/include/asm/io_mm.h | 5 +++-- >> arch/m68k/include/asm/parport.h | 9 +++++++-- >> 2 files changed, 10 insertions(+), 4 deletions(-) >> >> diff --git a/arch/m68k/include/asm/io_mm.h b/arch/m68k/include/asm/io_mm.h >> index ffdf54f4..66be3b2 100644 >> --- a/arch/m68k/include/asm/io_mm.h >> +++ b/arch/m68k/include/asm/io_mm.h >> @@ -400,10 +400,11 @@ static inline void isa_delay(void) >> >> #define insb(port, buf, nr) ((port) < 1024 ? isa_rom_insb((port), (buf), (nr)) : isa_insb((port), (buf), (nr))) >> #define insw(port, buf, nr) ((port) < 1024 ? isa_rom_insw((port), (buf), (nr)) : isa_insw((port), (buf), (nr))) >> -#define insl isa_insl >> +#define insl(port, buf, len) isa_insb((port), (buf), (len) << 2) >> > > Oops, changes from 32-bit accesses to byte accesses? > That's in the Atari specific branch - please explain why you think this needs to be done. Has this patch been tested by running on ARAnyM, at least? Unless this has been properly tested on Atari (hardware), please leave as-is. > >> #define outsb(port, buf, nr) ((port) < 1024 ? isa_rom_outsb((port), (buf), (nr)) : isa_outsb((port), (buf), (nr))) >> #define outsw(port, buf, nr) ((port) < 1024 ? isa_rom_outsw((port), (buf), (nr)) : isa_outsw((port), (buf), (nr))) >> -#define outsl isa_outsl >> +#define outsl(port, buf, len) isa_outsb((port), (buf), (len) << 2) >> >> #define readb(addr) in_8(addr) >> #define writeb(val, addr) out_8((addr), (val)) >> diff --git a/arch/m68k/include/asm/parport.h b/arch/m68k/include/asm/parport.h >> index 5ea75e6..e8e4a2a 100644 >> --- a/arch/m68k/include/asm/parport.h >> +++ b/arch/m68k/include/asm/parport.h >> @@ -11,8 +11,13 @@ >> #ifndef _ASM_M68K_PARPORT_H >> #define _ASM_M68K_PARPORT_H 1 >> >> -#define insl(port,buf,len) isa_insb(port,buf,(len)<<2) >> -#define outsl(port,buf,len) isa_outsb(port,buf,(len)<<2) >> +#ifndef insl >> +#define insl(port, buf, len) isa_insb((port), (buf), (len) << 2) >> +#endif >> + >> +#ifndef outsl >> +#define outsl(port, buf, len) isa_outsb((port), (buf), (len) << 2) >> +#endif >> I think that should read #undef insl #define insl(port,buf,len) isa_insb(port,buf,(len)<<2) instead. I distinctly remember this brought up a few weeks ago. > Now the (re)definitions are identical to the originals, so they can just > be removed. But the ones in <asm/io.h> are not correct anymore, IMHO. > Seconded. Cheers, Michael ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] arch: m68k: include: asm: the 3rd parameter of 'insl' and 'outsl' need '<< 2' 2013-06-01 0:26 ` schmitz @ 2013-06-01 0:38 ` schmitz 2013-06-01 0:38 ` schmitz 2013-06-03 9:40 ` Chen Gang 0 siblings, 2 replies; 16+ messages in thread From: schmitz @ 2013-06-01 0:38 UTC (permalink / raw) To: Geert Uytterhoeven Cc: Chen Gang, Greg Ungerer, schmitz, Sam Ravnborg, Greg KH, linux-m68k, linux-kernel@vger.kernel.org, Linux-Arch All, > Geert , >>> >>> The related git number: >>> for parport.h: "4914802 m68k,m68knommu: merge header files" in 2009 >>> for io_mm.h: "84b16b7 m68k/atari: ROM port ISA adapter support" in >>> Apr 6 2013 >>> >>> The related warning (make EXTRA_CFLAG=-W ARCH=m68k allmodconfig): >>> arch/m68k/include/asm/parport.h:14:0: warning: "insl" redefined >>> [enabled by default] >>> arch/m68k/include/asm/io_mm.h:403:0: note: this is the location of >>> the previous definition >>> arch/m68k/include/asm/parport.h:15:0: warning: "outsl" redefined >>> [enabled by default] >>> arch/m68k/include/asm/io_mm.h:406:0: note: this is the location of >>> the previous definition >>> > Is that the same problem Thorsten reported recently? parport.h should > either use what the arch io.h include defined, or (in the case of Q40 > on m68k) undef and redefine as needed. It appears this is the same issue, see message ID loom.20130511T171757-995@post.gmane.org to linux-m68k (May 12th, by Thorsten Glaser). This _only_ applies to use of insl/outsl macros in parport_pc.h, which is only used by Q40 on m68k. I see no reason to change anything in io.h to cope with this warning. Cheers, Michael >>> >>> Signed-off-by: Chen Gang <gang.chen@asianux.com> >>> --- >>> arch/m68k/include/asm/io_mm.h | 5 +++-- >>> arch/m68k/include/asm/parport.h | 9 +++++++-- >>> 2 files changed, 10 insertions(+), 4 deletions(-) >>> >>> diff --git a/arch/m68k/include/asm/io_mm.h >>> b/arch/m68k/include/asm/io_mm.h >>> index ffdf54f4..66be3b2 100644 >>> --- a/arch/m68k/include/asm/io_mm.h >>> +++ b/arch/m68k/include/asm/io_mm.h >>> @@ -400,10 +400,11 @@ static inline void isa_delay(void) >>> >>> #define insb(port, buf, nr) ((port) < 1024 ? >>> isa_rom_insb((port), (buf), (nr)) : isa_insb((port), (buf), (nr))) >>> #define insw(port, buf, nr) ((port) < 1024 ? >>> isa_rom_insw((port), (buf), (nr)) : isa_insw((port), (buf), (nr))) >>> -#define insl isa_insl >>> +#define insl(port, buf, len) isa_insb((port), (buf), (len) << 2) >>> >> >> Oops, changes from 32-bit accesses to byte accesses? >> > > That's in the Atari specific branch - please explain why you think > this needs to be done. Has this patch been tested by running on > ARAnyM, at least? > > Unless this has been properly tested on Atari (hardware), please > leave as-is. > >> >>> #define outsb(port, buf, nr) ((port) < 1024 ? >>> isa_rom_outsb((port), (buf), (nr)) : isa_outsb((port), (buf), (nr))) >>> #define outsw(port, buf, nr) ((port) < 1024 ? >>> isa_rom_outsw((port), (buf), (nr)) : isa_outsw((port), (buf), (nr))) >>> -#define outsl isa_outsl >>> +#define outsl(port, buf, len) isa_outsb((port), (buf), (len) << 2) >>> >>> #define readb(addr) in_8(addr) >>> #define writeb(val, addr) out_8((addr), (val)) >>> diff --git a/arch/m68k/include/asm/parport.h >>> b/arch/m68k/include/asm/parport.h >>> index 5ea75e6..e8e4a2a 100644 >>> --- a/arch/m68k/include/asm/parport.h >>> +++ b/arch/m68k/include/asm/parport.h >>> @@ -11,8 +11,13 @@ >>> #ifndef _ASM_M68K_PARPORT_H >>> #define _ASM_M68K_PARPORT_H 1 >>> >>> -#define insl(port,buf,len) isa_insb(port,buf,(len)<<2) >>> -#define outsl(port,buf,len) isa_outsb(port,buf,(len)<<2) >>> +#ifndef insl >>> +#define insl(port, buf, len) isa_insb((port), (buf), (len) << 2) >>> +#endif >>> + >>> +#ifndef outsl >>> +#define outsl(port, buf, len) isa_outsb((port), (buf), (len) << 2) >>> +#endif >>> > I think that should read > #undef insl > #define insl(port,buf,len) isa_insb(port,buf,(len)<<2) > > instead. I distinctly remember this brought up a few weeks ago. >> Now the (re)definitions are identical to the originals, so they can just >> be removed. But the ones in <asm/io.h> are not correct anymore, IMHO. >> > Seconded. > > Cheers, > > Michael > > > -- > To unsubscribe from this list: send the line "unsubscribe linux-m68k" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] arch: m68k: include: asm: the 3rd parameter of 'insl' and 'outsl' need '<< 2' 2013-06-01 0:38 ` schmitz @ 2013-06-01 0:38 ` schmitz 2013-06-03 9:40 ` Chen Gang 1 sibling, 0 replies; 16+ messages in thread From: schmitz @ 2013-06-01 0:38 UTC (permalink / raw) To: Geert Uytterhoeven Cc: Chen Gang, Greg Ungerer, schmitz, Sam Ravnborg, Greg KH, linux-m68k, linux-kernel@vger.kernel.org, Linux-Arch All, > Geert , >>> >>> The related git number: >>> for parport.h: "4914802 m68k,m68knommu: merge header files" in 2009 >>> for io_mm.h: "84b16b7 m68k/atari: ROM port ISA adapter support" in >>> Apr 6 2013 >>> >>> The related warning (make EXTRA_CFLAG=-W ARCH=m68k allmodconfig): >>> arch/m68k/include/asm/parport.h:14:0: warning: "insl" redefined >>> [enabled by default] >>> arch/m68k/include/asm/io_mm.h:403:0: note: this is the location of >>> the previous definition >>> arch/m68k/include/asm/parport.h:15:0: warning: "outsl" redefined >>> [enabled by default] >>> arch/m68k/include/asm/io_mm.h:406:0: note: this is the location of >>> the previous definition >>> > Is that the same problem Thorsten reported recently? parport.h should > either use what the arch io.h include defined, or (in the case of Q40 > on m68k) undef and redefine as needed. It appears this is the same issue, see message ID loom.20130511T171757-995@post.gmane.org to linux-m68k (May 12th, by Thorsten Glaser). This _only_ applies to use of insl/outsl macros in parport_pc.h, which is only used by Q40 on m68k. I see no reason to change anything in io.h to cope with this warning. Cheers, Michael >>> >>> Signed-off-by: Chen Gang <gang.chen@asianux.com> >>> --- >>> arch/m68k/include/asm/io_mm.h | 5 +++-- >>> arch/m68k/include/asm/parport.h | 9 +++++++-- >>> 2 files changed, 10 insertions(+), 4 deletions(-) >>> >>> diff --git a/arch/m68k/include/asm/io_mm.h >>> b/arch/m68k/include/asm/io_mm.h >>> index ffdf54f4..66be3b2 100644 >>> --- a/arch/m68k/include/asm/io_mm.h >>> +++ b/arch/m68k/include/asm/io_mm.h >>> @@ -400,10 +400,11 @@ static inline void isa_delay(void) >>> >>> #define insb(port, buf, nr) ((port) < 1024 ? >>> isa_rom_insb((port), (buf), (nr)) : isa_insb((port), (buf), (nr))) >>> #define insw(port, buf, nr) ((port) < 1024 ? >>> isa_rom_insw((port), (buf), (nr)) : isa_insw((port), (buf), (nr))) >>> -#define insl isa_insl >>> +#define insl(port, buf, len) isa_insb((port), (buf), (len) << 2) >>> >> >> Oops, changes from 32-bit accesses to byte accesses? >> > > That's in the Atari specific branch - please explain why you think > this needs to be done. Has this patch been tested by running on > ARAnyM, at least? > > Unless this has been properly tested on Atari (hardware), please > leave as-is. > >> >>> #define outsb(port, buf, nr) ((port) < 1024 ? >>> isa_rom_outsb((port), (buf), (nr)) : isa_outsb((port), (buf), (nr))) >>> #define outsw(port, buf, nr) ((port) < 1024 ? >>> isa_rom_outsw((port), (buf), (nr)) : isa_outsw((port), (buf), (nr))) >>> -#define outsl isa_outsl >>> +#define outsl(port, buf, len) isa_outsb((port), (buf), (len) << 2) >>> >>> #define readb(addr) in_8(addr) >>> #define writeb(val, addr) out_8((addr), (val)) >>> diff --git a/arch/m68k/include/asm/parport.h >>> b/arch/m68k/include/asm/parport.h >>> index 5ea75e6..e8e4a2a 100644 >>> --- a/arch/m68k/include/asm/parport.h >>> +++ b/arch/m68k/include/asm/parport.h >>> @@ -11,8 +11,13 @@ >>> #ifndef _ASM_M68K_PARPORT_H >>> #define _ASM_M68K_PARPORT_H 1 >>> >>> -#define insl(port,buf,len) isa_insb(port,buf,(len)<<2) >>> -#define outsl(port,buf,len) isa_outsb(port,buf,(len)<<2) >>> +#ifndef insl >>> +#define insl(port, buf, len) isa_insb((port), (buf), (len) << 2) >>> +#endif >>> + >>> +#ifndef outsl >>> +#define outsl(port, buf, len) isa_outsb((port), (buf), (len) << 2) >>> +#endif >>> > I think that should read > #undef insl > #define insl(port,buf,len) isa_insb(port,buf,(len)<<2) > > instead. I distinctly remember this brought up a few weeks ago. >> Now the (re)definitions are identical to the originals, so they can just >> be removed. But the ones in <asm/io.h> are not correct anymore, IMHO. >> > Seconded. > > Cheers, > > Michael > > > -- > To unsubscribe from this list: send the line "unsubscribe linux-m68k" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] arch: m68k: include: asm: the 3rd parameter of 'insl' and 'outsl' need '<< 2' 2013-06-01 0:38 ` schmitz 2013-06-01 0:38 ` schmitz @ 2013-06-03 9:40 ` Chen Gang 2013-06-03 10:48 ` Geert Uytterhoeven 1 sibling, 1 reply; 16+ messages in thread From: Chen Gang @ 2013-06-03 9:40 UTC (permalink / raw) To: schmitz Cc: Geert Uytterhoeven, Greg Ungerer, schmitz, Sam Ravnborg, Greg KH, linux-m68k, linux-kernel@vger.kernel.org, Linux-Arch On 06/01/2013 08:38 AM, schmitz wrote: > All, >> Geert , >>>> >>>> The related git number: >>>> for parport.h: "4914802 m68k,m68knommu: merge header files" in 2009 >>>> for io_mm.h: "84b16b7 m68k/atari: ROM port ISA adapter support" in >>>> Apr 6 2013 >>>> >>>> The related warning (make EXTRA_CFLAG=-W ARCH=m68k allmodconfig): >>>> arch/m68k/include/asm/parport.h:14:0: warning: "insl" redefined >>>> [enabled by default] >>>> arch/m68k/include/asm/io_mm.h:403:0: note: this is the location of >>>> the previous definition >>>> arch/m68k/include/asm/parport.h:15:0: warning: "outsl" redefined >>>> [enabled by default] >>>> arch/m68k/include/asm/io_mm.h:406:0: note: this is the location of >>>> the previous definition >>>> >> Is that the same problem Thorsten reported recently? parport.h should >> either use what the arch io.h include defined, or (in the case of Q40 >> on m68k) undef and redefine as needed. > It appears this is the same issue, see message ID > loom.20130511T171757-995@post.gmane.org to linux-m68k (May 12th, by > Thorsten Glaser). > > This _only_ applies to use of insl/outsl macros in parport_pc.h, which > is only used by Q40 on m68k. I see no reason to change anything in io.h > to cope with this warning. It sounds reasonable. And excuse me, could you provide the related link directly ? I don't know how to see the detail of 'loom.20130511T171757-995@post.gmane.org'. Thanks. -- Chen Gang Asianux Corporation ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] arch: m68k: include: asm: the 3rd parameter of 'insl' and 'outsl' need '<< 2' 2013-06-03 9:40 ` Chen Gang @ 2013-06-03 10:48 ` Geert Uytterhoeven 2013-06-03 10:48 ` Geert Uytterhoeven 2013-06-05 0:35 ` Chen Gang 0 siblings, 2 replies; 16+ messages in thread From: Geert Uytterhoeven @ 2013-06-03 10:48 UTC (permalink / raw) To: Chen Gang Cc: schmitz, Greg Ungerer, schmitz, Sam Ravnborg, Greg KH, linux-m68k, linux-kernel@vger.kernel.org, Linux-Arch On Mon, Jun 3, 2013 at 11:40 AM, Chen Gang <gang.chen@asianux.com> wrote: > On 06/01/2013 08:38 AM, schmitz wrote: >>>>> The related git number: >>>>> for parport.h: "4914802 m68k,m68knommu: merge header files" in 2009 >>>>> for io_mm.h: "84b16b7 m68k/atari: ROM port ISA adapter support" in >>>>> Apr 6 2013 >>>>> >>>>> The related warning (make EXTRA_CFLAG=-W ARCH=m68k allmodconfig): >>>>> arch/m68k/include/asm/parport.h:14:0: warning: "insl" redefined >>>>> [enabled by default] >>>>> arch/m68k/include/asm/io_mm.h:403:0: note: this is the location of >>>>> the previous definition >>>>> arch/m68k/include/asm/parport.h:15:0: warning: "outsl" redefined >>>>> [enabled by default] >>>>> arch/m68k/include/asm/io_mm.h:406:0: note: this is the location of >>>>> the previous definition >>>>> >>> Is that the same problem Thorsten reported recently? parport.h should >>> either use what the arch io.h include defined, or (in the case of Q40 >>> on m68k) undef and redefine as needed. >> It appears this is the same issue, see message ID >> loom.20130511T171757-995@post.gmane.org to linux-m68k (May 12th, by >> Thorsten Glaser). >> >> This _only_ applies to use of insl/outsl macros in parport_pc.h, which >> is only used by Q40 on m68k. I see no reason to change anything in io.h >> to cope with this warning. > > It sounds reasonable. > > And excuse me, could you provide the related link directly ? I don't > know how to see the detail of 'loom.20130511T171757-995@post.gmane.org'. http://www.spinics.net/lists/linux-m68k/msg06041.html 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] 16+ messages in thread
* Re: [PATCH] arch: m68k: include: asm: the 3rd parameter of 'insl' and 'outsl' need '<< 2' 2013-06-03 10:48 ` Geert Uytterhoeven @ 2013-06-03 10:48 ` Geert Uytterhoeven 2013-06-05 0:35 ` Chen Gang 1 sibling, 0 replies; 16+ messages in thread From: Geert Uytterhoeven @ 2013-06-03 10:48 UTC (permalink / raw) To: Chen Gang Cc: schmitz, Greg Ungerer, schmitz, Sam Ravnborg, Greg KH, linux-m68k, linux-kernel@vger.kernel.org, Linux-Arch On Mon, Jun 3, 2013 at 11:40 AM, Chen Gang <gang.chen@asianux.com> wrote: > On 06/01/2013 08:38 AM, schmitz wrote: >>>>> The related git number: >>>>> for parport.h: "4914802 m68k,m68knommu: merge header files" in 2009 >>>>> for io_mm.h: "84b16b7 m68k/atari: ROM port ISA adapter support" in >>>>> Apr 6 2013 >>>>> >>>>> The related warning (make EXTRA_CFLAG=-W ARCH=m68k allmodconfig): >>>>> arch/m68k/include/asm/parport.h:14:0: warning: "insl" redefined >>>>> [enabled by default] >>>>> arch/m68k/include/asm/io_mm.h:403:0: note: this is the location of >>>>> the previous definition >>>>> arch/m68k/include/asm/parport.h:15:0: warning: "outsl" redefined >>>>> [enabled by default] >>>>> arch/m68k/include/asm/io_mm.h:406:0: note: this is the location of >>>>> the previous definition >>>>> >>> Is that the same problem Thorsten reported recently? parport.h should >>> either use what the arch io.h include defined, or (in the case of Q40 >>> on m68k) undef and redefine as needed. >> It appears this is the same issue, see message ID >> loom.20130511T171757-995@post.gmane.org to linux-m68k (May 12th, by >> Thorsten Glaser). >> >> This _only_ applies to use of insl/outsl macros in parport_pc.h, which >> is only used by Q40 on m68k. I see no reason to change anything in io.h >> to cope with this warning. > > It sounds reasonable. > > And excuse me, could you provide the related link directly ? I don't > know how to see the detail of 'loom.20130511T171757-995@post.gmane.org'. http://www.spinics.net/lists/linux-m68k/msg06041.html 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] 16+ messages in thread
* Re: [PATCH] arch: m68k: include: asm: the 3rd parameter of 'insl' and 'outsl' need '<< 2' 2013-06-03 10:48 ` Geert Uytterhoeven 2013-06-03 10:48 ` Geert Uytterhoeven @ 2013-06-05 0:35 ` Chen Gang 2013-06-05 0:35 ` Chen Gang 2013-06-05 7:24 ` schmitz 1 sibling, 2 replies; 16+ messages in thread From: Chen Gang @ 2013-06-05 0:35 UTC (permalink / raw) To: Geert Uytterhoeven Cc: schmitz, Greg Ungerer, schmitz, Sam Ravnborg, Greg KH, linux-m68k, linux-kernel@vger.kernel.org, Linux-Arch On 06/03/2013 06:48 PM, Geert Uytterhoeven wrote: >>> >> This _only_ applies to use of insl/outsl macros in parport_pc.h, which >>> >> is only used by Q40 on m68k. I see no reason to change anything in io.h >>> >> to cope with this warning. I guess your meaning is : ----------------------------diff begin---------------------------------- diff --git a/arch/m68k/include/asm/parport.h b/arch/m68k/include/asm/parport.h index 5ea75e6..dd1672a 100644 --- a/arch/m68k/include/asm/parport.h +++ b/arch/m68k/include/asm/parport.h @@ -11,9 +11,20 @@ #ifndef _ASM_M68K_PARPORT_H #define _ASM_M68K_PARPORT_H 1 +#ifdef CONFIG_Q40 /* for Q40, need redefine insl/outsl */ + +#ifdef insl +#undef insl +#endif #define insl(port,buf,len) isa_insb(port,buf,(len)<<2) + +#ifdef outsl +#undef outsl +#endif #define outsl(port,buf,len) isa_outsb(port,buf,(len)<<2) +#endif /* CONFIG_Q40 */ + /* no dma, or IRQ autoprobing */ static int parport_pc_find_isa_ports (int autoirq, int autodma); static int parport_pc_find_nonpci_ports (int autoirq, int autodma) ----------------------------diff end------------------------------------ >> > >> > It sounds reasonable. >> > >> > And excuse me, could you provide the related link directly ? I don't >> > know how to see the detail of 'loom.20130511T171757-995@post.gmane.org'. > http://www.spinics.net/lists/linux-m68k/msg06041.html OK, thanks. And sorry for replying late (during these days, I have to do another things, and almost can not connect net). It seems already has another related patch for it, and it is just applying. So need I send it again ? Thanks. -- Chen Gang Asianux Corporation ^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH] arch: m68k: include: asm: the 3rd parameter of 'insl' and 'outsl' need '<< 2' 2013-06-05 0:35 ` Chen Gang @ 2013-06-05 0:35 ` Chen Gang 2013-06-05 7:24 ` schmitz 1 sibling, 0 replies; 16+ messages in thread From: Chen Gang @ 2013-06-05 0:35 UTC (permalink / raw) To: Geert Uytterhoeven Cc: schmitz, Greg Ungerer, schmitz, Sam Ravnborg, Greg KH, linux-m68k, linux-kernel@vger.kernel.org, Linux-Arch On 06/03/2013 06:48 PM, Geert Uytterhoeven wrote: >>> >> This _only_ applies to use of insl/outsl macros in parport_pc.h, which >>> >> is only used by Q40 on m68k. I see no reason to change anything in io.h >>> >> to cope with this warning. I guess your meaning is : ----------------------------diff begin---------------------------------- diff --git a/arch/m68k/include/asm/parport.h b/arch/m68k/include/asm/parport.h index 5ea75e6..dd1672a 100644 --- a/arch/m68k/include/asm/parport.h +++ b/arch/m68k/include/asm/parport.h @@ -11,9 +11,20 @@ #ifndef _ASM_M68K_PARPORT_H #define _ASM_M68K_PARPORT_H 1 +#ifdef CONFIG_Q40 /* for Q40, need redefine insl/outsl */ + +#ifdef insl +#undef insl +#endif #define insl(port,buf,len) isa_insb(port,buf,(len)<<2) + +#ifdef outsl +#undef outsl +#endif #define outsl(port,buf,len) isa_outsb(port,buf,(len)<<2) +#endif /* CONFIG_Q40 */ + /* no dma, or IRQ autoprobing */ static int parport_pc_find_isa_ports (int autoirq, int autodma); static int parport_pc_find_nonpci_ports (int autoirq, int autodma) ----------------------------diff end------------------------------------ >> > >> > It sounds reasonable. >> > >> > And excuse me, could you provide the related link directly ? I don't >> > know how to see the detail of 'loom.20130511T171757-995@post.gmane.org'. > http://www.spinics.net/lists/linux-m68k/msg06041.html OK, thanks. And sorry for replying late (during these days, I have to do another things, and almost can not connect net). It seems already has another related patch for it, and it is just applying. So need I send it again ? Thanks. -- Chen Gang Asianux Corporation ^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH] arch: m68k: include: asm: the 3rd parameter of 'insl' and 'outsl' need '<< 2' 2013-06-05 0:35 ` Chen Gang 2013-06-05 0:35 ` Chen Gang @ 2013-06-05 7:24 ` schmitz 2013-06-06 8:38 ` Chen Gang 2013-06-06 11:52 ` Thorsten Glaser 1 sibling, 2 replies; 16+ messages in thread From: schmitz @ 2013-06-05 7:24 UTC (permalink / raw) To: Chen Gang Cc: Geert Uytterhoeven, Greg Ungerer, schmitz, Sam Ravnborg, Greg KH, linux-m68k, linux-kernel@vger.kernel.org, Linux-Arch, Thorsten Glaser Chen, > On 06/03/2013 06:48 PM, Geert Uytterhoeven wrote: > >>>>>> This _only_ applies to use of insl/outsl macros in parport_pc.h, which >>>>>> is only used by Q40 on m68k. I see no reason to change anything in io.h >>>>>> to cope with this warning. >>>>>> > > I guess your meaning is : > > ----------------------------diff begin---------------------------------- > > diff --git a/arch/m68k/include/asm/parport.h b/arch/m68k/include/asm/parport.h > index 5ea75e6..dd1672a 100644 > --- a/arch/m68k/include/asm/parport.h > +++ b/arch/m68k/include/asm/parport.h > @@ -11,9 +11,20 @@ > #ifndef _ASM_M68K_PARPORT_H > #define _ASM_M68K_PARPORT_H 1 > > +#ifdef CONFIG_Q40 /* for Q40, need redefine insl/outsl */ > + > +#ifdef insl > +#undef insl > +#endif > #define insl(port,buf,len) isa_insb(port,buf,(len)<<2) > + > +#ifdef outsl > +#undef outsl > +#endif > #define outsl(port,buf,len) isa_outsb(port,buf,(len)<<2) > > +#endif /* CONFIG_Q40 */ > + > /* no dma, or IRQ autoprobing */ > static int parport_pc_find_isa_ports (int autoirq, int autodma); > static int parport_pc_find_nonpci_ports (int autoirq, int autodma) > > ----------------------------diff end------------------------------------ > No need for the #ifdef CONFIG_Q40 - Q40 is the only m68k subarch that builds the parport_pc module (which includes parport.h), IIRC. Is that correct, Thorsten? >>>> It sounds reasonable. >>>> >>>> And excuse me, could you provide the related link directly ? I don't >>>> know how to see the detail of 'loom.20130511T171757-995@post.gmane.org'. >>>> >> http://www.spinics.net/lists/linux-m68k/msg06041.html >> > > OK, thanks. And sorry for replying late (during these days, I have to > do another things, and almost can not connect net). > > Thanks indeed for the link, Geert. I haven't yet had time to test whether the io.h patch would interfere with Atari IDE or other drivers's use of these macros - maybe this weekend. > It seems already has another related patch for it, and it is just > applying. > > So need I send it again ? > > I think Thorsten submitted a patch to that effect? If so, yours should not be necessary. Regards, Michael ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] arch: m68k: include: asm: the 3rd parameter of 'insl' and 'outsl' need '<< 2' 2013-06-05 7:24 ` schmitz @ 2013-06-06 8:38 ` Chen Gang 2013-06-06 8:38 ` Chen Gang 2013-06-06 11:52 ` Thorsten Glaser 1 sibling, 1 reply; 16+ messages in thread From: Chen Gang @ 2013-06-06 8:38 UTC (permalink / raw) To: schmitz Cc: Geert Uytterhoeven, Greg Ungerer, schmitz, Sam Ravnborg, Greg KH, linux-m68k, linux-kernel@vger.kernel.org, Linux-Arch, Thorsten Glaser On 06/05/2013 03:24 PM, schmitz wrote: >> It seems already has another related patch for it, and it is just >> applying. >> >> So need I send it again ? >> >> > I think Thorsten submitted a patch to that effect? If so, yours should > not be necessary. OK, thanks. And also thank Geert. -- Chen Gang Asianux Corporation ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] arch: m68k: include: asm: the 3rd parameter of 'insl' and 'outsl' need '<< 2' 2013-06-06 8:38 ` Chen Gang @ 2013-06-06 8:38 ` Chen Gang 0 siblings, 0 replies; 16+ messages in thread From: Chen Gang @ 2013-06-06 8:38 UTC (permalink / raw) To: schmitz Cc: Geert Uytterhoeven, Greg Ungerer, schmitz, Sam Ravnborg, Greg KH, linux-m68k, linux-kernel@vger.kernel.org, Linux-Arch, Thorsten Glaser On 06/05/2013 03:24 PM, schmitz wrote: >> It seems already has another related patch for it, and it is just >> applying. >> >> So need I send it again ? >> >> > I think Thorsten submitted a patch to that effect? If so, yours should > not be necessary. OK, thanks. And also thank Geert. -- Chen Gang Asianux Corporation ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] arch: m68k: include: asm: the 3rd parameter of 'insl' and 'outsl' need '<< 2' 2013-06-05 7:24 ` schmitz 2013-06-06 8:38 ` Chen Gang @ 2013-06-06 11:52 ` Thorsten Glaser 2013-06-06 11:52 ` Thorsten Glaser 2013-06-06 22:47 ` Michael Schmitz 1 sibling, 2 replies; 16+ messages in thread From: Thorsten Glaser @ 2013-06-06 11:52 UTC (permalink / raw) To: schmitz Cc: Chen Gang, Geert Uytterhoeven, Greg Ungerer, schmitz, Sam Ravnborg, Greg KH, linux-m68k, linux-kernel@vger.kernel.org, Linux-Arch schmitz dixit: > No need for the #ifdef CONFIG_Q40 - Q40 is the only m68k subarch that builds > the parport_pc module (which includes parport.h), IIRC. Is that correct, > Thorsten? The header is included outside of Q40. There is no Q40 kernel in Debian (yet). So, no. bye, //mirabilos -- 17:08⎜«Vutral» früher gabs keine packenden smartphones und so 17:08⎜«Vutral» heute gibts frauen die sind facebooksüchtig 17:10⎜«Vutral» aber auch traurig; früher warst du als nerd voll am arsch 17:10⎜«Vutral» heute bist du als nerd der einzige der wirklich damit klarkommt ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] arch: m68k: include: asm: the 3rd parameter of 'insl' and 'outsl' need '<< 2' 2013-06-06 11:52 ` Thorsten Glaser @ 2013-06-06 11:52 ` Thorsten Glaser 2013-06-06 22:47 ` Michael Schmitz 1 sibling, 0 replies; 16+ messages in thread From: Thorsten Glaser @ 2013-06-06 11:52 UTC (permalink / raw) To: schmitz Cc: Chen Gang, Geert Uytterhoeven, Greg Ungerer, schmitz, Sam Ravnborg, Greg KH, linux-m68k, linux-kernel@vger.kernel.org, Linux-Arch schmitz dixit: > No need for the #ifdef CONFIG_Q40 - Q40 is the only m68k subarch that builds > the parport_pc module (which includes parport.h), IIRC. Is that correct, > Thorsten? The header is included outside of Q40. There is no Q40 kernel in Debian (yet). So, no. bye, //mirabilos -- 17:08⎜«Vutral» früher gabs keine packenden smartphones und so 17:08⎜«Vutral» heute gibts frauen die sind facebooksüchtig 17:10⎜«Vutral» aber auch traurig; früher warst du als nerd voll am arsch 17:10⎜«Vutral» heute bist du als nerd der einzige der wirklich damit klarkommt ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] arch: m68k: include: asm: the 3rd parameter of 'insl' and 'outsl' need '<< 2' 2013-06-06 11:52 ` Thorsten Glaser 2013-06-06 11:52 ` Thorsten Glaser @ 2013-06-06 22:47 ` Michael Schmitz 1 sibling, 0 replies; 16+ messages in thread From: Michael Schmitz @ 2013-06-06 22:47 UTC (permalink / raw) To: Thorsten Glaser Cc: Chen Gang, Geert Uytterhoeven, Greg Ungerer, schmitz, Sam Ravnborg, Greg KH, linux-m68k, linux-kernel@vger.kernel.org, Linux-Arch Thorsten, >> No need for the #ifdef CONFIG_Q40 - Q40 is the only m68k subarch that builds >> the parport_pc module (which includes parport.h), IIRC. Is that correct, >> Thorsten? > > The header is included outside of Q40. There is no Q40 kernel > in Debian (yet). So, no. OK, so it's the Amiga use of parport_pc that you had issues with. I really should stop relying on my increasingly fuzzy memory. Looking at the arch defconfigs, neither Amiga or Atari defines CONFIG_PARPORT_PC. Is this driver used on any m68k subarch at all? At this stage I'm not even certain it is in fact used on Q40. Anyway, back to the patch at hand: any change to parport_pc.h should not affect m68k at all, so you're free to patch this any way you please. Changes to m68k asm/io.h should be avoided unless shown to cause no harm to existing drivers. I can't see direct use of insl/outsl in Atari m68k drivers I checked, but due to the slightly tangled nature of m68k io.h, these may get pulled in through macros yet. I'd prefer the code stays as-is. Regards, Michael 2013/6/6 Thorsten Glaser <tg@mirbsd.de>: > schmitz dixit: > >> No need for the #ifdef CONFIG_Q40 - Q40 is the only m68k subarch that builds >> the parport_pc module (which includes parport.h), IIRC. Is that correct, >> Thorsten? > > The header is included outside of Q40. There is no Q40 kernel > in Debian (yet). So, no. > > bye, > //mirabilos > -- > 17:08⎜«Vutral» früher gabs keine packenden smartphones und so > 17:08⎜«Vutral» heute gibts frauen die sind facebooksüchtig > 17:10⎜«Vutral» aber auch traurig; früher warst du als nerd voll am arsch > 17:10⎜«Vutral» heute bist du als nerd der einzige der wirklich damit klarkommt ^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2013-06-06 22:47 UTC | newest] Thread overview: 16+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-05-30 9:39 [PATCH] arch: m68k: include: asm: the 3rd parameter of 'insl' and 'outsl' need '<< 2' Chen Gang 2013-05-30 18:52 ` Geert Uytterhoeven 2013-06-01 0:26 ` schmitz 2013-06-01 0:38 ` schmitz 2013-06-01 0:38 ` schmitz 2013-06-03 9:40 ` Chen Gang 2013-06-03 10:48 ` Geert Uytterhoeven 2013-06-03 10:48 ` Geert Uytterhoeven 2013-06-05 0:35 ` Chen Gang 2013-06-05 0:35 ` Chen Gang 2013-06-05 7:24 ` schmitz 2013-06-06 8:38 ` Chen Gang 2013-06-06 8:38 ` Chen Gang 2013-06-06 11:52 ` Thorsten Glaser 2013-06-06 11:52 ` Thorsten Glaser 2013-06-06 22:47 ` Michael Schmitz
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox