drivers/dma/idxd/device.c:774:8-26: WARNING: dma_alloc_coherent used in (fwd)

From: Julia Lawall
Date: Sun May 28 2023 - 14:59:41 EST


The warning suggests that the memset in idxd_device_evl_setup may not be
needed. There is a possibility of allocation via function pointer,
though, in dma_alloc_attrs, so I don't know what the possibilities are
in this case.

julia

---------- Forwarded message ----------
Date: Mon, 29 May 2023 01:34:17 +0800
From: kernel test robot <lkp@xxxxxxxxx>
To: oe-kbuild@xxxxxxxxxxxxxxx
Cc: lkp@xxxxxxxxx, Julia Lawall <julia.lawall@xxxxxxxx>
Subject: drivers/dma/idxd/device.c:774:8-26: WARNING: dma_alloc_coherent used in

BCC: lkp@xxxxxxxxx
CC: oe-kbuild-all@xxxxxxxxxxxxxxx
CC: linux-kernel@xxxxxxxxxxxxxxx
TO: Dave Jiang <dave.jiang@xxxxxxxxx>
CC: Vinod Koul <vkoul@xxxxxxxxxx>
CC: Fenghua Yu <fenghua.yu@xxxxxxxxx>

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 7877cb91f1081754a1487c144d85dc0d2e2e7fc4
commit: 244da66cda359227d80ccb41dbcb99da40eae186 dmaengine: idxd: setup event log configuration
date: 7 weeks ago
:::::: branch date: 6 hours ago
:::::: commit date: 7 weeks ago
config: x86_64-randconfig-c022-20230528 (https://download.01.org/0day-ci/archive/20230529/202305290109.qddh20pB-lkp@xxxxxxxxx/config)
compiler: gcc-11 (Debian 11.3.0-12) 11.3.0

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Reported-by: Julia Lawall <julia.lawall@xxxxxxxx>
| Closes: https://lore.kernel.org/r/202305290109.qddh20pB-lkp@xxxxxxxxx/

cocci warnings: (new ones prefixed by >>)
>> drivers/dma/idxd/device.c:774:8-26: WARNING: dma_alloc_coherent used in
/*
>> * Address needs to be page aligned. However, dma_alloc_coherent() provides
>> * at minimal page size aligned address. No manual alignment required.
*/
>> addr already zeroes out memory, so memset is not needed

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki