Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2179867pxj; Thu, 20 May 2021 01:50:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwpF0by09oqXfV+kyeB6ekRSMtWrbOU+yNsQCWkWqixhRXHtWaVH56vTKSaPLLQBgd6cGg4 X-Received: by 2002:a50:ff0a:: with SMTP id a10mr3824658edu.273.1621500655409; Thu, 20 May 2021 01:50:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621500655; cv=none; d=google.com; s=arc-20160816; b=M5yh8XTS5/3nkowff48By3J5SScSVQAnTYfElZppw470XO/gZsNg5UUZaWx25JyvI5 HxVin+R4+IwS/Is2OjzgZJCbbtyiUvNLOIHIy2ExZN7Pi+799/VYZeYP6AIWrpzn+EGw fKRjysSu7ZC7W3jh68AvV4SfWMoiIHG5FTKSrBSHJt3rXxAZ3icOXA+GNWoXdcqBSe6D /1u3EGXld56TtLCUTWmvQWuZlEc8NOIg7QqHwPUfAgQ2tjBvDyndl+tISUZosJuRp7iX +fDZT8oGPkuUh9EGFfmp/6Cx+BLqwW5E8ZaOoNez32CkQbjXmkp5n3CHSZI91mjFgx5U n1Zw== 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=jW8K8bDzlgXfdPRHVvnnKfPcO7pj5bHx55IxoVyysPQ=; b=MoUsfvBBtMFXiBzCm6xszN4JgGCFVY2cWSG74RdQn3k2gmqLpMfrBibPvGS2bImjiV x8/smlu6ZOe3S+3NaCnhS/1CmF91CWuUnOmst8j8liTm7NXTdsVJFm9n3Jqf0xEV3CDh uP4i4yRHt+1/aAKL43C1eVDzRzVU2pORa79UDlGepY8tV95AR5Ps090cpFQuDpMdvC2c 1SsqOpSAS/JH8AJszRyq0zuHDxWO/ND8s+4ffltdO+M160wRL9hktJ63bkYpTo+KiLcI Rjvnqk83Gwb0CMv9bss6kAflzAT4+tTnkR+MceGyunlPQi3MrnW14YnhUaKgFc+1r0O0 3wAA== 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 a42si2044030edf.188.2021.05.20.01.50.31; Thu, 20 May 2021 01:50:55 -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 S231314AbhETIuR (ORCPT + 99 others); Thu, 20 May 2021 04:50:17 -0400 Received: from outbound-smtp30.blacknight.com ([81.17.249.61]:57905 "EHLO outbound-smtp30.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231268AbhETIuQ (ORCPT ); Thu, 20 May 2021 04:50:16 -0400 Received: from mail.blacknight.com (pemlinmail03.blacknight.ie [81.17.254.16]) by outbound-smtp30.blacknight.com (Postfix) with ESMTPS id 97FBABAC24 for ; Thu, 20 May 2021 09:48:52 +0100 (IST) Received: (qmail 4549 invoked from network); 20 May 2021 08:48:52 -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:48:52 -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 03/14] mm/page_alloc: Make should_fail_alloc_page a static function should_fail_alloc_page static Date: Thu, 20 May 2021 09:47:58 +0100 Message-Id: <20210520084809.8576-4-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 for mm/page_alloc.c mm/page_alloc.c:3651:15: warning: no previous prototype for ‘should_fail_alloc_page’ [-Wmissing-prototypes] noinline bool should_fail_alloc_page(gfp_t gfp_mask, unsigned int order) ^~~~~~~~~~~~~~~~~~~~~~ This function is deliberately split out for BPF to allow errors to be injected. The function is not used anywhere else so it is local to the file. Make it static which should still allow error injection to be used similar to how block/blk-core.c:should_fail_bio() works. Signed-off-by: Mel Gorman --- mm/page_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index aaa1655cf682..26cc1a4e639b 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -3648,7 +3648,7 @@ static inline bool __should_fail_alloc_page(gfp_t gfp_mask, unsigned int order) #endif /* CONFIG_FAIL_PAGE_ALLOC */ -noinline bool should_fail_alloc_page(gfp_t gfp_mask, unsigned int order) +static noinline bool should_fail_alloc_page(gfp_t gfp_mask, unsigned int order) { return __should_fail_alloc_page(gfp_mask, order); } -- 2.26.2