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 v11 5/5] leds: mt6360: Add LED driver for MT6360
Date: Thu, 3 Dec 2020 04:37:06 +0800 [thread overview]
Message-ID: <202012030430.QF0CLY8Z-lkp@intel.com> (raw)
In-Reply-To: <1606906011-25633-6-git-send-email-gene.chen.richtek@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 5763 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 robh/for-next linus/master v5.10-rc6 next-20201201]
[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/20201202-185224
base: git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds.git for-next
config: nds32-randconfig-r012-20201202 (attached as .config)
compiler: nds32le-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/594faa6d4c2cea720cd53d19375000ab042bb5cb
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/20201202-185224
git checkout 594faa6d4c2cea720cd53d19375000ab042bb5cb
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nds32
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:8:
drivers/leds/leds-mt6360.c: In function 'mt6360_led_probe':
>> drivers/leds/leds-mt6360.c:724:23: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
724 | dev_err(&pdev->dev, "No child node or node count over max led number %lu\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:724:3: note: in expansion of macro 'dev_err'
724 | dev_err(&pdev->dev, "No child node or node count over max led number %lu\n", count);
| ^~~~~~~
drivers/leds/leds-mt6360.c:724:74: note: format string is defined here
724 | dev_err(&pdev->dev, "No child node or node count over max led number %lu\n", count);
| ~~^
| |
| long unsigned int
| %u
vim +724 drivers/leds/leds-mt6360.c
714
715 static int mt6360_led_probe(struct platform_device *pdev)
716 {
717 struct mt6360_priv *priv;
718 struct fwnode_handle *child;
719 size_t count;
720 int i = 0, ret;
721
722 count = device_get_child_node_count(&pdev->dev);
723 if (!count || count > MT6360_MAX_LEDS) {
> 724 dev_err(&pdev->dev, "No child node or node count over max led number %lu\n", count);
725 return -EINVAL;
726 }
727
728 priv = devm_kzalloc(&pdev->dev, struct_size(priv, leds, count), GFP_KERNEL);
729 if (!priv)
730 return -ENOMEM;
731
732 priv->leds_count = count;
733 priv->dev = &pdev->dev;
734 mutex_init(&priv->lock);
735
736 priv->regmap = dev_get_regmap(pdev->dev.parent, NULL);
737 if (!priv->regmap) {
738 dev_err(&pdev->dev, "Failed to get parent regmap\n");
739 return -ENODEV;
740 }
741
742 device_for_each_child_node(&pdev->dev, child) {
743 struct mt6360_led *led = priv->leds + i;
744 struct led_init_data init_data = { .fwnode = child, };
745 u32 reg, led_color;
746
747 ret = fwnode_property_read_u32(child, "color", &led_color);
748 if (ret)
749 goto out_flash_release;
750
751 if (led_color == LED_COLOR_ID_RGB || led_color == LED_COLOR_ID_MULTI)
752 reg = MT6360_VIRTUAL_MULTICOLOR;
753 else {
754 ret = fwnode_property_read_u32(child, "reg", ®);
755 if (ret)
756 goto out_flash_release;
757
758 if (reg >= MT6360_MAX_LEDS) {
759 ret = -EINVAL;
760 goto out_flash_release;
761 }
762 }
763
764 if (priv->leds_active & BIT(reg)) {
765 ret = -EINVAL;
766 goto out_flash_release;
767 }
768 priv->leds_active |= BIT(reg);
769
770 led->led_no = reg;
771 led->priv = priv;
772
773 ret = mt6360_init_common_properties(led, &init_data);
774 if (ret)
775 goto out_flash_release;
776
777 if (reg == MT6360_VIRTUAL_MULTICOLOR ||
778 (reg >= MT6360_LED_ISNK1 && reg <= MT6360_LED_ISNKML))
779 ret = mt6360_init_isnk_properties(led, &init_data);
780 else
781 ret = mt6360_init_flash_properties(led, &init_data);
782
783 if (ret)
784 goto out_flash_release;
785
786 ret = mt6360_led_register(&pdev->dev, led, &init_data);
787 if (ret)
788 goto out_flash_release;
789
790 i++;
791 }
792
793 platform_set_drvdata(pdev, priv);
794 return 0;
795
796 out_flash_release:
797 mt6360_v4l2_flash_release(priv);
798 return ret;
799 }
800
---
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: 32212 bytes --]
next prev parent reply other threads:[~2020-12-02 20:39 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-02 10:46 [PATCH v11 0/5] leds: mt6360: Add LED driver for MT6360 Gene Chen
2020-12-02 10:46 ` [PATCH v11 1/5] leds: flash: Add flash registration with undefined CONFIG_LEDS_CLASS_FLASH Gene Chen
2020-12-02 10:46 ` [PATCH v11 2/5] leds: flash: Fix multicolor no-ops registration by return 0 Gene Chen
2020-12-02 10:46 ` [PATCH v11 3/5] dt-bindings: leds: Add LED_FUNCTION_MOONLIGHT definitions Gene Chen
2020-12-02 12:23 ` Pavel Machek
2020-12-03 6:42 ` Gene Chen
2020-12-03 11:40 ` Pavel Machek
2020-12-03 20:06 ` Jacek Anaszewski
2020-12-09 19:53 ` Rob Herring
2020-12-02 10:46 ` [PATCH v11 4/5] dt-bindings: leds: Add bindings for MT6360 LED Gene Chen
2020-12-03 20:24 ` Jacek Anaszewski
2020-12-09 19:58 ` Rob Herring
2020-12-02 10:46 ` [PATCH v11 5/5] leds: mt6360: Add LED driver for MT6360 Gene Chen
2020-12-02 18:27 ` kernel test robot
2020-12-02 20:37 ` kernel test robot [this message]
2020-12-03 20:35 ` Jacek Anaszewski
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=202012030430.QF0CLY8Z-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).