[PATCH v3 3/7] mm: Implement for_each_valid_pfn() for CONFIG_SPARSEMEM
David Woodhouse
dwmw2 at infradead.org
Wed Apr 23 05:05:14 PDT 2025
On Wed, 2025-04-23 at 14:11 +0300, Mike Rapoport wrote:
>
> Looks like it's a leftover from one of the previous versions.
>
> > #ifndef for_each_valid_pfn
> > -#define for_each_valid_pfn(pfn, start_pfn,
> > end_pfn) \
> > - for ((pfn) = max_t(unsigned long, (start_pfn),
> > ARCH_PFN_OFFSET); \
> > - (pfn) < min_t(unsigned long,
> > (end_pfn), \
> > - ARCH_PFN_OFFSET +
> > max_mapnr); \
> > - (pfn)++)
> > +#define for_each_valid_pfn(pfn, start_pfn,
> > end_pfn) \
> > + for (pfn = max_t(unsigned long, start_pfn,
> > ARCH_PFN_OFFSET); \
> > + pfn < min_t(unsigned long, end_pfn, ARCH_PFN_OFFSET +
> > max_mapnr); \
> > + pfn++)
>
> And this one is probably a rebase artifact?
>
> With FLATMEM changes dropped
Oops, that was a result of me attempting to keep the SPARSEMEM thing in
two commits — the one you'd previously reviewed, and then the
'optimisation', as discussed.
And then giving up on it and just resetting to the previous 'optimised'
version in a single commit... and failing to realise that in doing so I
was also reverting the cleanups I'd done to the flatmem version.
Will fix that; thanks.
> This-revision-also-reviewed-by: Mike Rapoport (Microsoft) <rppt at kernel.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5069 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20250423/0075ffcd/attachment.p7s>
More information about the linux-arm-kernel
mailing list