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=-15.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_2 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 2CEAEC07E9C for ; Thu, 8 Jul 2021 19:19:00 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id AF48D6162B for ; Thu, 8 Jul 2021 19:18:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AF48D6162B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 7BCEB6B0036; Thu, 8 Jul 2021 15:18:59 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 76D0A6B005D; Thu, 8 Jul 2021 15:18:59 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 60D8D6B006C; Thu, 8 Jul 2021 15:18:59 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0041.hostedemail.com [216.40.44.41]) by kanga.kvack.org (Postfix) with ESMTP id 388396B0036 for ; Thu, 8 Jul 2021 15:18:59 -0400 (EDT) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 831B1180226DF for ; Thu, 8 Jul 2021 19:18:58 +0000 (UTC) X-FDA: 78340383156.29.AA8FCD5 Received: from mail-ed1-f47.google.com (mail-ed1-f47.google.com [209.85.208.47]) by imf10.hostedemail.com (Postfix) with ESMTP id 90F9C6001B52 for ; Thu, 8 Jul 2021 19:18:55 +0000 (UTC) Received: by mail-ed1-f47.google.com with SMTP id t3so10051330edt.12 for ; Thu, 08 Jul 2021 12:18:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:organization:mime-version:content-transfer-encoding; bh=Lcf7pj0lQYGzDh3Xt/SAhA9pFGz1V15H7OOqaDQJa10=; b=bR58gdWSe3Cy50j8tEKHZtiFzBb1Tm7N+4yUZG42A4DypmYd5CZxQj3NcEUKeadQOu aH0VCu++twqzF0GGsnWiCHw7oJktkGLzFkfbO54K+ni34uGlpduQA8deOSuXxqc9K2hk M9Wqv8RL3O/nO/fHydKMyKJFzkLvxn0U/5KyprchEEaYjEKg6wDRLdl1hFWJhzSdjxDa YvJEjhwdqXEBIGa3UYmB8mDQfjzmi1UdSMyM/9RUagO41Lf4OEQD8ZL2sSibitIC4a5G n77IpVnrgcPEk2Pa9ts0CV6/vgjhp0X74hla8Pqd1XziQyxUzKf2UweH90LsHN3hmB7P ifBA== X-Gm-Message-State: AOAM530b+Mrahz6Njpw0xvwdgF5cHq8dO2Icnq4lzjix2muFG2MlXsFT dvh3zlJNJ3vaKVZRJtfv9YI= X-Google-Smtp-Source: ABdhPJzTzDiPQg0MEKqX0YmNU80wQTamYWiHaJ1ONnOcCcdx+KwrglYjwavDp/GXKH43VosCsZybgw== X-Received: by 2002:aa7:db95:: with SMTP id u21mr40422671edt.152.1625771933841; Thu, 08 Jul 2021 12:18:53 -0700 (PDT) Received: from localhost (mob-2-41-76-128.net.vodafone.it. [2.41.76.128]) by smtp.gmail.com with ESMTPSA id b23sm1719733edy.44.2021.07.08.12.18.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 12:18:53 -0700 (PDT) Date: Thu, 8 Jul 2021 21:18:44 +0200 From: Matteo Croce To: Mel Gorman Cc: Andrew Morton , Michal Hocko , David Hildenbrand , Vlastimil Babka , Dan Streetman , Yang Shi , Linux-MM , LKML Subject: Re: [PATCH 03/14] mm/page_alloc: Make should_fail_alloc_page a static function should_fail_alloc_page static Message-ID: <20210708211648.13659bb5@linux.microsoft.com> In-Reply-To: <20210520084809.8576-4-mgorman@techsingularity.net> References: <20210520084809.8576-1-mgorman@techsingularity.net> <20210520084809.8576-4-mgorman@techsingularity.net> Organization: Microsoft X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Authentication-Results: imf10.hostedemail.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=linux.microsoft.com (policy=none); spf=pass (imf10.hostedemail.com: domain of technoboy85@gmail.com designates 209.85.208.47 as permitted sender) smtp.mailfrom=technoboy85@gmail.com X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 90F9C6001B52 X-Stat-Signature: az9d4bn4c7bdper4f8f5bbhakw6u6s1d X-HE-Tag: 1625771935-403404 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, 20 May 2021 09:47:58 +0100 Mel Gorman wrote: > make W=3D1 generates the following warning for mm/page_alloc.c >=20 > mm/page_alloc.c:3651:15: warning: no previous prototype for > =E2=80=98should_fail_alloc_page=E2=80=99 [-Wmissing-prototypes] noinline = bool > should_fail_alloc_page(gfp_t gfp_mask, unsigned int order) > ^~~~~~~~~~~~~~~~~~~~~~ >=20 > 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. >=20 > Signed-off-by: Mel Gorman > --- > mm/page_alloc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > 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)=20 > #endif /* CONFIG_FAIL_PAGE_ALLOC */ > =20 > -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); > } Hi Mel, It seems that this breaks builds with CONFIG_DEBUG_INFO_BTF=3Dy. Maybe that warning was a false positive because should_fail_alloc_page() is referenced via a macro? I proposed to revert it, feel free to propose another fix. Regards, --=20 per aspera ad upstream