public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Ramuthevar,
	Vadivel MuruganX"  <vadivel.muruganx.ramuthevar@linux.intel.com>,
	vigneshr@ti.com, tudor.ambarus@microchip.com,
	linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org,
	robh+dt@kernel.org
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
	boris.brezillon@collabora.com, devicetree@vger.kernel.org,
	miquel.raynal@bootlin.com, simon.k.r.goldschmidt@gmail.com,
	dinguyen@kernel.org
Subject: Re: [RESENDPATCH v15 2/2] mtd: rawnand: Add NAND controller support on Intel LGM SoC
Date: Fri, 30 Oct 2020 19:11:54 +0800	[thread overview]
Message-ID: <202010301951.kWtN9kGE-lkp@intel.com> (raw)
In-Reply-To: <20201026073021.33327-3-vadivel.muruganx.ramuthevar@linux.intel.com>

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

Hi "Ramuthevar,Vadivel,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.10-rc1 next-20201030]
[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]

url:    https://github.com/0day-ci/linux/commits/Ramuthevar-Vadivel-MuruganX/mtd-rawnand-Add-NAND-controller-support-on-Intel-LGM-SoC/20201026-153225
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 3650b228f83adda7e5ee532e2b90429c03f7b9ec
config: x86_64-randconfig-r023-20201030 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 772aaa602383cf82795572ebcd86b0e660f3579f)
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 x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://github.com/0day-ci/linux/commit/8d6004cac3a7ca929c7c0a49a0d02dceaf8fd5d2
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Ramuthevar-Vadivel-MuruganX/mtd-rawnand-Add-NAND-controller-support-on-Intel-LGM-SoC/20201026-153225
        git checkout 8d6004cac3a7ca929c7c0a49a0d02dceaf8fd5d2
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

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/mtd/nand/raw/intel-nand-controller.c:664:7: warning: variable 'mtd' is uninitialized when used here [-Wuninitialized]
           if (!mtd->name) {
                ^~~
   drivers/mtd/nand/raw/intel-nand-controller.c:590:22: note: initialize the variable 'mtd' to silence this warning
           struct mtd_info *mtd;
                               ^
                                = NULL
   1 warning generated.

vim +/mtd +664 drivers/mtd/nand/raw/intel-nand-controller.c

   584	
   585	static int ebu_nand_probe(struct platform_device *pdev)
   586	{
   587		struct device *dev = &pdev->dev;
   588		struct ebu_nand_controller *ebu_host;
   589		struct nand_chip *nand;
   590		struct mtd_info *mtd;
   591		struct resource *res;
   592		char *resname;
   593		int ret, i;
   594		u32 reg;
   595	
   596		ebu_host = devm_kzalloc(dev, sizeof(*ebu_host), GFP_KERNEL);
   597		if (!ebu_host)
   598			return -ENOMEM;
   599	
   600		ebu_host->dev = dev;
   601		nand_controller_init(&ebu_host->controller);
   602	
   603		res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "ebunand");
   604		ebu_host->ebu = devm_ioremap_resource(&pdev->dev, res);
   605		if (IS_ERR(ebu_host->ebu))
   606			return PTR_ERR(ebu_host->ebu);
   607	
   608		res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "hsnand");
   609		ebu_host->hsnand = devm_ioremap_resource(&pdev->dev, res);
   610		if (IS_ERR(ebu_host->hsnand))
   611			return PTR_ERR(ebu_host->hsnand);
   612	
   613		ret = device_property_read_u32(dev, "nand,cs", &reg);
   614		if (ret) {
   615			dev_err(dev, "failed to get chip select: %d\n", ret);
   616			return ret;
   617		}
   618		ebu_host->cs_num = reg;
   619	
   620		for (i = 0; i < MAX_CS; i++) {
   621			resname = devm_kasprintf(dev, GFP_KERNEL, "nand_cs%d", i);
   622			res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
   623							   resname);
   624			ebu_host->cs[i].chipaddr = devm_ioremap_resource(dev, res);
   625			ebu_host->cs[i].nand_pa = res->start;
   626			if (IS_ERR(ebu_host->cs[i].chipaddr))
   627				return PTR_ERR(ebu_host->cs[i].chipaddr);
   628		}
   629	
   630		ebu_host->clk = devm_clk_get(dev, NULL);
   631		if (IS_ERR(ebu_host->clk))
   632			return dev_err_probe(dev, PTR_ERR(ebu_host->clk),
   633					     "failed to get clock\n");
   634	
   635		ret = clk_prepare_enable(ebu_host->clk);
   636		if (ret) {
   637			dev_err(dev, "failed to enable clock: %d\n", ret);
   638			return ret;
   639		}
   640		ebu_host->clk_rate = clk_get_rate(ebu_host->clk);
   641	
   642		ebu_host->dma_tx = dma_request_chan(dev, "tx");
   643		if (IS_ERR(ebu_host->dma_tx))
   644			return dev_err_probe(dev, PTR_ERR(ebu_host->dma_tx),
   645					     "failed to request DMA tx chan!.\n");
   646	
   647		ebu_host->dma_rx = dma_request_chan(dev, "rx");
   648		if (IS_ERR(ebu_host->dma_rx))
   649			return dev_err_probe(dev, PTR_ERR(ebu_host->dma_rx),
   650					     "failed to request DMA rx chan!.\n");
   651	
   652		for (i = 0; i < MAX_CS; i++) {
   653			resname = devm_kasprintf(dev, GFP_KERNEL, "addr_sel%d", i);
   654			res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
   655							   resname);
   656			if (!res)
   657				return -EINVAL;
   658			ebu_host->cs[i].addr_sel = res->start;
   659			writel(ebu_host->cs[i].addr_sel | EBU_ADDR_MASK(5) |
   660			       EBU_ADDR_SEL_REGEN, ebu_host->ebu + EBU_ADDR_SEL(i));
   661		}
   662	
   663		nand_set_flash_node(&ebu_host->chip, dev->of_node);
 > 664		if (!mtd->name) {
   665			dev_err(ebu_host->dev, "NAND label property is mandatory\n");
   666			return -EINVAL;
   667		}
   668	
   669		mtd = nand_to_mtd(&ebu_host->chip);
   670		mtd->dev.parent = dev;
   671		ebu_host->dev = dev;
   672	
   673		platform_set_drvdata(pdev, ebu_host);
   674		nand_set_controller_data(&ebu_host->chip, ebu_host);
   675	
   676		nand = &ebu_host->chip;
   677		nand->controller = &ebu_host->controller;
   678		nand->controller->ops = &ebu_nand_controller_ops;
   679	
   680		/* Scan to find existence of the device */
   681		ret = nand_scan(&ebu_host->chip, 1);
   682		if (ret)
   683			goto err_cleanup_dma;
   684	
   685		ret = mtd_device_register(mtd, NULL, 0);
   686		if (ret)
   687			goto err_clean_nand;
   688	
   689		return 0;
   690	
   691	err_clean_nand:
   692		nand_cleanup(&ebu_host->chip);
   693	err_cleanup_dma:
   694		ebu_dma_cleanup(ebu_host);
   695		clk_disable_unprepare(ebu_host->clk);
   696	
   697		return ret;
   698	}
   699	

