* [PATCH v1] mm: gup: add forward declaration for try_grab_folio_fast
@ 2024-07-01 3:40 Zhao Mengmeng
2024-07-01 7:16 ` David Hildenbrand
0 siblings, 1 reply; 3+ messages in thread
From: Zhao Mengmeng @ 2024-07-01 3:40 UTC (permalink / raw)
To: akpm, yang; +Cc: linux-mm, linux-kernel
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 <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202407010039.D3sIu3fu-lkp@intel.com/
Signed-off-by: Zhao Mengmeng <zhaomengmeng@kylinos.cn>
---
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.
*
--
2.33.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1] mm: gup: add forward declaration for try_grab_folio_fast
2024-07-01 3:40 [PATCH v1] mm: gup: add forward declaration for try_grab_folio_fast Zhao Mengmeng
@ 2024-07-01 7:16 ` David Hildenbrand
2024-07-01 9:23 ` Zhao Mengmeng
0 siblings, 1 reply; 3+ messages in thread
From: David Hildenbrand @ 2024-07-01 7:16 UTC (permalink / raw)
To: Zhao Mengmeng, akpm, yang; +Cc: linux-mm, linux-kernel
On 01.07.24 05:40, Zhao Mengmeng wrote:
> 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 <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202407010039.D3sIu3fu-lkp@intel.com/
> Signed-off-by: Zhao Mengmeng <zhaomengmeng@kylinos.cn>
> ---
> 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);
> +
This function should really be called "gup_fast_", just like all other
gup_fast_ specific functions. I might send some follow-up cleanups later.
--
Cheers,
David / dhildenb
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1] mm: gup: add forward declaration for try_grab_folio_fast
2024-07-01 7:16 ` David Hildenbrand
@ 2024-07-01 9:23 ` Zhao Mengmeng
0 siblings, 0 replies; 3+ messages in thread
From: Zhao Mengmeng @ 2024-07-01 9:23 UTC (permalink / raw)
To: David Hildenbrand, akpm, yang; +Cc: linux-mm, linux-kernel
On 2024/7/1 15:16, David Hildenbrand wrote:
> On 01.07.24 05:40, Zhao Mengmeng wrote:
>> 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 <lkp@intel.com>
>> Closes:
>> https://lore.kernel.org/oe-kbuild-all/202407010039.D3sIu3fu-lkp@intel.com/
>> Signed-off-by: Zhao Mengmeng <zhaomengmeng@kylinos.cn>
>> ---
>> 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);
>> +
>
> This function should really be called "gup_fast_", just like all other
> gup_fast_ specific functions. I might send some follow-up cleanups later.
>
Yeah, looking forward to your patch. Besides, I have seen Yang's fix in
https://lore.kernel.org/linux-mm/CAHbLzkowMSso-4Nufc9hcMehQsK9PNz3OSu-+eniU-2Mm-xjhA@mail.gmail.com/T/#m7ff03bf88814d8352052fbd8a1c90fee0ba5b576
and it is better. So sorry to bother you all.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-07-01 9:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-01 3:40 [PATCH v1] mm: gup: add forward declaration for try_grab_folio_fast Zhao Mengmeng
2024-07-01 7:16 ` David Hildenbrand
2024-07-01 9:23 ` Zhao Mengmeng
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox