[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202108271704.mpfHHqNa-lkp@intel.com>
Date: Fri, 27 Aug 2021 17:04:12 +0800
From: kernel test robot <lkp@...el.com>
To: Kelvin Cheung <keguang.zhang@...il.com>
Cc: llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
linux-kernel@...r.kernel.org, Vinod Koul <vkoul@...nel.org>
Subject: [vkoul-dmaengine:next 73/85] drivers/dma/loongson1-dma.c:359:10:
warning: variable 'ret' is uninitialized when used here
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git next
head: 91604f11f3a0b3b3e6914e5111f0441b325c3391
commit: ad0fe14e164970fe9c2ab03b7a6ce452435239c6 [73/85] dmaengine: Loongson1: Add Loongson1 dmaengine driver
config: mips-randconfig-r025-20210827 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 1076082a0d97bd5c16a25ee7cf3dbb6ee4b5a9fe)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git/commit/?id=ad0fe14e164970fe9c2ab03b7a6ce452435239c6
git remote add vkoul-dmaengine https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git
git fetch --no-tags vkoul-dmaengine next
git checkout ad0fe14e164970fe9c2ab03b7a6ce452435239c6
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
>> drivers/dma/loongson1-dma.c:359:10: warning: variable 'ret' is uninitialized when used here [-Wuninitialized]
return ret;
^~~
drivers/dma/loongson1-dma.c:354:9: note: initialize the variable 'ret' to silence this warning
int ret;
^
= 0
drivers/dma/loongson1-dma.c:434:28: error: no member named 'slave_map' in 'struct plat_ls1x_dma'
ddev->filter.map = pdata->slave_map;
~~~~~ ^
drivers/dma/loongson1-dma.c:435:31: error: no member named 'slavecnt' in 'struct plat_ls1x_dma'
ddev->filter.mapcnt = pdata->slavecnt;
~~~~~ ^
1 warning and 2 errors generated.
vim +/ret +359 drivers/dma/loongson1-dma.c
347
348 static int ls1x_dma_chan_probe(struct platform_device *pdev,
349 struct ls1x_dma *dma, int chan_id)
350 {
351 struct device *dev = &pdev->dev;
352 struct ls1x_dma_chan *chan = &dma->chan[chan_id];
353 char *irq_name;
354 int ret;
355
356 chan->irq = platform_get_irq(pdev, chan_id);
357 if (chan->irq < 0) {
358 dev_err(dev, "failed to get IRQ %d!\n", chan->irq);
> 359 return ret;
360 }
361
362 irq_name = devm_kasprintf(dev, GFP_KERNEL, "%s:ch%u",
363 dev_name(dev), chan_id);
364 if (!irq_name)
365 return -ENOMEM;
366
367 ret = devm_request_irq(dev, chan->irq, ls1x_dma_irq_handler,
368 IRQF_SHARED, irq_name, chan);
369 if (ret) {
370 dev_err(dev, "failed to request IRQ %u!\n", chan->irq);
371 return ret;
372 }
373
374 chan->id = chan_id;
375 chan->reg_base = dma->reg_base;
376 chan->vchan.desc_free = ls1x_dma_free_desc;
377 vchan_init(&chan->vchan, &dma->ddev);
378 dev_info(dev, "channel %d (irq %d) initialized\n", chan->id, chan->irq);
379
380 return 0;
381 }
382
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (30001 bytes)
Powered by blists - more mailing lists