Browse files

fbdev: work around old compiler bug

When building with a 4.1.x compiler on powerpc64 (at least) we get this

drivers/video/logo/logo_linux_mono.c:81: error: logo_linux_mono causes a section type conflict

This was introduced by commit ae52bb2
("fbdev: move logo externs to header file").  This is a partial revert of
that commit sufficient to not hit the compiler bug.

Also convert _clut arrays from __initconst to __initdata.

Sam said:

  Al analysed this some time ago.  When we say something is const then
  _sometimes_ gcc annotate the section as const(?) - sometimes not.  So if
  we have two variables/functions annotated __*const and gcc decides to
  annotate the section const only in one case we get a section type

Signed-off-by: Stephen Rothwell <>
Cc: Sam Ravnborg <>
Cc: Krzysztof Helt <>
Cc: Geert Uytterhoeven <>
Cc: Kyle McMartin <>
Cc: Al Viro <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
  • Loading branch information...
1 parent c15e504 commit 15e3252464432a29c5461325cb5243471bd2a219 Stephen Rothwell committed with torvalds Jun 30, 2009
Showing with 2 additions and 2 deletions.
  1. +2 −2 scripts/pnmtologo.c
4 scripts/pnmtologo.c
@@ -237,7 +237,7 @@ static void write_header(void)
fprintf(out, " * Linux logo %s\n", logoname);
fputs(" */\n\n", out);
fputs("#include <linux/linux_logo.h>\n\n", out);
- fprintf(out, "static const unsigned char %s_data[] __initconst = {\n",
+ fprintf(out, "static unsigned char %s_data[] __initdata = {\n",
@@ -374,7 +374,7 @@ static void write_logo_clut224(void)
fputs("\n};\n\n", out);
/* write logo clut */
- fprintf(out, "static const unsigned char %s_clut[] __initconst = {\n",
+ fprintf(out, "static unsigned char %s_clut[] __initdata = {\n",
write_hex_cnt = 0;
for (i = 0; i < logo_clutsize; i++) {

0 comments on commit 15e3252

Please sign in to comment.