Skip to contentSkip to conversation

printk: Fix unused printk_time compile warning when !CONFIG_PRINTK

PATCH New Prarit Bhargava 1 participant 1 message Sep 26, 2017 Printk

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 printk: Fix unused printk_time compile warning when !CONFIG_PRINTK

Patch is against -tip and tglx requested a delta patch.

P.

---8<---

When !CONFIG_PRINTK the compile warns with

CC kernel/printk/printk.o
kernel/printk/printk.c:1983:12: warning: ‘printk_time’ defined but not used [-Wunused-variable]
static int printk_time;

Remove the printk_time declaration for !CONFIG_PRINTK.

---
 kernel/printk/printk.c | 2 --
 1 file changed, 2 deletions(-)
kernel/printk/printk.c +0 -2
index 5e0bf2ef02f7..fe94246fa073 100644
@@ -1979,8 +1979,6 @@ static void call_console_drivers(const char *ext_text, size_t ext_len,
 static size_t msg_print_text(const struct printk_log *msg,
 			     bool syslog, char *buf, size_t size) { return 0; }
 static bool suppress_message_printing(int level) { return false; }
-
-static int printk_time;
 #endif /* CONFIG_PRINTK */
 
 #ifdef CONFIG_EARLY_PRINTK
Signature · 1 line
1.8.5.5