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 37B64C433B4 for ; Thu, 20 May 2021 08:49:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 163F96124C for ; Thu, 20 May 2021 08:49:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231327AbhETIul (ORCPT ); Thu, 20 May 2021 04:50:41 -0400 Received: from outbound-smtp35.blacknight.com ([46.22.139.218]:60289 "EHLO outbound-smtp35.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231331AbhETIug (ORCPT ); Thu, 20 May 2021 04:50:36 -0400 Received: from mail.blacknight.com (pemlinmail03.blacknight.ie [81.17.254.16]) by outbound-smtp35.blacknight.com (Postfix) with ESMTPS id DD09D1A4E for ; Thu, 20 May 2021 09:49:13 +0100 (IST) Received: (qmail 5792 invoked from network); 20 May 2021 08:49:13 -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:49:13 -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 05/14] mm/early_ioremap: Add prototype for early_memremap_pgprot_adjust Date: Thu, 20 May 2021 09:48:00 +0100 Message-Id: <20210520084809.8576-6-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/early_ioremap.c mm/early_ioremap.c:34:24: warning: no previous prototype for ‘early_memremap_pgprot_adjust’ [-Wmissing-prototypes] pgprot_t __init __weak early_memremap_pgprot_adjust(resource_size_t phys_addr, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ The weak functions that can be overridden by architectures are declared in include/asm-generic/early_ioremap.h so add the prototype there. The asm/fixmap.h header is need for pgprot_t. Signed-off-by: Mel Gorman --- include/asm-generic/early_ioremap.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/asm-generic/early_ioremap.h b/include/asm-generic/early_ioremap.h index 9def22e6e2b3..022f8f908b42 100644 --- a/include/asm-generic/early_ioremap.h +++ b/include/asm-generic/early_ioremap.h @@ -3,6 +3,7 @@ #define _ASM_EARLY_IOREMAP_H_ #include +#include /* * early_ioremap() and early_iounmap() are for temporary early boot-time @@ -19,6 +20,14 @@ extern void *early_memremap_prot(resource_size_t phys_addr, extern void early_iounmap(void __iomem *addr, unsigned long size); extern void early_memunmap(void *addr, unsigned long size); +/* + * Weak function called by early_memremap and early_memremap_ro. It does + * nothing, but architectures may provide their own version to handle + * memory encryption. + */ +extern pgprot_t early_memremap_pgprot_adjust(resource_size_t phys_addr, + unsigned long size, pgprot_t prot); + /* * Weak function called by early_ioremap_reset(). It does nothing, but * architectures may provide their own version to do any needed cleanups. -- 2.26.2