OpenCloudOS-Kernel/drivers/dma/qcom
Arnd Bergmann 0bd1bf86ab dmaengine: qcom: fix gpi undefined behavior
gcc points out an incorrect error handling loop:

drivers/dma/qcom/gpi.c: In function 'gpi_ch_init':
drivers/dma/qcom/gpi.c:1254:15: error: iteration 2 invokes undefined behavior [-Werror=aggressive-loop-optimizations]
 1254 |  struct gpii *gpii = gchan->gpii;
      |               ^~~~
drivers/dma/qcom/gpi.c:1951:2: note: within this loop
 1951 |  for (i = i - 1; i >= 0; i++) {
      |  ^~~

Change the loop to correctly walk backwards through the
initialized fields rather than off into the woods.

Fixes: 5d0c3533a1 ("dmaengine: qcom: Add GPI dma driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20210103135738.3741123-1-arnd@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2021-01-04 18:08:36 +05:30
..
Kconfig dmaengine: qcom: Add GPI dma driver 2020-11-24 21:42:07 +05:30
Makefile dmaengine: qcom: Add GPI dma driver 2020-11-24 21:42:07 +05:30
bam_dma.c qcom: bam_dma: Delete useless kfree code 2020-12-29 10:08:00 +05:30
gpi.c dmaengine: qcom: fix gpi undefined behavior 2021-01-04 18:08:36 +05:30
hidma.c dmaengine: qcom: convert tasklets to use new tasklet_setup() API 2020-09-18 12:19:07 +05:30
hidma.h dmaengine updates for v5.3-rc1 2019-07-17 09:55:43 -07:00
hidma_dbg.c dmaengine updates for v5.3-rc1 2019-07-17 09:55:43 -07:00
hidma_ll.c dmaengine: qcom: convert tasklets to use new tasklet_setup() API 2020-09-18 12:19:07 +05:30
hidma_mgmt.c dmaengine: qcom: hidma_mgmt: Add of_node_put() before goto 2019-08-08 17:56:50 +05:30
hidma_mgmt.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 284 2019-06-05 17:36:37 +02:00
hidma_mgmt_sys.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 284 2019-06-05 17:36:37 +02:00
qcom_adm.c dmaengine: qcom: Fix ADM driver kerneldoc markup 2020-12-11 19:06:47 +05:30