From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030589AbdIZP7o (ORCPT ); Tue, 26 Sep 2017 11:59:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54340 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935993AbdIZP7n (ORCPT ); Tue, 26 Sep 2017 11:59:43 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 0CC644FD Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=prarit@redhat.com From: Prarit Bhargava To: linux-kernel@vger.kernel.org Cc: Prarit Bhargava , Thomas Gleixner Subject: [PATCH] printk: Fix unused printk_time compile warning when !CONFIG_PRINTK Date: Tue, 26 Sep 2017 11:59:40 -0400 Message-Id: <1506441580-28115-1-git-send-email-prarit@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 26 Sep 2017 15:59:43 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Reported-by: Petr Mladek Signed-off-by: Prarit Bhargava Cc: Thomas Gleixner --- kernel/printk/printk.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index 5e0bf2ef02f7..fe94246fa073 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -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 -- 1.8.5.5