lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <3f3ed85e-187b-4b06-812b-fe34e23511d9@app.fastmail.com>
Date: Wed, 09 Apr 2025 16:51:40 +0200
From: "Arnd Bergmann" <arnd@...db.de>
To: "Andy Shevchenko" <andriy.shevchenko@...ux.intel.com>,
 "Marek Szyprowski" <m.szyprowski@...sung.com>
Cc: "Arnd Bergmann" <arnd@...nel.org>,
 "Michal Nazarewicz" <mina86@...a86.com>,
 "Kyungmin Park" <kyungmin.park@...sung.com>,
 "Krzysztof Kozlowski" <krzysztof.kozlowski@...aro.org>,
 "Robin Murphy" <robin.murphy@....com>, iommu@...ts.linux.dev,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH 10/10] [RESEND 3] dma/contiguous: avoid warning about unused
 size_bytes

On Wed, Apr 9, 2025, at 16:43, Andy Shevchenko wrote:
> 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@...db.de>
>> >
>> > 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?

It can certainly be larger on 64-bit systems, I think I messed it
up. Marek, can you fix this to put back the cast, or should I
send a patch on top?

      Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