Re: [PATCH 2/9] mm/gup: break out gup_flush_pages() helper
From: Rik van Riel
Date: Thu Nov 26 2026 - 12:41:41 EST
On Thu, 2026-11-26 at 14:41 +0100, David Hildenbrand (Arm) wrote:
> On 11/23/26 20:56, Rik van Riel wrote:
>
>
> > +static void gup_flush_pages(struct vm_area_struct *vma, unsigned
> > long address,
> > + struct page **pages, unsigned long nr_pages)
> > +{
> > + unsigned long i;
> > +
> > + if (!pages)
> > + return;
>
>
> Will this ever be called in this series on !pages?
>
> If not, remove it.
The splitting of the two helpers means this is
only called from one spot now. That means we
should check for !pages either in the caller,
which is already long, or here.
I'll remove the duplicate, and I'll remove the
unnecessary comments you pointed out both for
this patch, and for the others.
The comment above the gup_flush_pages call
could probably be shortened, too.
--
All Rights Reversed.