mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] neofb.c
@ 2002-05-25 12:02 Thomas 'Dent' Mirlacher
  2002-05-27  6:40 ` Andrey Panin
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas 'Dent' Mirlacher @ 2002-05-25 12:02 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Linux Kernel Mailinglist

gcc 3.1 seems to be unhappy:
neofb.c:2321: initialized causes a section type conflict

the simple patch for this would be:
===== neofb.c 1.8 vs edited =====
--- 1.8/drivers/video/neofb.c   Thu May  2 00:56:02 2002
+++ edited/neofb.c      Sat May 25 18:50:14 2002
@@ -2318,10 +2318,10 @@
   return 0;
 }
 
-static int __init initialized = 0;
-
 int __init neofb_init(void)
 {
+  static int initialized = 0;
+
   DBG("neofb_init");
 
   if (disabled)


-- 
in some way i do, and in some way i don't.


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

* Re: [PATCH] neofb.c
  2002-05-25 12:02 [PATCH] neofb.c Thomas 'Dent' Mirlacher
@ 2002-05-27  6:40 ` Andrey Panin
  0 siblings, 0 replies; 2+ messages in thread
From: Andrey Panin @ 2002-05-27  6:40 UTC (permalink / raw)
  To: Thomas 'Dent' Mirlacher; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 760 bytes --]

On Sat, May 25, 2002 at 02:02:16PM +0200, Thomas 'Dent' Mirlacher wrote:
> gcc 3.1 seems to be unhappy:
> neofb.c:2321: initialized causes a section type conflict
> 
> the simple patch for this would be:
> ===== neofb.c 1.8 vs edited =====
> --- 1.8/drivers/video/neofb.c   Thu May  2 00:56:02 2002
> +++ edited/neofb.c      Sat May 25 18:50:14 2002
> @@ -2318,10 +2318,10 @@
>    return 0;
>  }
>  
> -static int __init initialized = 0;
> -
>  int __init neofb_init(void)
>  {
> +  static int initialized = 0;
> +
>    DBG("neofb_init");
>  
>    if (disabled)

correct solution is to change __init to __initdata.

-- 
Andrey Panin            | Embedded systems software engineer
pazke@orbita1.ru        | PGP key: wwwkeys.eu.pgp.net

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

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

end of thread, other threads:[~2002-05-27  6:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-25 12:02 [PATCH] neofb.c Thomas 'Dent' Mirlacher
2002-05-27  6:40 ` Andrey Panin

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

all inboxes | Powered by JetHome®