netdev.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>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Kurt Kanzenbach <kurt@linutronix.de>,
	Andrew Lunn <andrew@lunn.ch>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Vladimir Oltean <olteanv@gmail.com>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Subject: Re: [PATCH net-next v6 1/1] net: dsa: hellcreek: Get rid of custom led_init_default_state_get()
Date: Wed, 15 Mar 2023 09:05:25 +0800	[thread overview]
Message-ID: <202303150831.vgyKe8FD-lkp@intel.com> (raw)
In-Reply-To: <20230314181824.56881-1-andriy.shevchenko@linux.intel.com>

Hi Andy,

I love your patch! Yet something to improve:

[auto build test ERROR on net-next/master]

url:    https://github.com/intel-lab-lkp/linux/commits/Andy-Shevchenko/net-dsa-hellcreek-Get-rid-of-custom-led_init_default_state_get/20230315-021931
patch link:    https://lore.kernel.org/r/20230314181824.56881-1-andriy.shevchenko%40linux.intel.com
patch subject: [PATCH net-next v6 1/1] net: dsa: hellcreek: Get rid of custom led_init_default_state_get()
config: i386-randconfig-a015-20230313 (https://download.01.org/0day-ci/archive/20230315/202303150831.vgyKe8FD-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
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/fdd54417a75386e7ad47065c21403835b7fda94a
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Andy-Shevchenko/net-dsa-hellcreek-Get-rid-of-custom-led_init_default_state_get/20230315-021931
        git checkout fdd54417a75386e7ad47065c21403835b7fda94a
        # 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=i386 olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/net/dsa/hirschmann/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303150831.vgyKe8FD-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/net/dsa/hirschmann/hellcreek_ptp.c:322:10: error: implicit declaration of function 'led_init_default_state_get' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           state = led_init_default_state_get(of_fwnode_handle(led));
                   ^
   1 error generated.


vim +/led_init_default_state_get +322 drivers/net/dsa/hirschmann/hellcreek_ptp.c

   292	
   293	/* There two available LEDs internally called sync_good and is_gm. However, the
   294	 * user might want to use a different label and specify the default state. Take
   295	 * those properties from device tree.
   296	 */
   297	static int hellcreek_led_setup(struct hellcreek *hellcreek)
   298	{
   299		struct device_node *leds, *led = NULL;
   300		enum led_default_state state;
   301		const char *label;
   302		int ret = -EINVAL;
   303	
   304		of_node_get(hellcreek->dev->of_node);
   305		leds = of_find_node_by_name(hellcreek->dev->of_node, "leds");
   306		if (!leds) {
   307			dev_err(hellcreek->dev, "No LEDs specified in device tree!\n");
   308			return ret;
   309		}
   310	
   311		hellcreek->status_out = 0;
   312	
   313		led = of_get_next_available_child(leds, led);
   314		if (!led) {
   315			dev_err(hellcreek->dev, "First LED not specified!\n");
   316			goto out;
   317		}
   318	
   319		ret = of_property_read_string(led, "label", &label);
   320		hellcreek->led_sync_good.name = ret ? "sync_good" : label;
   321	
 > 322		state = led_init_default_state_get(of_fwnode_handle(led));
   323		switch (state) {
   324		case LEDS_DEFSTATE_ON:
   325			hellcreek->led_sync_good.brightness = 1;
   326			break;
   327		case LEDS_DEFSTATE_KEEP:
   328			hellcreek->led_sync_good.brightness =
   329				hellcreek_get_brightness(hellcreek, STATUS_OUT_SYNC_GOOD);
   330			break;
   331		default:
   332			hellcreek->led_sync_good.brightness = 0;
   333		}
   334	
   335		hellcreek->led_sync_good.max_brightness = 1;
   336		hellcreek->led_sync_good.brightness_set = hellcreek_led_sync_good_set;
   337		hellcreek->led_sync_good.brightness_get = hellcreek_led_sync_good_get;
   338	
   339		led = of_get_next_available_child(leds, led);
   340		if (!led) {
   341			dev_err(hellcreek->dev, "Second LED not specified!\n");
   342			ret = -EINVAL;
   343			goto out;
   344		}
   345	
   346		ret = of_property_read_string(led, "label", &label);
   347		hellcreek->led_is_gm.name = ret ? "is_gm" : label;
   348	
   349		state = led_init_default_state_get(of_fwnode_handle(led));
   350		switch (state) {
   351		case LEDS_DEFSTATE_ON:
   352			hellcreek->led_is_gm.brightness = 1;
   353			break;
   354		case LEDS_DEFSTATE_KEEP:
   355			hellcreek->led_is_gm.brightness =
   356				hellcreek_get_brightness(hellcreek, STATUS_OUT_IS_GM);
   357			break;
   358		default:
   359			hellcreek->led_is_gm.brightness = 0;
   360		}
   361	
   362		hellcreek->led_is_gm.max_brightness = 1;
   363		hellcreek->led_is_gm.brightness_set = hellcreek_led_is_gm_set;
   364		hellcreek->led_is_gm.brightness_get = hellcreek_led_is_gm_get;
   365	
   366		/* Set initial state */
   367		if (hellcreek->led_sync_good.brightness == 1)
   368			hellcreek_set_brightness(hellcreek, STATUS_OUT_SYNC_GOOD, 1);
   369		if (hellcreek->led_is_gm.brightness == 1)
   370			hellcreek_set_brightness(hellcreek, STATUS_OUT_IS_GM, 1);
   371	
   372		/* Register both leds */
   373		led_classdev_register(hellcreek->dev, &hellcreek->led_sync_good);
   374		led_classdev_register(hellcreek->dev, &hellcreek->led_is_gm);
   375	
   376		ret = 0;
   377	
   378	out:
   379		of_node_put(leds);
   380	
   381		return ret;
   382	}
   383	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

  reply	other threads:[~2023-03-15  1:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-14 18:18 [PATCH net-next v6 1/1] net: dsa: hellcreek: Get rid of custom led_init_default_state_get() Andy Shevchenko
2023-03-15  1:05 ` kernel test robot [this message]
2023-03-15 17:06   ` Andy Shevchenko
2023-03-15 19:51     ` Nathan Chancellor
2023-03-15 21:15       ` Jakub Kicinski
2023-03-16  1:48         ` Philip Li
2023-03-15  5:57 ` Michal Swiatkowski
2023-03-15 13:16   ` Andy Shevchenko
2023-03-16  8:11     ` Michal Swiatkowski
2023-03-15 17:07   ` Andy Shevchenko
2023-03-17  0:10 ` patchwork-bot+netdevbpf

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=202303150831.vgyKe8FD-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andrew@lunn.ch \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=kuba@kernel.org \
    --cc=kurt@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.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;
as well as URLs for NNTP newsgroup(s).