All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Vincent Shih <vincent.sunplus@gmail.com>,
	srinivas.kandagatla@linaro.org, linux-kernel@vger.kernel.org,
	robh+dt@kernel.org, devicetree@vger.kernel.org,
	wells.lu@sunplus.com, vincent.shih@sunplus.com
Cc: kbuild-all@lists.01.org, Vincent Shih <vincent.sunplus@gmail.com>
Subject: Re: [PATCH v3 1/2] nvmem: Add driver for OCOTP in Sunplus SP7021
Date: Thu, 16 Dec 2021 09:10:24 +0800	[thread overview]
Message-ID: <202112160925.yTjMLuBB-lkp@intel.com> (raw)
In-Reply-To: <1639568148-22872-2-git-send-email-vincent.sunplus@gmail.com>

Hi Vincent,

I love your patch! Perhaps something to improve:

[auto build test WARNING on robh/for-next]
[also build test WARNING on linux/master linus/master v5.16-rc5 next-20211214]
[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/Vincent-Shih/Add-driver-for-OCOTP-in-Sunplus-SP7021/20211215-193707
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: mips-allyesconfig (https://download.01.org/0day-ci/archive/20211216/202112160925.yTjMLuBB-lkp@intel.com/config)
compiler: mips-linux-gcc (GCC) 11.2.0
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
        # https://github.com/0day-ci/linux/commit/c0a3142f164bb92fe79eafeb333050e7fcf42560
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Vincent-Shih/Add-driver-for-OCOTP-in-Sunplus-SP7021/20211215-193707
        git checkout c0a3142f164bb92fe79eafeb333050e7fcf42560
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=mips SHELL=/bin/bash drivers/nvmem/

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/nvmem/sunplus-ocotp.c: In function 'sp_ocotp_probe':
>> drivers/nvmem/sunplus-ocotp.c:158:37: warning: variable 'otp_data' set but not used [-Wunused-but-set-variable]
     158 |         const struct sp_ocotp_data *otp_data;
         |                                     ^~~~~~~~


vim +/otp_data +158 drivers/nvmem/sunplus-ocotp.c

   154	
   155	static int sp_ocotp_probe(struct platform_device *pdev)
   156	{
   157		const struct of_device_id *match;
 > 158		const struct sp_ocotp_data *otp_data;
   159		struct device *dev = &pdev->dev;
   160		struct nvmem_device *nvmem;
   161		struct sp_ocotp_priv *otp;
   162		struct resource *res;
   163		int ret;
   164	
   165		match = of_match_device(dev->driver->of_match_table, dev);
   166		if (match && match->data)
   167			otp_data = match->data;
   168	
   169		otp = devm_kzalloc(dev, sizeof(*otp), GFP_KERNEL);
   170		if (!otp)
   171			return -ENOMEM;
   172	
   173		otp->dev = dev;
   174	
   175		res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "hb_gpio");
   176		otp->base[HB_GPIO] = devm_ioremap_resource(dev, res);
   177		if (IS_ERR(otp->base[HB_GPIO]))
   178			return PTR_ERR(otp->base[HB_GPIO]);
   179	
   180		res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "otprx");
   181		otp->base[OTPRX] = devm_ioremap_resource(dev, res);
   182		if (IS_ERR(otp->base[OTPRX]))
   183			return PTR_ERR(otp->base[OTPRX]);
   184	
   185		otp->clk = devm_clk_get(&pdev->dev, NULL);
   186		if (IS_ERR(otp->clk))
   187			return dev_err_probe(&pdev->dev, PTR_ERR(otp->clk),
   188							"devm_clk_get fail\n");
   189	
   190		ret = clk_prepare(otp->clk);
   191		if (ret < 0) {
   192			dev_err(dev, "failed to prepare clk: %d\n", ret);
   193			return ret;
   194		}
   195	
   196		sp_ocotp_nvmem_config.priv = otp;
   197		sp_ocotp_nvmem_config.dev = dev;
   198	
   199		nvmem = devm_nvmem_register(dev, &sp_ocotp_nvmem_config);
   200		if (IS_ERR(nvmem))
   201			return dev_err_probe(&pdev->dev, PTR_ERR(nvmem),
   202							"register nvmem device fail\n");
   203	
   204		platform_set_drvdata(pdev, nvmem);
   205	
   206		dev_dbg(dev, "banks:%d x wpb:%d x wsize:%d = %d",
   207			QAC628_OTP_NUM_BANKS, OTP_WORDS_PER_BANK,
   208			OTP_WORD_SIZE, QAC628_OTP_SIZE);
   209	
   210		dev_info(dev, "by Sunplus (C) 2020");
   211	
   212		return 0;
   213	}
   214	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v3 1/2] nvmem: Add driver for OCOTP in Sunplus SP7021
Date: Thu, 16 Dec 2021 09:10:24 +0800	[thread overview]
Message-ID: <202112160925.yTjMLuBB-lkp@intel.com> (raw)
In-Reply-To: <1639568148-22872-2-git-send-email-vincent.sunplus@gmail.com>

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

