linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	Pavel Machek <pavel@ucw.cz>
Subject: Re: [PATCH v1 1/1] leds: syscon: Get rid of custom led_init_default_state_get()
Date: Wed, 3 Aug 2022 08:55:12 +0800	[thread overview]
Message-ID: <202208030858.VhHvPCPM-lkp@intel.com> (raw)
In-Reply-To: <20220802212507.6995-1-andriy.shevchenko@linux.intel.com>

Hi Andy,

I love your patch! Yet something to improve:

[auto build test ERROR on pavel-leds/for-next]
[also build test ERROR on linus/master v5.19 next-20220728]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Andy-Shevchenko/leds-syscon-Get-rid-of-custom-led_init_default_state_get/20220803-052528
base:   git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds.git for-next
config: hexagon-randconfig-r041-20220801 (https://download.01.org/0day-ci/archive/20220803/202208030858.VhHvPCPM-lkp@intel.com/config)
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 52cd00cabf479aa7eb6dbb063b7ba41ea57bce9e)
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/intel-lab-lkp/linux/commit/485abd71bd954b7a2d1ea89818ca5c925714b1e1
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Andy-Shevchenko/leds-syscon-Get-rid-of-custom-led_init_default_state_get/20220803-052528
        git checkout 485abd71bd954b7a2d1ea89818ca5c925714b1e1
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash drivers/leds/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> drivers/leds/leds-syscon.c:92:10: error: call to undeclared function 'led_init_default_state_get'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           state = led_init_default_state_get(init_data.fwnode);
                   ^
   1 error generated.


vim +/led_init_default_state_get +92 drivers/leds/leds-syscon.c

    55	
    56	static int syscon_led_probe(struct platform_device *pdev)
    57	{
    58		struct led_init_data init_data = {};
    59		struct device *dev = &pdev->dev;
    60		struct device_node *np = dev_of_node(dev);
    61		struct device *parent;
    62		struct regmap *map;
    63		struct syscon_led *sled;
    64		enum led_default_state state;
    65		u32 value;
    66		int ret;
    67	
    68		parent = dev->parent;
    69		if (!parent) {
    70			dev_err(dev, "no parent for syscon LED\n");
    71			return -ENODEV;
    72		}
    73		map = syscon_node_to_regmap(dev_of_node(parent));
    74		if (IS_ERR(map)) {
    75			dev_err(dev, "no regmap for syscon LED parent\n");
    76			return PTR_ERR(map);
    77		}
    78	
    79		sled = devm_kzalloc(dev, sizeof(*sled), GFP_KERNEL);
    80		if (!sled)
    81			return -ENOMEM;
    82	
    83		sled->map = map;
    84	
    85		if (of_property_read_u32(np, "offset", &sled->offset))
    86			return -EINVAL;
    87		if (of_property_read_u32(np, "mask", &sled->mask))
    88			return -EINVAL;
    89	
    90		init_data.fwnode = of_fwnode_handle(np);
    91	
  > 92		state = led_init_default_state_get(init_data.fwnode);
    93		switch (state) {
    94		case LEDS_DEFSTATE_ON:
    95			ret = regmap_update_bits(map, sled->offset, sled->mask, sled->mask);
    96			if (ret < 0)
    97				return ret;
    98			sled->state = true;
    99			break;
   100		case LEDS_DEFSTATE_KEEP:
   101			ret = regmap_read(map, sled->offset, &value);
   102			if (ret < 0)
   103				return ret;
   104			sled->state = !!(value & sled->mask);
   105			break;
   106		default:
   107			ret = regmap_update_bits(map, sled->offset, sled->mask, 0);
   108			if (ret < 0)
   109				return ret;
   110			sled->state = false;
   111		}
   112		sled->cdev.brightness_set = syscon_led_set;
   113	
   114		ret = devm_led_classdev_register_ext(dev, &sled->cdev, &init_data);
   115		if (ret < 0)
   116			return ret;
   117	
   118		platform_set_drvdata(pdev, sled);
   119		dev_info(dev, "registered LED %s\n", sled->cdev.name);
   120	
   121		return 0;
   122	}
   123	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

      reply	other threads:[~2022-08-03  0:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-02 21:25 [PATCH v1 1/1] leds: syscon: Get rid of custom led_init_default_state_get() Andy Shevchenko
2022-08-03  0:55 ` 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=202208030858.VhHvPCPM-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=pavel@ucw.cz \
    /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).