Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2181489pxj; Thu, 20 May 2021 01:53:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx09lMLsLBMNBsGWy/aCUK78kYIJZwpyGsZpVenTdqucSmPOpvJS6TFnduH20hSivYUhf9d X-Received: by 2002:a17:907:a06e:: with SMTP id ia14mr3699835ejc.17.1621500821753; Thu, 20 May 2021 01:53:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621500821; cv=none; d=google.com; s=arc-20160816; b=BfFTyRRnOZ/43LopPvpBfsbxVi3xthQMR3MM9eiRUV3EU+MD0dehrjswVYbX4nzhpF +f29oqbTpu0/bsKuGxP4Iwf+C3BFTqDYXMQaVIorJ0jub5/maQI/2i6TReI9BS2V1+zl gIPpAnHAPyUkmhepmX9ZrHpXL1Su1+EIZSmKsANDO0FMwNzkd0CaTSdQ0pVg7lBnWlOe ZyNdp23AAcax6Nmws4oKJ2isRQfsGoGzBC8rIxvD+gbsg6XrVncK6itMKn1c2Jjmq/iW k22VuJ6Xpnj63Z8KB0KZf5gvgzyv4rrizbUx8xp+tS6o+yJgKY6dn3TEfJCW8vnFgO78 wq+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=Cjw5DZUwAgewigT9x7jrCflpSO4es0cdWrHQgUT9hkY=; b=HKO+DVud7+H7Ovojk8bD5lbcTrd86ZOum4a7/7MZ0NxX+BlYb5Ofvh9T7aVg82Q54w 2fnJxGPYcuAtD1nlFbQKpHfziKIcnoC0SFfSuRPdeRxAykQkUJ6pvk++BM1orEnwkMgM +gm4k19EVoJ++LFglRVwnyy6H7tHYw+w2+rhDR1x53odGwdMJVsKA7BiZxi6Exs65HLT 7bnHxCkbqplXOMSCXEZRYICn1sYRHsTgU4u5UZ0Gr1K5mOnkWt0JZneuZ9Q6HHyuG+Oo t2nDQid3pqH6i9vW88RiZjrz9qTpHP3Asp5yR4V3pl9l6FsIAMdpkQ+dLR+7ur3UwO6l 2j5Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w13si2131128ede.340.2021.05.20.01.53.17; Thu, 20 May 2021 01:53:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231391AbhETIvv (ORCPT + 99 others); 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