Hi Vincent,

I love your patch! Perhaps something to improve:

[auto build test WARNING on robh/for-next]
[also build test WARNING on linux/master linus/master v5.16-rc5 next-20211214]
[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/Vincent-Shih/Add-driver-for-OCOTP-in-Sunplus-SP7021/20211215-193707
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: mips-allyesconfig (https://download.01.org/0day-ci/archive/20211216/202112160925.yTjMLuBB-lkp(a)intel.com/config)
compiler: mips-linux-gcc (GCC) 11.2.0
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
        # https://github.com/0day-ci/linux/commit/c0a3142f164bb92fe79eafeb333050e7fcf42560
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Vincent-Shih/Add-driver-for-OCOTP-in-Sunplus-SP7021/20211215-193707
        git checkout c0a3142f164bb92fe79eafeb333050e7fcf42560
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=mips SHELL=/bin/bash drivers/nvmem/

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/nvmem/sunplus-ocotp.c: In function 'sp_ocotp_probe':
>> drivers/nvmem/sunplus-ocotp.c:158:37: warning: variable 'otp_data' set but not used [-Wunused-but-set-variable]
     158 |         const struct sp_ocotp_data *otp_data;
         |                                     ^~~~~~~~


vim +/otp_data +158 drivers/nvmem/sunplus-ocotp.c

   154	
   155	static int sp_ocotp_probe(struct platform_device *pdev)
   156	{
   157		const struct of_device_id *match;
 > 158		const struct sp_ocotp_data *otp_data;
   159		struct device *dev = &pdev->dev;
   160		struct nvmem_device *nvmem;
   161		struct sp_ocotp_priv *otp;
   162		struct resource *res;
   163		int ret;
   164	
   165		match = of_match_device(dev->driver->of_match_table, dev);
   166		if (match && match->data)
   167			otp_data = match->data;
   168	
   169		otp = devm_kzalloc(dev, sizeof(*otp), GFP_KERNEL);
   170		if (!otp)
   171			return -ENOMEM;
   172	
   173		otp->dev = dev;
   174	
   175		res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "hb_gpio");
   176		otp->base[HB_GPIO] = devm_ioremap_resource(dev, res);
   177		if (IS_ERR(otp->base[HB_GPIO]))
   178			return PTR_ERR(otp->base[HB_GPIO]);
   179	
   180		res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "otprx");
   181		otp->base[OTPRX] = devm_ioremap_resource(dev, res);
   182		if (IS_ERR(otp->base[OTPRX]))
   183			return PTR_ERR(otp->base[OTPRX]);
   184	
   185		otp->clk = devm_clk_get(&pdev->dev, NULL);
   186		if (IS_ERR(otp->clk))
   187			return dev_err_probe(&pdev->dev, PTR_ERR(otp->clk),
   188							"devm_clk_get fail\n");
   189	
   190		ret = clk_prepare(otp->clk);
   191		if (ret < 0) {
   192			dev_err(dev, "failed to prepare clk: %d\n", ret);
   193			return ret;
   194		}
   195	
   196		sp_ocotp_nvmem_config.priv = otp;
   197		sp_ocotp_nvmem_config.dev = dev;
   198	
   199		nvmem = devm_nvmem_register(dev, &sp_ocotp_nvmem_config);
   200		if (IS_ERR(nvmem))
   201			return dev_err_probe(&pdev->dev, PTR_ERR(nvmem),
   202							"register nvmem device fail\n");
   203	
   204		platform_set_drvdata(pdev, nvmem);
   205	
   206		dev_dbg(dev, "banks:%d x wpb:%d x wsize:%d = %d",
   207			QAC628_OTP_NUM_BANKS, OTP_WORDS_PER_BANK,
   208			OTP_WORD_SIZE, QAC628_OTP_SIZE);
   209	
   210		dev_info(dev, "by Sunplus (C) 2020");
   211	
   212		return 0;
   213	}
   214	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

  parent reply	other threads:[~2021-12-16  1:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-15 11:35 [PATCH v3 0/2] Add driver for OCOTP in Sunplus SP7021 Vincent Shih
2021-12-15 11:35 ` [PATCH v3 1/2] nvmem: " Vincent Shih
2021-12-15 13:58   ` Srinivas Kandagatla
2021-12-15 16:37   ` kernel test robot
2021-12-15 16:37     ` kernel test robot
2021-12-16  1:10   ` kernel test robot [this message]
2021-12-16  1:10     ` kernel test robot
2021-12-15 11:35 ` [PATCH v3 2/2] dt-bindings: nvmem: Add bindings doc for Sunplus OCOTP driver Vincent Shih
2021-12-15 15:51   ` Rob Herring

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=202112160925.yTjMLuBB-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=devicetree@vger.kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=vincent.shih@sunplus.com \
    --cc=vincent.sunplus@gmail.com \
    --cc=wells.lu@sunplus.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.