]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
dma-mapping: avoid potential unused data compilation warning
authorMarek Szyprowski <m.szyprowski@samsung.com>
Tue, 15 Apr 2025 07:56:59 +0000 (09:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Jun 2025 12:37:54 +0000 (14:37 +0200)
commit41c810a0647079ca0b5bf2f408030c8bc5df3300
treebf858dbf530ab6265469c4a385f0323a0503f61f
parent02d2d6caee3abc9335cfca35f8eb4492173ae6f2
dma-mapping: avoid potential unused data compilation warning

[ Upstream commit c9b19ea63036fc537a69265acea1b18dabd1cbd3 ]

When CONFIG_NEED_DMA_MAP_STATE is not defined, dma-mapping clients might
report unused data compilation warnings for dma_unmap_*() calls
arguments. Redefine macros for those calls to let compiler to notice that
it is okay when the provided arguments are not used.

Reported-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Suggested-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20250415075659.428549-1-m.szyprowski@samsung.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/linux/dma-mapping.h