Re: [PATCH 30/46] of: reserved_mem: Add code to use unflattened DT for reserved_mem nodes

From: kernel test robot
Date: Sun Jan 28 2024 - 01:06:36 EST


Hi Oreoluwa,

kernel test robot noticed the following build warnings:

[auto build test WARNING on robh/for-next]
[also build test WARNING on arm64/for-next/core vgupta-arc/for-curr powerpc/next powerpc/fixes jcmvbkbc-xtensa/xtensa-for-next linus/master v6.8-rc1 next-20240125]
[cannot apply to vgupta-arc/for-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Oreoluwa-Babatunde/of-reserved_mem-Change-the-order-that-reserved_mem-regions-are-stored/20240127-081735
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
patch link: https://lore.kernel.org/r/20240126235425.12233-31-quic_obabatun%40quicinc.com
patch subject: [PATCH 30/46] of: reserved_mem: Add code to use unflattened DT for reserved_mem nodes
config: arm-randconfig-r133-20240127 (https://download.01.org/0day-ci/archive/20240128/202401281304.tsu89Kcm-lkp@xxxxxxxxx/config)
compiler: arm-linux-gnueabi-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20240128/202401281304.tsu89Kcm-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202401281304.tsu89Kcm-lkp@xxxxxxxxx/

sparse warnings: (new ones prefixed by >>)
>> kernel/dma/coherent.c:371:34: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned long node @@ got struct device_node *node @@
kernel/dma/coherent.c:371:34: sparse: expected unsigned long node
kernel/dma/coherent.c:371:34: sparse: got struct device_node *node
kernel/dma/coherent.c:378:33: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned long node @@ got struct device_node *node @@
kernel/dma/coherent.c:378:33: sparse: expected unsigned long node
kernel/dma/coherent.c:378:33: sparse: got struct device_node *node

vim +371 kernel/dma/coherent.c

7bfa5ab6fa1b18 drivers/base/dma-coherent.c Marek Szyprowski 2014-10-13 362
7bfa5ab6fa1b18 drivers/base/dma-coherent.c Marek Szyprowski 2014-10-13 363 static int __init rmem_dma_setup(struct reserved_mem *rmem)
7bfa5ab6fa1b18 drivers/base/dma-coherent.c Marek Szyprowski 2014-10-13 364 {
b81d457b174810 kernel/dma/coherent.c Oreoluwa Babatunde 2024-01-26 365 struct device_node *node = rmem->dev_node;
7bfa5ab6fa1b18 drivers/base/dma-coherent.c Marek Szyprowski 2014-10-13 366
b81d457b174810 kernel/dma/coherent.c Oreoluwa Babatunde 2024-01-26 367 if (of_get_property(node, "reusable", NULL))
7bfa5ab6fa1b18 drivers/base/dma-coherent.c Marek Szyprowski 2014-10-13 368 return -EINVAL;
7bfa5ab6fa1b18 drivers/base/dma-coherent.c Marek Szyprowski 2014-10-13 369
7bfa5ab6fa1b18 drivers/base/dma-coherent.c Marek Szyprowski 2014-10-13 370 #ifdef CONFIG_ARM
7bfa5ab6fa1b18 drivers/base/dma-coherent.c Marek Szyprowski 2014-10-13 @371 if (!of_get_flat_dt_prop(node, "no-map", NULL)) {
7bfa5ab6fa1b18 drivers/base/dma-coherent.c Marek Szyprowski 2014-10-13 372 pr_err("Reserved memory: regions without no-map are not yet supported\n");
7bfa5ab6fa1b18 drivers/base/dma-coherent.c Marek Szyprowski 2014-10-13 373 return -EINVAL;
7bfa5ab6fa1b18 drivers/base/dma-coherent.c Marek Szyprowski 2014-10-13 374 }
70d6aa0ecfed25 kernel/dma/coherent.c Christoph Hellwig 2021-06-24 375 #endif
93228b44c33a57 drivers/base/dma-coherent.c Vladimir Murzin 2017-06-26 376

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