From patchwork Tue Jun 15 20:02:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Matthew Wilcox (Oracle)" X-Patchwork-Id: 12322801 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.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 4E926C48BE5 for ; Tue, 15 Jun 2021 20:04:00 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E1F9A61246 for ; Tue, 15 Jun 2021 20:03:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E1F9A61246 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 6CA676B0070; Tue, 15 Jun 2021 16:03:59 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 67B616B0071; Tue, 15 Jun 2021 16:03:59 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 542486B0072; Tue, 15 Jun 2021 16:03:59 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0004.hostedemail.com [216.40.44.4]) by kanga.kvack.org (Postfix) with ESMTP id 20F0D6B0070 for ; Tue, 15 Jun 2021 16:03:59 -0400 (EDT) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id A73FE181AC9C6 for ; Tue, 15 Jun 2021 20:03:58 +0000 (UTC) X-FDA: 78257034156.26.5146A63 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf12.hostedemail.com (Postfix) with ESMTP id 39775FF for ; Tue, 15 Jun 2021 20:03:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=yQob+NSiw0U11+6ZlVT3byTGLO3y80zBeSOou0mxcRM=; b=e57c93unMhEX5Ol350FtGHduRC XS3Y0iITGJwV8/+YbvnsK+O5VDp++0zKOizv2vlSCh1TndPUzyYX9RRkbLUp+KOLN/mNVadwd+mdh 0lqEuPOCBSvqecXElRxg+FIQNp7ni44vW9qIdv9aH9bQW38DJo+5jND8a+ESW7lwk5YCsjVmEqR6A PpEe3HKhNI2wncyE7My+JltFLwGYXH/4TjyeOF+5mxSs0mw6zCn3ZVvbL3YvynVs3cQkFq8yKb7da lnGO6pcXdaUAWBHRj3/5ZLJPk+aiDyOrRnxDQFZ7FbDJO1ua23gV+o4Dk5sF06CHWdppZXHFZmbZ6 X9lVazDw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1ltFHL-007CbH-J4; Tue, 15 Jun 2021 20:03:24 +0000 From: "Matthew Wilcox (Oracle)" To: akpm@linux-foundation.org Cc: "Matthew Wilcox (Oracle)" , linux-mm@kvack.org Subject: [PATCH 2/5] Fix hugetlb_basepage_index missing prototype warning Date: Tue, 15 Jun 2021 21:02:39 +0100 Message-Id: <20210615200242.1716568-3-willy@infradead.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210615200242.1716568-1-willy@infradead.org> References: <20210615200242.1716568-1-willy@infradead.org> MIME-Version: 1.0 Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=e57c93un; spf=none (imf12.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 39775FF X-Stat-Signature: 6mjh461phqegudwa7hkcww8mgigwbkm3 X-HE-Tag: 1623787425-181058 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: -Wmissing-prototypes requires that the prototype actually be in scope, not just previously seen. Move it outside page_to_pgoff(). Signed-off-by: Matthew Wilcox (Oracle) Acked-by: Hugh Dickins --- include/linux/pagemap.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 5f0582de24e7..c4b1514818ff 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h @@ -585,16 +585,16 @@ static inline pgoff_t page_to_index(struct page *page) return pgoff; } +extern pgoff_t hugetlb_basepage_index(struct page *page); + /* * Get the offset in PAGE_SIZE (even for hugetlb pages). * (TODO: hugetlb pages should have ->index in PAGE_SIZE) */ static inline pgoff_t page_to_pgoff(struct page *page) { - if (unlikely(PageHuge(page))) { - extern pgoff_t hugetlb_basepage_index(struct page *page); + if (unlikely(PageHuge(page))) return hugetlb_basepage_index(page); - } return page_to_index(page); }