public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] openrisc: Fix conflicting types for _exext and _stext
@ 2017-12-13  3:42 Joel Stanley
  2017-12-13  6:15 ` Sergey Senozhatsky
  0 siblings, 1 reply; 3+ messages in thread
From: Joel Stanley @ 2017-12-13  3:42 UTC (permalink / raw)
  To: Jonas Bonn, Stefan Kristiansson, Stafford Horne
  Cc: openrisc, linux-kernel, Sergey Senozhatsky, Petr Mladek

The printk tree in linux-next has a patch "symbol lookup: introduce
dereference_symbol_descriptor()" that includes sections.h in kallsyms.h,
so arch/openrisc/kernel/traps.c gets a second extern definition for
_etext and _stext.

Remove the local definitions and include sections.h directly in
preparation for the kallsyms.h change.

This fixes the following (future) build error:

  CC      arch/openrisc/kernel/traps.o
arch/openrisc/kernel/traps.c:43:13: error: conflicting types for ‘_etext’
 extern char _etext, _stext;
             ^
In file included from ./arch/openrisc/include/generated/asm/sections.h:1:0,
                 from ./include/linux/kallsyms.h:15,
                 from arch/openrisc/kernel/traps.c:35:
./include/asm-generic/sections.h:35:32: note: previous declaration of ‘_etext’ was here
 extern char _text[], _stext[], _etext[];
                                ^

Signed-off-by: Joel Stanley <joel@jms.id.au>
---
 arch/openrisc/kernel/traps.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/openrisc/kernel/traps.c b/arch/openrisc/kernel/traps.c
index 4085d72fa5ae..5fb6d512502d 100644
--- a/arch/openrisc/kernel/traps.c
+++ b/arch/openrisc/kernel/traps.c
@@ -39,8 +39,7 @@
 #include <asm/io.h>
 #include <asm/pgtable.h>
 #include <asm/unwinder.h>
-
-extern char _etext, _stext;
+#include <asm/sections.h>
 
 int kstack_depth_to_print = 0x180;
 int lwa_flag;
-- 
2.14.1

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

* Re: [PATCH] openrisc: Fix conflicting types for _exext and _stext
  2017-12-13  3:42 [PATCH] openrisc: Fix conflicting types for _exext and _stext Joel Stanley
@ 2017-12-13  6:15 ` Sergey Senozhatsky
  2017-12-13 14:53   ` Stafford Horne
  0 siblings, 1 reply; 3+ messages in thread
From: Sergey Senozhatsky @ 2017-12-13  6:15 UTC (permalink / raw)
  To: Joel Stanley
  Cc: Jonas Bonn, Stefan Kristiansson, Stafford Horne, openrisc,
	linux-kernel, Sergey Senozhatsky, Petr Mladek

On (12/13/17 14:12), Joel Stanley wrote:
> The printk tree in linux-next has a patch "symbol lookup: introduce
> dereference_symbol_descriptor()" that includes sections.h in kallsyms.h,
> so arch/openrisc/kernel/traps.c gets a second extern definition for
> _etext and _stext.
> 
> Remove the local definitions and include sections.h directly in
> preparation for the kallsyms.h change.
> 
> This fixes the following (future) build error:
> 
>   CC      arch/openrisc/kernel/traps.o
> arch/openrisc/kernel/traps.c:43:13: error: conflicting types for ‘_etext’
>  extern char _etext, _stext;
>              ^
> In file included from ./arch/openrisc/include/generated/asm/sections.h:1:0,
>                  from ./include/linux/kallsyms.h:15,
>                  from arch/openrisc/kernel/traps.c:35:
> ./include/asm-generic/sections.h:35:32: note: previous declaration of ‘_etext’ was here
>  extern char _text[], _stext[], _etext[];
>                                 ^
> 
> Signed-off-by: Joel Stanley <joel@jms.id.au>

FWIW, looks good to me,
Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>

	-ss

> ---
>  arch/openrisc/kernel/traps.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/arch/openrisc/kernel/traps.c b/arch/openrisc/kernel/traps.c
> index 4085d72fa5ae..5fb6d512502d 100644
> --- a/arch/openrisc/kernel/traps.c
> +++ b/arch/openrisc/kernel/traps.c
> @@ -39,8 +39,7 @@
>  #include <asm/io.h>
>  #include <asm/pgtable.h>
>  #include <asm/unwinder.h>
> -
> -extern char _etext, _stext;
> +#include <asm/sections.h>
>  
>  int kstack_depth_to_print = 0x180;
>  int lwa_flag;
> -- 
> 2.14.1
> 

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

* Re: [PATCH] openrisc: Fix conflicting types for _exext and _stext
  2017-12-13  6:15 ` Sergey Senozhatsky
@ 2017-12-13 14:53   ` Stafford Horne
  0 siblings, 0 replies; 3+ messages in thread
From: Stafford Horne @ 2017-12-13 14:53 UTC (permalink / raw)
  To: Sergey Senozhatsky
  Cc: Joel Stanley, Jonas Bonn, Stefan Kristiansson, openrisc,
	linux-kernel, Petr Mladek

On Wed, Dec 13, 2017 at 03:15:44PM +0900, Sergey Senozhatsky wrote:
> On (12/13/17 14:12), Joel Stanley wrote:
> > The printk tree in linux-next has a patch "symbol lookup: introduce
> > dereference_symbol_descriptor()" that includes sections.h in kallsyms.h,
> > so arch/openrisc/kernel/traps.c gets a second extern definition for
> > _etext and _stext.
> > 
> > Remove the local definitions and include sections.h directly in
> > preparation for the kallsyms.h change.
> > 
> > This fixes the following (future) build error:
> > 
> >   CC      arch/openrisc/kernel/traps.o
> > arch/openrisc/kernel/traps.c:43:13: error: conflicting types for ‘_etext’
> >  extern char _etext, _stext;
> >              ^

Oh man, why would this have been like this?

> > In file included from ./arch/openrisc/include/generated/asm/sections.h:1:0,
> >                  from ./include/linux/kallsyms.h:15,
> >                  from arch/openrisc/kernel/traps.c:35:
> > ./include/asm-generic/sections.h:35:32: note: previous declaration of ‘_etext’ was here
> >  extern char _text[], _stext[], _etext[];
> >                                 ^
> > 
> > Signed-off-by: Joel Stanley <joel@jms.id.au>
> 
> FWIW, looks good to me,
> Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>

Thanks. Applied for 4.16.

-Stafford

> 	-ss
> 
> > ---
> >  arch/openrisc/kernel/traps.c | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> > 
> > diff --git a/arch/openrisc/kernel/traps.c b/arch/openrisc/kernel/traps.c
> > index 4085d72fa5ae..5fb6d512502d 100644
> > --- a/arch/openrisc/kernel/traps.c
> > +++ b/arch/openrisc/kernel/traps.c
> > @@ -39,8 +39,7 @@
> >  #include <asm/io.h>
> >  #include <asm/pgtable.h>
> >  #include <asm/unwinder.h>
> > -
> > -extern char _etext, _stext;
> > +#include <asm/sections.h>
> >  
> >  int kstack_depth_to_print = 0x180;
> >  int lwa_flag;
> > -- 
> > 2.14.1
> > 

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

end of thread, other threads:[~2017-12-13 14:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-13  3:42 [PATCH] openrisc: Fix conflicting types for _exext and _stext Joel Stanley
2017-12-13  6:15 ` Sergey Senozhatsky
2017-12-13 14:53   ` Stafford Horne

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