From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DDB8EC433B4 for ; Thu, 20 May 2021 08:50:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C22ED6124C for ; Thu, 20 May 2021 08:50:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231419AbhETIvv (ORCPT ); Thu, 20 May 2021 04:51:51 -0400 Received: from outbound-smtp50.blacknight.com ([46.22.136.234]:36127 "EHLO outbound-smtp50.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231222AbhETIvu (ORCPT ); Thu, 20 May 2021 04:51:50 -0400 Received: from mail.blacknight.com (pemlinmail03.blacknight.ie [81.17.254.16]) by outbound-smtp50.blacknight.com (Postfix) with ESMTPS id 766E6FAB48 for ; Thu, 20 May 2021 09:50:28 +0100 (IST) Received: (qmail 10639 invoked from network); 20 May 2021 08:50:28 -0000 Received: from unknown (HELO stampy.112glenside.lan) (mgorman@techsingularity.net@[84.203.23.168]) by 81.17.254.9 with ESMTPA; 20 May 2021 08:50:28 -0000 From: Mel Gorman To: Andrew Morton Cc: Michal Hocko , David Hildenbrand , Vlastimil Babka , Dan Streetman , Yang Shi , Linux-MM , LKML , Mel Gorman Subject: [PATCH 12/14] mm/mmap_lock: Remove dead code for !CONFIG_TRACING configurations Date: Thu, 20 May 2021 09:48:07 +0100 Message-Id: <20210520084809.8576-13-mgorman@techsingularity.net> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210520084809.8576-1-mgorman@techsingularity.net> References: <20210520084809.8576-1-mgorman@techsingularity.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org make W=1 generates the following warning in mmap_lock.c for allnoconfig mm/mmap_lock.c:213:6: warning: no previous prototype for ‘__mmap_lock_do_trace_start_locking’ [-Wmissing-prototypes] void __mmap_lock_do_trace_start_locking(struct mm_struct *mm, bool write) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/mmap_lock.c:219:6: warning: no previous prototype for ‘__mmap_lock_do_trace_acquire_returned’ [-Wmissing-prototypes] void __mmap_lock_do_trace_acquire_returned(struct mm_struct *mm, bool write, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/mmap_lock.c:226:6: warning: no previous prototype for ‘__mmap_lock_do_trace_released’ [-Wmissing-prototypes] void __mmap_lock_do_trace_released(struct mm_struct *mm, bool write) On !CONFIG_TRACING configurations, the code is dead so put it behind an #ifdef. Signed-off-by: Mel Gorman --- mm/mmap_lock.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mm/mmap_lock.c b/mm/mmap_lock.c index dcdde4f722a4..03ee85c696ef 100644 --- a/mm/mmap_lock.c +++ b/mm/mmap_lock.c @@ -205,6 +205,7 @@ void trace_mmap_lock_unreg(void) #endif /* CONFIG_MEMCG */ +#ifdef CONFIG_TRACING /* * Trace calls must be in a separate file, as otherwise there's a circular * dependency between linux/mmap_lock.h and trace/events/mmap_lock.h. @@ -228,3 +229,4 @@ void __mmap_lock_do_trace_released(struct mm_struct *mm, bool write) TRACE_MMAP_LOCK_EVENT(released, mm, write); } EXPORT_SYMBOL(__mmap_lock_do_trace_released); +#endif /* CONFIG_TRACING */ -- 2.26.2