From patchwork Wed Dec 1 18:12:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yixuan Cao X-Patchwork-Id: 12650587 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 40133C433F5 for ; Wed, 1 Dec 2021 18:13:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id ADF1A6B0072; Wed, 1 Dec 2021 13:13:42 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A8DD06B0073; Wed, 1 Dec 2021 13:13:42 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9550E6B0074; Wed, 1 Dec 2021 13:13:42 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0114.hostedemail.com [216.40.44.114]) by kanga.kvack.org (Postfix) with ESMTP id 8255F6B0072 for ; Wed, 1 Dec 2021 13:13:42 -0500 (EST) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 4392A89D42 for ; Wed, 1 Dec 2021 18:13:32 +0000 (UTC) X-FDA: 78870023064.26.30AC823 Received: from smtpbguseast2.qq.com (smtpbguseast2.qq.com [54.204.34.130]) by imf29.hostedemail.com (Postfix) with ESMTP id CCEBD9000257 for ; Wed, 1 Dec 2021 18:13:29 +0000 (UTC) X-QQ-mid: bizesmtp36t1638382400ta57a6n1 Received: from localhost.localdomain.localdoma (unknown [202.96.137.248]) by esmtp6.qq.com (ESMTP) with id ; Thu, 02 Dec 2021 02:12:37 +0800 (CST) X-QQ-SSF: 01400000002000C0L000000A0000000 X-QQ-FEAT: FXvDfBZI5O4d+vXJaVmaRyAb1bQpm8OYBEAf5xrzyf2y4jl7/DLUyO4H3+K6m fZ3jrXJ39FRTUgPdOdZcVCyf+8ON8AHghudFXP4AjJJdvmabZ67A1XXh3aq7Pq8nsBDeYzB KMzDSCmVEWtCNO8SByhzV+xRe9PLwpEKYqvTyCSsAI6f3xh//Plv9vQOj+23FwEe9WpFSHI QryPaf4RHZx3nZTfNTTSEihnw1YDfCHlh0EGxh6OdoCO36V2bWrqkK1gVruiM6rPUeZT3Mz khyJ9mbojraMg7JhuhA7lpWNHuo4GPvYzXwfPd4wkHrGhrSJH9MJNlg8G7n8UadC65Is58g EQnU2n0fz13yybYwgDizPtlbzrlXifi5Sno9csa X-QQ-GoodBg: 2 From: Yixuan Cao To: akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Yixuan Cao Subject: [PATCH] mm: fix the type of a parameter Date: Thu, 2 Dec 2021 02:12:36 +0800 Message-Id: <20211201181236.2315-1-caoyixuan2019@email.szu.edu.cn> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:email.szu.edu.cn:qybgforeign:qybgforeign6 X-QQ-Bgrelay: 1 X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: CCEBD9000257 X-Stat-Signature: bbaj3znzy5n8ayr1a5c7zk561kzhy79b Authentication-Results: imf29.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=email.szu.edu.cn; spf=pass (imf29.hostedemail.com: domain of caoyixuan2019@email.szu.edu.cn designates 54.204.34.130 as permitted sender) smtp.mailfrom=caoyixuan2019@email.szu.edu.cn X-HE-Tag: 1638382409-266411 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: The type of "last_migrate_reason" in struct page_owner is short. However, the type of "reason" in the argument list of following functions __set_page_owner_migrate_reason set_page_owner_migrate_reason is int, which is inconsistent. Signed-off-by: Yixuan Cao --- include/linux/page_owner.h | 6 +++--- mm/page_owner.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/linux/page_owner.h b/include/linux/page_owner.h index 119a0c9d2a8b..c537315ec02f 100644 --- a/include/linux/page_owner.h +++ b/include/linux/page_owner.h @@ -13,7 +13,7 @@ extern void __set_page_owner(struct page *page, unsigned short order, gfp_t gfp_mask); extern void __split_page_owner(struct page *page, unsigned int nr); extern void __folio_copy_owner(struct folio *newfolio, struct folio *old); -extern void __set_page_owner_migrate_reason(struct page *page, int reason); +extern void __set_page_owner_migrate_reason(struct page *page, short reason); extern void __dump_page_owner(const struct page *page); extern void pagetypeinfo_showmixedcount_print(struct seq_file *m, pg_data_t *pgdat, struct zone *zone); @@ -41,7 +41,7 @@ static inline void folio_copy_owner(struct folio *newfolio, struct folio *old) if (static_branch_unlikely(&page_owner_inited)) __folio_copy_owner(newfolio, old); } -static inline void set_page_owner_migrate_reason(struct page *page, int reason) +static inline void set_page_owner_migrate_reason(struct page *page, short reason) { if (static_branch_unlikely(&page_owner_inited)) __set_page_owner_migrate_reason(page, reason); @@ -66,7 +66,7 @@ static inline void split_page_owner(struct page *page, static inline void folio_copy_owner(struct folio *newfolio, struct folio *folio) { } -static inline void set_page_owner_migrate_reason(struct page *page, int reason) +static inline void set_page_owner_migrate_reason(struct page *page, short reason) { } static inline void dump_page_owner(const struct page *page) diff --git a/mm/page_owner.c b/mm/page_owner.c index 4f924957ce7a..4c23e910caf9 100644 --- a/mm/page_owner.c +++ b/mm/page_owner.c @@ -182,7 +182,7 @@ noinline void __set_page_owner(struct page *page, unsigned short order, __set_page_owner_handle(page_ext, handle, order, gfp_mask); } -void __set_page_owner_migrate_reason(struct page *page, int reason) +void __set_page_owner_migrate_reason(struct page *page, short reason) { struct page_ext *page_ext = lookup_page_ext(page); struct page_owner *page_owner;