Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1471250imm; Tue, 10 Jul 2018 02:20:13 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfYrZnW05cOrJLP31nsx+Cz2dgkdeN/JrbwhLAHDxjaaKBFDTDuZsrSnMjLqYPRGPqCNHS7 X-Received: by 2002:a65:40cd:: with SMTP id u13-v6mr22403779pgp.334.1531214413748; Tue, 10 Jul 2018 02:20:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531214413; cv=none; d=google.com; s=arc-20160816; b=ox8PxBgLdB5d23jmGCbbZ2JQbVypLwgfaojkSWXsUcDL3vvQCmHa2LeNFJPK6P++jP eqptDeCMvxhMrsEkaWHqkPO7DHLKgGTrg2WDTeziPIJyNSqZZAK/GAzhhFPg1DFwSdp4 OpGRYkxB81HGUKQkvOFuuDSwaNhzKglWvY2t+ZLNLkARPbjYVr0K8ol/fWPWYSGt64+8 eVvDSKkPgc9GCtmbKQIdmf6BHYv/nmEjD9jhL1xn89jn1OAqN+D/OA2QS+3v90HdzXs6 eg3Htn2JDqb5W4ggY0IXnzqSkGhZp5kHrbT96EcMzEnxWQ4WsRDcR8ldhIdarlIZSUWe lSpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=/7Ks8A/tEcUyucwkHH0dsQZawXgf8+JZMkWUlsCloEc=; b=raeic4ay3oLWI+DAPjIfXoKCTzQ2vaNksr6JcHzVIMWan+gLmEAiPuxkwSJFHbpaQR b+GAwF0DC2ddX3xwcUyQc3egR8im3arFN2Y7WfXnV2frSnYh0AeAMnZ4jlsjgif00wQ8 3OfuDRBf5Lwncl+ofpj5hBWzYy2Sb0oRfX8ipN2w+mXeOY/u2VgvIlnxi57mlPRAsUZC 0ZB7TiNuwBIQEtLXQ9ioP5Bd3oVgAaww6Z+typbEFAeQsSt0FeZuITiLiKtZ7alDIhDS UzAg4Vsm4ckygOUkHw3GM4a8nIXypykxae8YFvK7XpRLqdtgVN3nzgzy8zfkUsDAnTE2 yq0Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q7-v6si15979258pll.445.2018.07.10.02.19.51; Tue, 10 Jul 2018 02:20:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751357AbeGJJTN (ORCPT + 99 others); Tue, 10 Jul 2018 05:19:13 -0400 Received: from mx2.suse.de ([195.135.220.15]:56626 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751213AbeGJJTL (ORCPT ); Tue, 10 Jul 2018 05:19:11 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 555DEAD76; Tue, 10 Jul 2018 09:19:10 +0000 (UTC) Date: Tue, 10 Jul 2018 11:19:09 +0200 From: Petr Mladek To: Maninder Singh Cc: Stephen Rothwell , Linux-Next Mailing List , Linux Kernel Mailing List , Vaneet Narang , PANKAJ MISHRA Subject: Re: linux-next: build warning after merge of the printk tree Message-ID: <20180710091909.rwgtahcew6grhd6n@pathway.suse.cz> References: <20180710164514.22c552db@canb.auug.org.au> <2014348883.271177.1531206974788.JavaMail.jboss@ep1ml503> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2014348883.271177.1531206974788.JavaMail.jboss@ep1ml503> User-Agent: NeoMutt/20170421 (1.8.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 2018-07-10 12:46:14, Maninder Singh wrote: > Hi Petr, > > > Hi all, > > > After merging the printk tree, today's linux-next build (x86_64 > > allnoconfig) produced this warning: > > > kernel/printk/printk.c:2033:13: warning: 'suppress_message_printing' defined but not used [-Wunused-function] > > static bool suppress_message_printing(int level) { return false; } > ^~~~~~~~~~~~~~~~~~~~~~~~~ > > seems there is no user for suppress_message_printing when CONFIG_PRINTK is disabled, > because earlier it was getting used in console_unlock and now we shifted this into vprintk_emit > which will be disabled on disabling CONFIG_PRINTk. > > should we remove this defination when CONFIG_PRINTK is disabled ? > > > Introduced by commit > > 375899cddcbb ("printk: make sure to print log on console.") Grr, I wonder how I missed it. I usually try build with CONFIG_PRINTK disabled. Anyway, I have just pushed the following patch into printk.git, branch for-4.19: From 7b83946e61a1e4a080d48c24396aeb18b6366203 Mon Sep 17 00:00:00 2001 From: Petr Mladek Date: Tue, 10 Jul 2018 10:44:53 +0200 Subject: [PATCH] printk: Fix warning about unused suppress_message_printing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit suppress_message_printing() is not longer called in console_unlock(). Therefore it is not longer needed with disabled CONFIG_PRINTK. This fixes the warning: kernel/printk/printk.c:2033:13: warning: ‘suppress_message_printing’ defined but not used [-Wunused-function] static bool suppress_message_printing(int level) { return false; } Reported-by: Stephen Rothwell Suggested-by: Maninder Singh Signed-off-by: Petr Mladek --- kernel/printk/printk.c | 1 - 1 file changed, 1 deletion(-) diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index fcc1992c040a..e2cb0fc18e2d 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -2021,7 +2021,6 @@ static void call_console_drivers(const char *ext_text, size_t ext_len, const char *text, size_t 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; } #endif /* CONFIG_PRINTK */ -- 2.13.7