Re: [PATCH 10/10] [RESEND 3] dma/contiguous: avoid warning about unused size_bytes
From: Andy Shevchenko
Date: Wed Apr 09 2025 - 10:48:56 EST
On Wed, Apr 09, 2025 at 04:35:57PM +0200, Marek Szyprowski wrote:
> On 09.04.2025 14:24, Arnd Bergmann wrote:
> > From: Arnd Bergmann <arnd@xxxxxxxx>
> >
> > When building with W=1, this variable is unused for configs with
> > CONFIG_CMA_SIZE_SEL_PERCENTAGE=y:
> >
> > kernel/dma/contiguous.c:67:26: error: 'size_bytes' defined but not used [-Werror=unused-const-variable=]
> >
> > Change this to a macro to avoid the warning.
> > -static const phys_addr_t size_bytes __initconst =
> > - (phys_addr_t)CMA_SIZE_MBYTES * SZ_1M;
> > +#define size_bytes (CMA_SIZE_MBYTES * SZ_1M)
This had phys_addr_t type before, do we still have the platforms when it can be
bigger than 32-bit integer?
--
With Best Regards,
Andy Shevchenko