Re: [PATCH v7 3/3] dmaengine: add driver for Sophgo CV18XX/SG200X dmamux

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Inochi,

kernel test robot noticed the following build warnings:

[auto build test WARNING on vkoul-dmaengine/next]
[also build test WARNING on robh/for-next krzk-dt/for-next linus/master v6.9-rc3 next-20240410]
[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/Inochi-Amaoto/dt-bindings-dmaengine-Add-dma-multiplexer-for-CV18XX-SG200X-series-SoC/20240410-092207
base:   https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git next
patch link:    https://lore.kernel.org/r/IA1PR20MB495310B8E4D7A6705A112004BB062%40IA1PR20MB4953.namprd20.prod.outlook.com
patch subject: [PATCH v7 3/3] dmaengine: add driver for Sophgo CV18XX/SG200X dmamux
config: riscv-allyesconfig (https://download.01.org/0day-ci/archive/20240411/202404111148.YVXpdPke-lkp@xxxxxxxxx/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 8b3b4a92adee40483c27f26c478a384cd69c6f05)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240411/202404111148.YVXpdPke-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/202404111148.YVXpdPke-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

   In file included from drivers/dma/cv1800-dmamux.c:8:
   In file included from include/linux/of_dma.h:14:
   In file included from include/linux/dmaengine.h:12:
   In file included from include/linux/scatterlist.h:8:
   In file included from include/linux/mm.h:2208:
   include/linux/vmstat.h:508:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     508 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     509 |                            item];
         |                            ~~~~
   include/linux/vmstat.h:515:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     515 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     516 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
   include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     522 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
   include/linux/vmstat.h:527:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     527 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     528 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
   include/linux/vmstat.h:536:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     536 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     537 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
>> drivers/dma/cv1800-dmamux.c:191:22: warning: unused variable 'dma_master' [-Wunused-variable]
     191 |         struct device_node *dma_master;
         |                             ^~~~~~~~~~
   6 warnings generated.


vim +/dma_master +191 drivers/dma/cv1800-dmamux.c

   183	
   184	static int cv1800_dmamux_probe(struct platform_device *pdev)
   185	{
   186		struct device *dev = &pdev->dev;
   187		struct device_node *mux_node = dev->of_node;
   188		struct cv1800_dmamux_data *data;
   189		struct cv1800_dmamux_map *tmp;
   190		struct device *parent = dev->parent;
 > 191		struct device_node *dma_master;
   192		struct regmap *regmap = NULL;
   193		unsigned int i;
   194	
   195		if (!parent)
   196			return -ENODEV;
   197	
   198		regmap = device_node_to_regmap(parent->of_node);
   199		if (IS_ERR(regmap))
   200			return PTR_ERR(regmap);
   201	
   202		data = devm_kmalloc(dev, sizeof(*data), GFP_KERNEL);
   203		if (!data)
   204			return -ENOMEM;
   205	
   206		spin_lock_init(&data->lock);
   207		init_llist_head(&data->free_maps);
   208	
   209		for (i = 0; i <= MAX_DMA_CH_ID; i++) {
   210			tmp = devm_kmalloc(dev, sizeof(*tmp), GFP_KERNEL);
   211			if (!tmp) {
   212				/* It is OK for not allocating all channel */
   213				dev_warn(dev, "can not allocate channel %u\n", i);
   214				continue;
   215			}
   216	
   217			init_llist_node(&tmp->node);
   218			tmp->channel = i;
   219			llist_add(&tmp->node, &data->free_maps);
   220		}
   221	
   222		/* if no channel is allocated, the probe must fail */
   223		if (llist_empty(&data->free_maps))
   224			return -ENOMEM;
   225	
   226		data->regmap = regmap;
   227		data->dmarouter.dev = dev;
   228		data->dmarouter.route_free = cv1800_dmamux_free;
   229	
   230		platform_set_drvdata(pdev, data);
   231	
   232		return of_dma_router_register(mux_node,
   233					      cv1800_dmamux_route_allocate,
   234					      &data->dmarouter);
   235	}
   236	

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




[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux