Files
linux-stable-mirror/include/linux
Ren Zhijie c3b3389ad0 dma-mapping: Fix build error unused-value
commit 50d6281ce9 upstream.

If CONFIG_DMA_DECLARE_COHERENT is not set,
make ARCH=x86_64 CROSS_COMPILE=x86_64-linux-gnu- will be failed, like this:

drivers/remoteproc/remoteproc_core.c: In function ‘rproc_rvdev_release’:
./include/linux/dma-map-ops.h:182:42: error: statement with no effect [-Werror=unused-value]
 #define dma_release_coherent_memory(dev) (0)
                                          ^
drivers/remoteproc/remoteproc_core.c:464:2: note: in expansion of macro ‘dma_release_coherent_memory’
  dma_release_coherent_memory(dev);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

The return type of function dma_release_coherent_memory in CONFIG_DMA_DECLARE_COHERENT area is void, so in !CONFIG_DMA_DECLARE_COHERENT area it should neither return any value nor be defined as zero.

Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: e61c451476 ("dma-mapping: Add dma_release_coherent_memory to DMA API")
Signed-off-by: Ren Zhijie <renzhijie2@huawei.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20220630123528.251181-1-renzhijie2@huawei.com
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-01-25 14:37:50 -08:00
..
2022-08-21 15:16:16 +02:00
2022-10-26 13:25:35 +02:00
2023-10-10 21:53:37 +02:00
2023-12-20 15:44:30 +01:00
2023-12-08 08:46:15 +01:00
2023-10-25 11:54:20 +02:00
2022-10-26 13:25:42 +02:00
2023-03-17 08:45:07 +01:00
2023-03-17 08:45:07 +01:00
2022-08-21 15:16:08 +02:00
2022-08-21 15:15:21 +02:00
2023-01-04 11:39:16 +01:00
2023-11-20 11:06:46 +01:00
2023-06-21 15:45:38 +02:00
2023-08-26 15:26:57 +02:00
2024-01-25 14:37:40 -08:00
2023-11-28 16:54:53 +00:00
2023-10-25 11:54:13 +02:00
2023-10-25 11:54:13 +02:00
2023-05-17 11:48:09 +02:00