From patchwork Wed Jul 12 12:57:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 107497 Delivered-To: patch@linaro.org Received: by 10.182.45.195 with SMTP id p3csp879832obm; Wed, 12 Jul 2017 05:58:37 -0700 (PDT) X-Received: by 10.84.193.101 with SMTP id e92mr3918919pld.209.1499864317567; Wed, 12 Jul 2017 05:58:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1499864317; cv=none; d=google.com; s=arc-20160816; b=ywXJFg6uTR6Ksr9R+b62056PPGhoHnov6ISL/c0ChhjW6sNtjIzcjGJZCgeYq7aKBw W3a3qsBeMH3PlYFPmGih28d88HsG2NNLKYhMr8n/QkO5O4wjNDFORy+pxwbGvdu6UdSO OGDrLdIotFGPIKG1CQ1ND+UOrXcFNhHnWKlbw06LN8BmVdQkO1Vw86HM/URuDFX+45Fh 7afLbSLBxGroVb/JLTIP0P6961iR+S9DYnMQtu+4NvXrWSonT9iZ5ZoHd2P1CCIZtN3o RXfGrrHzef/MGt+Y6hZ3ysHdRfJ+lgK82MyUJCX9NfMZINBRNwn+QRidb1jxDXWzDkZn wuSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition:mime-version :references:subject:cc:to:from:date:user-agent:message-id :dmarc-filter:arc-authentication-results; bh=RvjfALjkez1ZYeZbDVllEDlIlEUyD4yao0Kyq3HVeGo=; b=cyR77oqlVuxtRg3c7y+k2GDNRCjA6oUzUMqW6sySEs1BWg1+w+/jm5sBbr3ZvVd4aR T4q1YvOFLBdWmxgmkwuFClMPKhUBwrwfwi7tbyjoe7uuvfN2LRNidFiYdXdW03FHjR7L FdrbWfFzDR8YijzqKsKUvkeVraDuGFyGX15FSgpzhR9i4jY/w99A0vYkEV83KxWrD4hU WP7wBHASNVTP9hyeN6iLU5Gvsgzs/yWdYz2nyN0lSzpg3VIEKvC3T36c5h9IDoOlpOkU AX//E4EAip6jCQEhBTQ4/Pfh5AzmIRHsfIE4aHp4QnLU0DIZw0aCzxB3U3t/YVgTp09I Mjvg== 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 t72si1874194pfi.224.2017.07.12.05.58.37; Wed, 12 Jul 2017 05:58:37 -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 S1752181AbdGLM6E (ORCPT + 25 others); Wed, 12 Jul 2017 08:58:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:60948 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750999AbdGLM51 (ORCPT ); Wed, 12 Jul 2017 08:57:27 -0400 Received: from gandalf.local.home (cpe-67-246-153-56.stny.res.rr.com [67.246.153.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2909C22CA1; Wed, 12 Jul 2017 12:57:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2909C22CA1 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=goodmis.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=rostedt@goodmis.org Received: from rostedt by gandalf.local.home with local (Exim 4.87) (envelope-from ) id 1dVHCo-0000Nj-5r; Wed, 12 Jul 2017 08:57:26 -0400 Message-Id: <20170712125726.105948984@goodmis.org> User-Agent: quilt/0.63-1 Date: Wed, 12 Jul 2017 08:57:12 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Ingo Molnar , Andrew Morton , Arnd Bergmann Subject: [for-next][PATCH 4/4] ftrace: Hide cached module code for !CONFIG_MODULES References: <20170712125708.904785252@goodmis.org> MIME-Version: 1.0 Content-Disposition: inline; filename=0004-ftrace-Hide-cached-module-code-for-CONFIG_MODULES.patch Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann When modules are disabled, we get a harmless build warning: kernel/trace/ftrace.c:4051:13: error: 'process_cached_mods' defined but not used [-Werror=unused-function] This adds the same #ifdef around the new code that exists around its caller. Link: http://lkml.kernel.org/r/20170710084413.1820568-1-arnd@arndb.de Fixes: d7fbf8df7ca0 ("ftrace: Implement cached modules tracing on module load") Signed-off-by: Arnd Bergmann Signed-off-by: Steven Rostedt (VMware) --- kernel/trace/ftrace.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.10.2 diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 2953d558bbee..4706f0ed193e 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -3978,6 +3978,7 @@ static int ftrace_set_regex(struct ftrace_ops *ops, unsigned char *buf, int len, int reset, int enable); +#ifdef CONFIG_MODULES static void process_mod_list(struct list_head *head, struct ftrace_ops *ops, char *mod, bool enable) { @@ -4068,6 +4069,7 @@ static void process_cached_mods(const char *mod_name) kfree(mod); } +#endif /* * We register the module command as a template to show others how