Re: [PATCH v5 5/8] mm/gup: break out gup_lookup_pte() helper

From: Lorenzo Stoakes (ARM)

Date: Fri Nov 20 2026 - 12:33:36 EST


On Thu, Nov 19, 2026 at 10:04:04PM -0500, Rik van Riel wrote:
> On Tue, 2026-11-17 at 13:48 +0000, Lorenzo Stoakes (ARM) wrote:
> >
> > > + need_no_page_table = true;
> >
> > This is set true but not used anywhere? This is dead code no? Am I
> > missing
> > something?
> >
> > Patches should be incremental but adding completely useless locals
> > incrementally
> > seems silly?
> >
> > > + }
> > > +
> > >   pte_unmap_unlock(ptep, ptl);
> > >   return ret;
> >
> > I'm guessing you forgot to include the code that works with
> > need_no_page_table here?
>
> That code is in patch 7. The check isn't needed
> yet in patch 5, and it got shuffled wrong during
> some refactoring.
>
> In v6 the need_no_page_table thing will be in
> patch 7.

Right, I think I need to see it in context to judge really :) but obviously we
can't be introducing completely dead code like that, even incrementally.

>
> >
> > 'need_no_page_table' isn't a great name either. Maybe is_none or
> > something?
> >
> Maybe pte_is_none?

OK, let's see how that looks in context.

Since you've not replied to the rest of the reviews I will assume implicit 'ack,
will do's or what not on those? ;)

--
Cheers, Lorenzo