linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Gene Chen <gene.chen.richtek@gmail.com>,
	jacek.anaszewski@gmail.com, pavel@ucw.cz, robh+dt@kernel.org,
	matthias.bgg@gmail.com
Cc: kbuild-all@lists.01.org, dmurphy@ti.com,
	linux-leds@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 2/2] leds: mt6360: Add LED driver for MT6360
Date: Wed, 7 Oct 2020 13:11:51 +0800	[thread overview]
Message-ID: <202010071341.T8WC44IB-lkp@intel.com> (raw)
In-Reply-To: <1602034966-3524-3-git-send-email-gene.chen.richtek@gmail.com>

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

Hi Gene,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on pavel-linux-leds/for-next]
[also build test WARNING on v5.9-rc8 next-20201006]
[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/Gene-Chen/leds-mt6360-Add-LED-driver-for-MT6360/20201007-094408
base:   git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds.git for-next
config: alpha-allyesconfig (attached as .config)
compiler: alpha-linux-gcc (GCC) 9.3.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/cdafaffefe3568d483b764206c6cea243203b370
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Gene-Chen/leds-mt6360-Add-LED-driver-for-MT6360/20201007-094408
        git checkout cdafaffefe3568d483b764206c6cea243203b370
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=alpha 

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 >>):

   In file included from include/linux/device.h:15,
                    from include/linux/leds.h:12,
                    from include/linux/led-class-flash.h:11,
                    from drivers/leds/leds-mt6360.c:7:
   drivers/leds/leds-mt6360.c: In function 'mt6360_led_probe':
>> drivers/leds/leds-mt6360.c:696:23: warning: format '%d' expects argument of type 'int', but argument 3 has type 'size_t' {aka 'long unsigned int'} [-Wformat=]
     696 |   dev_err(&pdev->dev, "No child node or node count over max led number %d\n", count);
         |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt'
      19 | #define dev_fmt(fmt) fmt
         |                      ^~~
   drivers/leds/leds-mt6360.c:696:3: note: in expansion of macro 'dev_err'
     696 |   dev_err(&pdev->dev, "No child node or node count over max led number %d\n", count);
         |   ^~~~~~~
   drivers/leds/leds-mt6360.c:696:73: note: format string is defined here
     696 |   dev_err(&pdev->dev, "No child node or node count over max led number %d\n", count);
         |                                                                        ~^
         |                                                                         |
         |                                                                         int
         |                                                                        %ld

vim +696 drivers/leds/leds-mt6360.c

   686	
   687	static int mt6360_led_probe(struct platform_device *pdev)
   688	{
   689		struct mt6360_priv *priv;
   690		struct fwnode_handle *child;
   691		size_t count;
   692		int i = 0, ret;
   693	
   694		count = device_get_child_node_count(&pdev->dev);
   695		if (!count || count > MT6360_MAX_LEDS) {
 > 696			dev_err(&pdev->dev, "No child node or node count over max led number %d\n", count);
   697			return -EINVAL;
   698		}
   699	
   700		priv = devm_kzalloc(&pdev->dev, struct_size(priv, leds, count), GFP_KERNEL);
   701		if (!priv)
   702			return -ENOMEM;
   703	
   704		priv->leds_count = count;
   705		priv->dev = &pdev->dev;
   706		mutex_init(&priv->lock);
   707	
   708		priv->regmap = dev_get_regmap(pdev->dev.parent, NULL);
   709		if (!priv->regmap) {
   710			dev_err(&pdev->dev, "Failed to get parent regmap\n");
   711			return -ENODEV;
   712		}
   713	
   714		device_for_each_child_node(&pdev->dev, child) {
   715			struct mt6360_led *led = priv->leds + i;
   716			struct led_init_data init_data = { .fwnode = child, };
   717			u32 reg;
   718	
   719			ret = fwnode_property_read_u32(child, "reg", &reg);
   720			if (ret)
   721				goto out_flash_release;
   722	
   723			if (reg >= MT6360_MAX_LEDS || priv->leds_active & BIT(reg))
   724				return -EINVAL;
   725			priv->leds_active |= BIT(reg);
   726	
   727			led->led_no = reg;
   728			led->priv = priv;
   729	
   730			ret = mt6360_init_common_properties(led, &init_data);
   731			if (ret)
   732				goto out_flash_release;
   733	
   734			if (reg == MT6360_LED_ISNKRGB || reg == MT6360_LED_ISNKML)
   735				ret = mt6360_init_isnk_properties(led, &init_data);
   736			else
   737				ret = mt6360_init_flash_properties(led, &init_data);
   738	
   739			if (ret)
   740				goto out_flash_release;
   741	
   742			ret = mt6360_led_register(&pdev->dev, led, &init_data);
   743			if (ret)
   744				goto out_flash_release;
   745	
   746			i++;
   747		}
   748	
   749		platform_set_drvdata(pdev, priv);
   750		return 0;
   751	
   752	out_flash_release:
   753		mt6360_v4l2_flash_release(priv);
   754		return ret;
   755	}
   756	

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

  reply	other threads:[~2020-10-07  5:12 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-07  1:42 [PATCH v5 0/2] leds: mt6360: Add LED driver for MT6360 Gene Chen
2020-10-07  1:42 ` [PATCH v5 1/2] dt-bindings: leds: Add bindings for MT6360 LED Gene Chen
2020-10-07 13:50   ` Rob Herring
2020-10-08 21:42   ` Jacek Anaszewski
2020-10-07  1:42 ` [PATCH v5 2/2] leds: mt6360: Add LED driver for MT6360 Gene Chen
2020-10-07  5:11   ` kernel test robot [this message]
2020-10-08 21:51   ` Jacek Anaszewski
2020-10-20  6:44     ` Gene Chen
2020-10-20 21:46       ` Jacek Anaszewski
2020-10-27  9:28         ` Gene Chen
2020-10-27 17:28           ` Jacek Anaszewski
2020-10-30  8:51             ` Gene Chen
2020-10-30 22:34               ` Jacek Anaszewski
2020-11-16 10:01                 ` Gene Chen
2020-11-16 18:25                   ` Jacek Anaszewski
2020-11-17  9:54                     ` Gene Chen

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=202010071341.T8WC44IB-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dmurphy@ti.com \
    --cc=gene.chen.richtek@gmail.com \
    --cc=jacek.anaszewski@gmail.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=pavel@ucw.cz \
    --cc=robh+dt@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;
as well as URLs for NNTP newsgroup(s).