From patchwork Mon Jul 1 03:40:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhao Mengmeng X-Patchwork-Id: 13717535 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 802F9C3065B for ; Mon, 1 Jul 2024 03:41:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DD4126B008C; Sun, 30 Jun 2024 23:41:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D5CDD6B0092; Sun, 30 Jun 2024 23:41:30 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BD6376B0095; Sun, 30 Jun 2024 23:41:30 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 998A66B008C for ; Sun, 30 Jun 2024 23:41:30 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 445494089E for ; Mon, 1 Jul 2024 03:41:30 +0000 (UTC) X-FDA: 82289783940.04.FB4D0A4 Received: from mailgw.kylinos.cn (mailgw.kylinos.cn [124.126.103.232]) by imf28.hostedemail.com (Postfix) with ESMTP id 49ED2C0016 for ; Mon, 1 Jul 2024 03:41:26 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf28.hostedemail.com: domain of zhaomengmeng@kylinos.cn designates 124.126.103.232 as permitted sender) smtp.mailfrom=zhaomengmeng@kylinos.cn ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1719805268; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references; bh=Sx0np1mfAPdvsE8QQMnbol2Qg3YQv4TMt4aGyhutA1A=; b=gu6ghFhpe//Y/CpVDoU5kwPQGVBDHE+PekzM4a/SQhefJbhXdW0pN/tWicUv+rMAnjZHcg iJ3XTi7rDqjqypQY6HQTGxaS6xSKEWj4xWtPGu6oTgiaYhjDHQ86MrKJ70CDQ8MR7YnlDc bY7HVSYqo7v8J7JYfnsl3OWgMW3MNRY= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1719805268; a=rsa-sha256; cv=none; b=odifkx6ktfR+CHt8wYTl9R81Y7FXSdz5Xcuea2pCsU5hqh5I6p9XrYaiaeYPO13SMsbpm9 Q04fmAlGDkjmiNS+6eVJ0LnW5dLc14Q7gyEBV7mLpAEcr1Ywe8KwRznkrO+mre7mSLHu1R RfUAJ8faNhcntHhxDPa81/58KkBnWOE= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf28.hostedemail.com: domain of zhaomengmeng@kylinos.cn designates 124.126.103.232 as permitted sender) smtp.mailfrom=zhaomengmeng@kylinos.cn X-UUID: c5b985cc375b11ef93f4611109254879-20240701 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.38,REQID:b4ced21e-6492-4fc9-aedd-e54a5c760c26,IP:0,U RL:0,TC:0,Content:-5,EDM:-25,RT:0,SF:-9,FILE:0,BULK:0,RULE:Release_Ham,ACT ION:release,TS:-39 X-CID-INFO: VERSION:1.1.38,REQID:b4ced21e-6492-4fc9-aedd-e54a5c760c26,IP:0,URL :0,TC:0,Content:-5,EDM:-25,RT:0,SF:-9,FILE:0,BULK:0,RULE:EDM_GE969F26,ACTI ON:release,TS:-39 X-CID-META: VersionHash:82c5f88,CLOUDID:a7ca31e2781213daf043e2d3116a8573,BulkI D:24070111381932D88IRB,BulkQuantity:1,Recheck:0,SF:43|74|66|38|24|17|19|10 2,TC:nil,Content:0,EDM:1,IP:1,URL:1,File:nil,RT:nil,Bulk:40,QS:nil,BEC:nil ,COL:0,OSI:0,OSA:0,AV:0,LES:1,SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0 X-CID-BVR: 0 X-CID-BAS: 0,_,0,_ X-CID-FACTOR: TF_CID_SPAM_FAS,TF_CID_SPAM_FSD,TF_CID_SPAM_FSI,TF_CID_SPAM_IBB, TF_CID_SPAM_ULS,TF_CID_SPAM_SNR X-UUID: c5b985cc375b11ef93f4611109254879-20240701 X-User: zhaomengmeng@kylinos.cn Received: from localhost.localdomain [(123.150.8.42)] by mailgw.kylinos.cn (envelope-from ) (Generic MTA with TLSv1.3 TLS_AES_256_GCM_SHA384 256/256) with ESMTP id 925970037; Mon, 01 Jul 2024 11:41:17 +0800 From: Zhao Mengmeng To: akpm@linux-foundation.org, yang@os.amperecomputing.com Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH v1] mm: gup: add forward declaration for try_grab_folio_fast Date: Mon, 1 Jul 2024 11:40:52 +0800 Message-Id: <20240701034052.9988-1-zhaomengmeng@kylinos.cn> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 X-Rspamd-Queue-Id: 49ED2C0016 X-Stat-Signature: 85uadpem5pmppzpn4w5ce3jb14ah67ru X-Rspamd-Server: rspam09 X-Rspam-User: X-HE-Tag: 1719805286-30999 X-HE-Meta: U2FsdGVkX18illuUwlOkLVBl4dTXAsU3PH04U3W4upwwKwLTBksbPwmDh3zXUFjkVfKBAKPElOHbaZllwpSoccWOzkMhln91vzyspwcvRUAI53+2AIqMBZfgt0vxRxrTZkbUZTI8cFgG8o4Fbx9SuSFv7xFz6D4npEpZPI4IGWTqvIynJIt/jwTrk+W4O55HHmOxAhbEHhpggyS3vU5j/nWqcVgjD9nM2sFPqSjaoXsGgdoAsaEG0UfwruDzKDkZJZk1gZz+pspGCWlhpWWvaLyPFM3aAeD4FzevlSa/mZfMlYt13UNwr+rZVFawah4WLjM/2/JBL+nNo6MZ/b640pT+Q0G3U8DpIdnQ1e8CTZdomTouvURP4QlE32kftf1B73ziCKt/IZZYHBOzOAaazc0G6Pa14N8E7hYp1w9VAzIkyyRd5eXJ7xRthN/KeXqq+9lKy/6AuKqXwFRfnHkXAbyO+DHMnbrtnmOhORtjYLb9Qovl21k+5NRRe5NW0S/zSVcbbB65l6GpIG2qFpa9Irck/0qPi9i+5+KfLWRZq9gk3cC2GWnnQh1r8qOoXTDpNU3XM7FR36M29cx1wcRqg0CtdJrZWYw3mRp9iE0VhZl9FdsnghAtkfBjMYDOv26SYb0tVS+J8RzvyF1l646CxVeG5vuKwuGGMNo5nrwtxhUYSDpQmi+2oVLfNwjq/sD0h6n5KJn3f/i3kBu9JhzkgqVDErzl347K8s3Po+1PEIOZxUTg53tSLt4eBoOB5wlMAPVv+S4dNFgkWtXxfAzX7bLy5ZpU0bjSYUgFqOcdNT4xUu4rvZdu9gFvM6igylrU2IsBHbQY+aADDx4eWGK+xxhetXCZn9biRHkY5p3R/afSc+pjsRgT+nQfrHuZf25HGHQVmKgV7MDGjhsD8T0lxBKvRg3w7P8yr/QgNIZV+/BLsyLCWbyoPGjuWu++7qV5uAyN4/AGDH0eSTGW/Y8 oSTkHMOq kvAzubYw4CnUXyz2DXjC7r58EUbIyW+oen0tC2BLKSZ8RPPQZlG+BQK7JqGvscwlsGOZh2P+EJn+Rvcf/RQMnAwmEdJW+b0oL0dZqkn6bSMz4O7x1beneot5rQO+x6XEfj7uFOnOiibmK3Av+c3tdaZD5r5IhPAC+aS2T 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: List-Subscribe: List-Unsubscribe: try_grab_folio_fast() was used in gup_hugepte(), while itself was defined after gup_hugepte(), so add a forward declaration to eliminate the -Wimplicit-function-declaration warning. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202407010039.D3sIu3fu-lkp@intel.com/ Signed-off-by: Zhao Mengmeng --- mm/gup.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mm/gup.c b/mm/gup.c index 7439359d0b71..222b83a87d7d 100644 --- a/mm/gup.c +++ b/mm/gup.c @@ -488,6 +488,9 @@ static unsigned long hugepte_addr_end(unsigned long addr, unsigned long end, return (__boundary - 1 < end - 1) ? __boundary : end; } +static struct folio *try_grab_folio_fast(struct page *page, int refs, + unsigned int flags); + /* * Returns 1 if succeeded, 0 if failed, -EMLINK if unshare needed. *