]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
dma/contiguous: avoid warning about unused size_bytes
authorArnd Bergmann <arnd@arndb.de>
Wed, 9 Apr 2025 15:15:42 +0000 (17:15 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 May 2025 05:44:29 +0000 (07:44 +0200)
commitad03f3f852dffc878d5c95fa73d4eec12ce70dc0
tree2b3db1cbf5a46b01b731e7d7e4a91bda882f9cd7
parentc049376c76d144b49aeb7b2cdf060a028859948b
dma/contiguous: avoid warning about unused size_bytes

[ Upstream commit d7b98ae5221007d3f202746903d4c21c7caf7ea9 ]

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.

Fixes: c64be2bb1c6e ("drivers: add Contiguous Memory Allocator")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Link: https://lore.kernel.org/r/20250409151557.3890443-1-arnd@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/dma/contiguous.c