---
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: 42948 bytes --]

      parent reply	other threads:[~2020-10-30 11:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-26  7:30 [RESENDPATCH v15 0/2] mtd: rawnand: Add NAND controller support on Intel LGM SoC Ramuthevar,Vadivel MuruganX
2020-10-26  7:30 ` [RESENDPATCH v15 1/2] dt-bindings: mtd: Add Nand Flash Controller support for " Ramuthevar,Vadivel MuruganX
2020-10-26  7:30 ` [RESENDPATCH v15 2/2] mtd: rawnand: Add NAND controller support on " Ramuthevar,Vadivel MuruganX
2020-10-28 10:20   ` Miquel Raynal
2020-10-30  3:19     ` Ramuthevar, Vadivel MuruganX
2020-10-30  8:23       ` Miquel Raynal
2020-10-30 10:06         ` Ramuthevar, Vadivel MuruganX
2020-10-30 10:08         ` Ramuthevar, Vadivel MuruganX
2020-10-30 11:11   ` kernel test robot [this message]

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=202010301951.kWtN9kGE-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=boris.brezillon@collabora.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dinguyen@kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=robh+dt@kernel.org \
    --cc=simon.k.r.goldschmidt@gmail.com \
    --cc=tudor.ambarus@microchip.com \
    --cc=vadivel.muruganx.ramuthevar@linux.intel.com \
    --cc=vigneshr@ti.com \
    /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