* [PATCH] logo: move declarations of logos to linux_logo.h @ 2007-12-09 21:40 Marcin Ślusarz 2007-12-13 10:31 ` Andrew Morton 0 siblings, 1 reply; 7+ messages in thread From: Marcin Ślusarz @ 2007-12-09 21:40 UTC (permalink / raw) To: linux-kernel; +Cc: Antonino Daplas, Andrew Morton logo: move declarations of logos to linux_logo.h there was a mismatch between externs in logo.c and code generated by pnmtologo (on old tree, you need to rm drivers/video/logo/logo_*.c before compilation) Signed-off-by: Marcin Ślusarz <marcin.slusarz@gmail.com> --- drivers/video/logo/logo.c | 13 ------------- include/linux/linux_logo.h | 13 +++++++++++++ scripts/pnmtologo.c | 6 +++--- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/video/logo/logo.c b/drivers/video/logo/logo.c index fc72684..f5a0cd3 100644 --- a/drivers/video/logo/logo.c +++ b/drivers/video/logo/logo.c @@ -21,19 +21,6 @@ #include <asm/bootinfo.h> #endif -extern const struct linux_logo logo_linux_mono; -extern const struct linux_logo logo_linux_vga16; -extern const struct linux_logo logo_linux_clut224; -extern const struct linux_logo logo_dec_clut224; -extern const struct linux_logo logo_mac_clut224; -extern const struct linux_logo logo_parisc_clut224; -extern const struct linux_logo logo_sgi_clut224; -extern const struct linux_logo logo_sun_clut224; -extern const struct linux_logo logo_superh_mono; -extern const struct linux_logo logo_superh_vga16; -extern const struct linux_logo logo_superh_clut224; -extern const struct linux_logo logo_m32r_clut224; - static int nologo; module_param(nologo, bool, 0); MODULE_PARM_DESC(nologo, "Disables startup logo"); diff --git a/include/linux/linux_logo.h b/include/linux/linux_logo.h index 08a9296..da9fb79 100644 --- a/include/linux/linux_logo.h +++ b/include/linux/linux_logo.h @@ -42,4 +42,17 @@ static inline void fb_append_extra_logo(const struct linux_logo *logo, {} #endif +extern const struct linux_logo logo_linux_mono; +extern const struct linux_logo logo_linux_vga16; +extern const struct linux_logo logo_linux_clut224; +extern const struct linux_logo logo_dec_clut224; +extern const struct linux_logo logo_mac_clut224; +extern const struct linux_logo logo_parisc_clut224; +extern const struct linux_logo logo_sgi_clut224; +extern const struct linux_logo logo_sun_clut224; +extern const struct linux_logo logo_superh_mono; +extern const struct linux_logo logo_superh_vga16; +extern const struct linux_logo logo_superh_clut224; +extern const struct linux_logo logo_m32r_clut224; + #endif /* _LINUX_LINUX_LOGO_H */ diff --git a/scripts/pnmtologo.c b/scripts/pnmtologo.c index 6aa2a24..3048431 100644 --- a/scripts/pnmtologo.c +++ b/scripts/pnmtologo.c @@ -237,14 +237,14 @@ 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 unsigned char %s_data[] __initdata = {\n", + fprintf(out, "static const unsigned char %s_data[] __initdata = {\n", logoname); } static void write_footer(void) { fputs("\n};\n\n", out); - fprintf(out, "struct linux_logo %s __initdata = {\n", logoname); + fprintf(out, "const struct linux_logo %s __initdata = {\n", logoname); fprintf(out, " .type\t= %s,\n", logo_types[logo_type]); fprintf(out, " .width\t= %d,\n", logo_width); fprintf(out, " .height\t= %d,\n", logo_height); @@ -374,7 +374,7 @@ static void write_logo_clut224(void) fputs("\n};\n\n", out); /* write logo clut */ - fprintf(out, "static unsigned char %s_clut[] __initdata = {\n", + fprintf(out, "static const unsigned char %s_clut[] __initdata = {\n", logoname); write_hex_cnt = 0; for (i = 0; i < logo_clutsize; i++) { ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] logo: move declarations of logos to linux_logo.h 2007-12-09 21:40 [PATCH] logo: move declarations of logos to linux_logo.h Marcin Ślusarz @ 2007-12-13 10:31 ` Andrew Morton 2007-12-13 19:50 ` Marcin Ślusarz 2007-12-13 21:31 ` Marcin Slusarz 0 siblings, 2 replies; 7+ messages in thread From: Andrew Morton @ 2007-12-13 10:31 UTC (permalink / raw) To: Marcin Ślusarz; +Cc: linux-kernel, Antonino Daplas, linux-fbdev-devel On Sun, 9 Dec 2007 22:40:31 +0100 Marcin Ślusarz <marcin.slusarz@gmail.com> wrote: > logo: move declarations of logos to linux_logo.h > > there was a mismatch between externs in logo.c and code generated by pnmtologo > (on old tree, you need to rm drivers/video/logo/logo_*.c before compilation) This patch (after I fixed it) keeps on causing trouble: mismatches between the header file declarations and the actual definitions of the lookup tables. This happens as I apply and unapply the patch. It _shouldn't_ happen, but there would appear to be some missing makefile rules. I guess the C files aren't being regenerated when scripts/pnmtologo.c has been altered, so the C files aren't matching the header which this patch alters. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] logo: move declarations of logos to linux_logo.h 2007-12-13 10:31 ` Andrew Morton @ 2007-12-13 19:50 ` Marcin Ślusarz 2007-12-13 19:55 ` Sam Ravnborg 2007-12-13 21:31 ` Marcin Slusarz 1 sibling, 1 reply; 7+ messages in thread From: Marcin Ślusarz @ 2007-12-13 19:50 UTC (permalink / raw) To: Andrew Morton; +Cc: linux-kernel, Antonino Daplas, linux-fbdev-devel On Thu, Dec 13, 2007 at 02:31:11AM -0800, Andrew Morton wrote: > On Sun, 9 Dec 2007 22:40:31 +0100 Marcin Ślusarz <marcin.slusarz@gmail.com> wrote: > > > logo: move declarations of logos to linux_logo.h > > > > there was a mismatch between externs in logo.c and code generated by pnmtologo > > (on old tree, you need to rm drivers/video/logo/logo_*.c before compilation) > > This patch (after I fixed it) keeps on causing trouble: mismatches between > the header file declarations and the actual definitions of the lookup > tables. This happens as I apply and unapply the patch. > > It _shouldn't_ happen, but there would appear to be some missing makefile > rules. I guess the C files aren't being regenerated when > scripts/pnmtologo.c has been altered, so the C files aren't matching the > header which this patch alters. Ok, I'll try to fix that. Marcin ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] logo: move declarations of logos to linux_logo.h 2007-12-13 19:50 ` Marcin Ślusarz @ 2007-12-13 19:55 ` Sam Ravnborg 0 siblings, 0 replies; 7+ messages in thread From: Sam Ravnborg @ 2007-12-13 19:55 UTC (permalink / raw) To: Marcin Ślusarz Cc: Andrew Morton, linux-kernel, Antonino Daplas, linux-fbdev-devel On Thu, Dec 13, 2007 at 08:50:46PM +0100, Marcin Ślusarz wrote: > On Thu, Dec 13, 2007 at 02:31:11AM -0800, Andrew Morton wrote: > > On Sun, 9 Dec 2007 22:40:31 +0100 Marcin Ślusarz <marcin.slusarz@gmail.com> wrote: > > > > > logo: move declarations of logos to linux_logo.h > > > > > > there was a mismatch between externs in logo.c and code generated by pnmtologo > > > (on old tree, you need to rm drivers/video/logo/logo_*.c before compilation) > > > > This patch (after I fixed it) keeps on causing trouble: mismatches between > > the header file declarations and the actual definitions of the lookup > > tables. This happens as I apply and unapply the patch. > > > > It _shouldn't_ happen, but there would appear to be some missing makefile > > rules. I guess the C files aren't being regenerated when > > scripts/pnmtologo.c has been altered, so the C files aren't matching the > > header which this patch alters. > Ok, I'll try to fix that. The kbuild rules around the logo stuff are non-trivial. Drop me a line (+patch) if you need help. You may in that case also cc: linux-kbuild@vger.kernel.org. There are some quite skilled kbuild people hanging out there too. I may not respond promptly - busy these days (+ christmas) Sam ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] logo: move declarations of logos to linux_logo.h 2007-12-13 10:31 ` Andrew Morton 2007-12-13 19:50 ` Marcin Ślusarz @ 2007-12-13 21:31 ` Marcin Slusarz 2007-12-14 20:49 ` [Linux-fbdev-devel] " Geert Uytterhoeven 1 sibling, 1 reply; 7+ messages in thread From: Marcin Slusarz @ 2007-12-13 21:31 UTC (permalink / raw) To: Andrew Morton Cc: linux-kernel, Antonino Daplas, linux-fbdev-devel, Sam Ravnborg On Thu, Dec 13, 2007 at 02:31:11AM -0800, Andrew Morton wrote: > On Sun, 9 Dec 2007 22:40:31 +0100 Marcin Ślusarz <marcin.slusarz@gmail.com> wrote: > > > logo: move declarations of logos to linux_logo.h > > > > there was a mismatch between externs in logo.c and code generated by pnmtologo > > (on old tree, you need to rm drivers/video/logo/logo_*.c before compilation) > > This patch (after I fixed it) keeps on causing trouble: mismatches between > the header file declarations and the actual definitions of the lookup > tables. This happens as I apply and unapply the patch. > > It _shouldn't_ happen, but there would appear to be some missing makefile > rules. I guess the C files aren't being regenerated when > scripts/pnmtologo.c has been altered, so the C files aren't matching the > header which this patch alters. Ok, updated patch below: logo: move declarations of logos to linux_logo.h there was a mismatch between externs in logo.c and code generated by pnmtologo Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> CC: Antonino Daplas <adaplas@gmail.com> CC: Andrew Morton <akpm@linux-foundation.org> CC: Sam Ravnborg <sam@ravnborg.org> --- drivers/video/logo/Makefile | 8 ++++---- drivers/video/logo/logo.c | 13 ------------- include/linux/linux_logo.h | 13 +++++++++++++ scripts/pnmtologo.c | 6 +++--- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/drivers/video/logo/Makefile b/drivers/video/logo/Makefile index a5fc4ed..61b8c24 100644 --- a/drivers/video/logo/Makefile +++ b/drivers/video/logo/Makefile @@ -41,16 +41,16 @@ quiet_cmd_logo = LOGO $@ -t $(patsubst $*_%,%,$(notdir $(basename $<))) \ -n $(notdir $(basename $<)) -o $@ $< -$(obj)/%_mono.c: $(src)/%_mono.pbm FORCE +$(obj)/%_mono.c: $(src)/%_mono.pbm scripts/pnmtologo FORCE $(call if_changed,logo) -$(obj)/%_vga16.c: $(src)/%_vga16.ppm FORCE +$(obj)/%_vga16.c: $(src)/%_vga16.ppm scripts/pnmtologo FORCE $(call if_changed,logo) -$(obj)/%_clut224.c: $(src)/%_clut224.ppm FORCE +$(obj)/%_clut224.c: $(src)/%_clut224.ppm scripts/pnmtologo FORCE $(call if_changed,logo) -$(obj)/%_gray256.c: $(src)/%_gray256.pgm FORCE +$(obj)/%_gray256.c: $(src)/%_gray256.pgm scripts/pnmtologo FORCE $(call if_changed,logo) # Files generated that shall be removed upon make clean diff --git a/drivers/video/logo/logo.c b/drivers/video/logo/logo.c index fc72684..f5a0cd3 100644 --- a/drivers/video/logo/logo.c +++ b/drivers/video/logo/logo.c @@ -21,19 +21,6 @@ #include <asm/bootinfo.h> #endif -extern const struct linux_logo logo_linux_mono; -extern const struct linux_logo logo_linux_vga16; -extern const struct linux_logo logo_linux_clut224; -extern const struct linux_logo logo_dec_clut224; -extern const struct linux_logo logo_mac_clut224; -extern const struct linux_logo logo_parisc_clut224; -extern const struct linux_logo logo_sgi_clut224; -extern const struct linux_logo logo_sun_clut224; -extern const struct linux_logo logo_superh_mono; -extern const struct linux_logo logo_superh_vga16; -extern const struct linux_logo logo_superh_clut224; -extern const struct linux_logo logo_m32r_clut224; - static int nologo; module_param(nologo, bool, 0); MODULE_PARM_DESC(nologo, "Disables startup logo"); diff --git a/include/linux/linux_logo.h b/include/linux/linux_logo.h index 08a9296..da9fb79 100644 --- a/include/linux/linux_logo.h +++ b/include/linux/linux_logo.h @@ -42,4 +42,17 @@ static inline void fb_append_extra_logo(const struct linux_logo *logo, {} #endif +extern const struct linux_logo logo_linux_mono; +extern const struct linux_logo logo_linux_vga16; +extern const struct linux_logo logo_linux_clut224; +extern const struct linux_logo logo_dec_clut224; +extern const struct linux_logo logo_mac_clut224; +extern const struct linux_logo logo_parisc_clut224; +extern const struct linux_logo logo_sgi_clut224; +extern const struct linux_logo logo_sun_clut224; +extern const struct linux_logo logo_superh_mono; +extern const struct linux_logo logo_superh_vga16; +extern const struct linux_logo logo_superh_clut224; +extern const struct linux_logo logo_m32r_clut224; + #endif /* _LINUX_LINUX_LOGO_H */ diff --git a/scripts/pnmtologo.c b/scripts/pnmtologo.c index 6aa2a24..3048431 100644 --- a/scripts/pnmtologo.c +++ b/scripts/pnmtologo.c @@ -237,14 +237,14 @@ 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 unsigned char %s_data[] __initdata = {\n", + fprintf(out, "static const unsigned char %s_data[] __initdata = {\n", logoname); } static void write_footer(void) { fputs("\n};\n\n", out); - fprintf(out, "struct linux_logo %s __initdata = {\n", logoname); + fprintf(out, "const struct linux_logo %s __initdata = {\n", logoname); fprintf(out, " .type\t= %s,\n", logo_types[logo_type]); fprintf(out, " .width\t= %d,\n", logo_width); fprintf(out, " .height\t= %d,\n", logo_height); @@ -374,7 +374,7 @@ static void write_logo_clut224(void) fputs("\n};\n\n", out); /* write logo clut */ - fprintf(out, "static unsigned char %s_clut[] __initdata = {\n", + fprintf(out, "static const unsigned char %s_clut[] __initdata = {\n", logoname); write_hex_cnt = 0; for (i = 0; i < logo_clutsize; i++) { ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Linux-fbdev-devel] [PATCH] logo: move declarations of logos to linux_logo.h 2007-12-13 21:31 ` Marcin Slusarz @ 2007-12-14 20:49 ` Geert Uytterhoeven 2007-12-14 22:00 ` Sam Ravnborg 0 siblings, 1 reply; 7+ messages in thread From: Geert Uytterhoeven @ 2007-12-14 20:49 UTC (permalink / raw) To: linux-fbdev-devel Cc: Andrew Morton, Sam Ravnborg, linux-kernel, Antonino Daplas [-- Attachment #1: Type: TEXT/PLAIN, Size: 1449 bytes --] On Thu, 13 Dec 2007, Marcin Slusarz wrote: > On Thu, Dec 13, 2007 at 02:31:11AM -0800, Andrew Morton wrote: > > On Sun, 9 Dec 2007 22:40:31 +0100 Marcin Ślusarz <marcin.slusarz@gmail.com> wrote: > > > > > logo: move declarations of logos to linux_logo.h > > > > > > there was a mismatch between externs in logo.c and code generated by pnmtologo > > > (on old tree, you need to rm drivers/video/logo/logo_*.c before compilation) > > > > This patch (after I fixed it) keeps on causing trouble: mismatches between > > the header file declarations and the actual definitions of the lookup > > tables. This happens as I apply and unapply the patch. > > > > It _shouldn't_ happen, but there would appear to be some missing makefile > > rules. I guess the C files aren't being regenerated when > > scripts/pnmtologo.c has been altered, so the C files aren't matching the > > header which this patch alters. > > Ok, updated patch below: > > logo: move declarations of logos to linux_logo.h > > there was a mismatch between externs in logo.c and code generated by pnmtologo This may cause section conflicts, cfr. http://lkml.org/lkml/2007/10/24/65 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] 7+ messages in thread
* Re: [Linux-fbdev-devel] [PATCH] logo: move declarations of logos to linux_logo.h 2007-12-14 20:49 ` [Linux-fbdev-devel] " Geert Uytterhoeven @ 2007-12-14 22:00 ` Sam Ravnborg 0 siblings, 0 replies; 7+ messages in thread From: Sam Ravnborg @ 2007-12-14 22:00 UTC (permalink / raw) To: Geert Uytterhoeven Cc: linux-fbdev-devel, Andrew Morton, linux-kernel, Antonino Daplas On Fri, Dec 14, 2007 at 09:49:03PM +0100, Geert Uytterhoeven wrote: > On Thu, 13 Dec 2007, Marcin Slusarz wrote: > > On Thu, Dec 13, 2007 at 02:31:11AM -0800, Andrew Morton wrote: > > > On Sun, 9 Dec 2007 22:40:31 +0100 Marcin Ślusarz <marcin.slusarz@gmail.com> wrote: > > > > > > > logo: move declarations of logos to linux_logo.h > > > > > > > > there was a mismatch between externs in logo.c and code generated by pnmtologo > > > > (on old tree, you need to rm drivers/video/logo/logo_*.c before compilation) > > > > > > This patch (after I fixed it) keeps on causing trouble: mismatches between > > > the header file declarations and the actual definitions of the lookup > > > tables. This happens as I apply and unapply the patch. > > > > > > It _shouldn't_ happen, but there would appear to be some missing makefile > > > rules. I guess the C files aren't being regenerated when > > > scripts/pnmtologo.c has been altered, so the C files aren't matching the > > > header which this patch alters. > > > > Ok, updated patch below: > > > > logo: move declarations of logos to linux_logo.h > > > > there was a mismatch between externs in logo.c and code generated by pnmtologo > > This may cause section conflicts, cfr. > http://lkml.org/lkml/2007/10/24/65 If I recall correct then if the first __initdata variable is const then all date declared __initdata are attempted put in the const section. So maybe a bit reordering could help it? But that would serve a fat explanation why... Sam ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2007-12-14 21:58 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2007-12-09 21:40 [PATCH] logo: move declarations of logos to linux_logo.h Marcin Ślusarz 2007-12-13 10:31 ` Andrew Morton 2007-12-13 19:50 ` Marcin Ślusarz 2007-12-13 19:55 ` Sam Ravnborg 2007-12-13 21:31 ` Marcin Slusarz 2007-12-14 20:49 ` [Linux-fbdev-devel] " Geert Uytterhoeven 2007-12-14 22:00 ` Sam Ravnborg
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox