Skip to contentSkip to conversation

Fix in printk.c

PATCH New Siddha, Suresh B 1 participant 1 message Jan 18, 2003

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix in printk.c

c99 specifies

<snip>
[#7] If, within a translation unit, the same identifier
appears with both internal and external linkage, the
behavior is undefined.
</snip>

"early_printk" has this type of behaviour in printk.c. Attached/appended patch removes the dependency on the behaviour of the compiler.

thanks,
suresh

kernel/printk.c renamed from kernel/printk.c~ +1 -1
diff -Nru linux-2.5.52/kernel/printk.c~ linux-2.5.52/kernel/printk.c
@@ -329,7 +329,7 @@
 	}
 #ifdef CONFIG_IA64_EARLY_PRINTK
 	if (!console_drivers) {
-		static void early_printk (const char *str, size_t len);
+		void early_printk (const char *str, size_t len);
 		early_printk(&LOG_BUF(start), end - start);
 	}
 #endif
kernel/printk.c renamed from kernel/printk.c~ +1 -1
diff -Nru linux-2.5.52/kernel/printk.c~ linux-2.5.52/kernel/printk.c
@@ -329,7 +329,7 @@
 	}
 #ifdef CONFIG_IA64_EARLY_PRINTK
 	if (!console_drivers) {
-		static void early_printk (const char *str, size_t len);
+		void early_printk (const char *str, size_t len);
 		early_printk(&LOG_BUF(start), end - start);
 	}
 #endif