public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Kelvin Cheung <keguang.zhang@gmail.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	linux-kernel@vger.kernel.org, Vinod Koul <vkoul@kernel.org>
Subject: [vkoul-dmaengine:next 73/85] drivers/dma/loongson1-dma.c:359:10: warning: variable 'ret' is uninitialized when used here
Date: Fri, 27 Aug 2021 17:04:12 +0800	[thread overview]
Message-ID: <202108271704.mpfHHqNa-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 3390 bytes --]

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@intel.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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 30001 bytes --]

                 reply	other threads:[~2021-08-27  9:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202108271704.mpfHHqNa-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=keguang.zhang@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox