linux-stable/include
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
..
acpi ACPI: APEI: explicit init of HEST and GHES in apci_init() 2023-09-19 12:20:28 +02:00
asm-generic asm-generic: qspinlock: fix queued_spin_value_unlocked() implementation 2023-12-20 15:44:35 +01:00
clocksource
crypto crypto: af_alg - Disallow multiple in-flight AIO requests 2024-01-25 14:37:42 -08:00
drm drm/bridge: Fix typo in post_disable() description 2024-01-25 14:37:46 -08:00
dt-bindings dt-bindings: clock: Update the videocc resets for sm8150 2024-01-25 14:37:48 -08:00
keys
kunit
kvm
linux dma-mapping: Fix build error unused-value 2024-01-25 14:37:50 -08:00
math-emu
media media: v4l2-mem2mem: add lock to protect parameter num_rdy 2023-08-26 15:26:44 +02:00
memory
misc
net Bluetooth: Fix bogus check for re-auth no supported with non-ssp 2024-01-25 14:37:46 -08:00
pcmcia
ras
rdma RDMA/cma: Always set static rate to 0 for RoCE 2023-06-21 15:45:39 +02:00
scsi Revert "scsi: core: Add scsi_prot_ref_tag() helper" 2024-01-12 20:56:38 +01:00
soc
sound ASoC: soc-card: Add storage for PCI SSID 2023-11-28 16:54:51 +00:00
target
trace neighbor: tracing: Move pin6 inside CONFIG_IPV6=y section 2023-10-25 11:54:20 +02:00
uapi bpf: Add crosstask check to __bpf_get_stack 2024-01-25 14:37:43 -08:00
vdso
video
xen