Re: [PATCH v1 1/1] drm/i915/gem: Use simpler versions of min*()
From: Andy Shevchenko
Date: Wed Aug 26 2026 - 04:44:07 EST
On Tue, Aug 25, 2026 at 03:44:40PM +0200, Andi Shyti wrote:
> On Tue, Aug 25, 2026 at 11:35:52AM +0200, Andy Shevchenko wrote:
...
> > - nr_pages = min_array(((unsigned long[]) {
> > - folio_nr_pages(folio),
> > - page_count - i,
> > - max_segment / PAGE_SIZE,
> > - }), 3);
> > + nr_pages = min3(folio_nr_pages(folio),
> > + page_count - i, max_segment / PAGE_SIZE);
>
> thanks for your patch, but there is another patch involving (and
> fixing) this line of code[*]. You are welcome to join the review.
Thanks for pointing this out! Do you prefer my to be rebased on top?
Otherwise one can apply this patch first.
> [*] https://patchwork.freedesktop.org/patch/746877/?series=172332&rev=1
Note, my patch doesn't change existing behaviour.
--
With Best Regards,
Andy Shevchenko