mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	Linus Walleij <linus.walleij@linaro.org>
Subject: drivers/net/dsa/realtek/rtl8366rb.c:953:(.text.unlikely.rtl8366rb_setup_led+0xe8): undefined reference to `led_init_default_state_get'
Date: Fri, 7 Feb 2025 05:19:45 +0800	[thread overview]
Message-ID: <202502070525.xMUImayb-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   92514ef226f511f2ca1fb1b8752966097518edc0
commit: 32d617005475a71ebcc4ec8b2791e8d1481e9a10 net: dsa: realtek: add LED drivers for rtl8366rb
date:   9 months ago
config: riscv-randconfig-001-20250207 (https://download.01.org/0day-ci/archive/20250207/202502070525.xMUImayb-lkp@intel.com/config)
compiler: riscv32-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250207/202502070525.xMUImayb-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202502070525.xMUImayb-lkp@intel.com/

All errors (new ones prefixed by >>):

   riscv32-linux-ld: drivers/net/dsa/realtek/rtl8366rb.o: in function `rtl8366rb_setup_led':
>> drivers/net/dsa/realtek/rtl8366rb.c:953:(.text.unlikely.rtl8366rb_setup_led+0xe8): undefined reference to `led_init_default_state_get'
>> riscv32-linux-ld: drivers/net/dsa/realtek/rtl8366rb.c:980:(.text.unlikely.rtl8366rb_setup_led+0x240): undefined reference to `devm_led_classdev_register_ext'


vim +953 drivers/net/dsa/realtek/rtl8366rb.c

   927	
   928	static int rtl8366rb_setup_led(struct realtek_priv *priv, struct dsa_port *dp,
   929				       struct fwnode_handle *led_fwnode)
   930	{
   931		struct rtl8366rb *rb = priv->chip_data;
   932		struct led_init_data init_data = { };
   933		enum led_default_state state;
   934		struct rtl8366rb_led *led;
   935		u32 led_group;
   936		int ret;
   937	
   938		ret = fwnode_property_read_u32(led_fwnode, "reg", &led_group);
   939		if (ret)
   940			return ret;
   941	
   942		if (led_group >= RTL8366RB_NUM_LEDGROUPS) {
   943			dev_warn(priv->dev, "Invalid LED reg %d defined for port %d",
   944				 led_group, dp->index);
   945			return -EINVAL;
   946		}
   947	
   948		led = &rb->leds[dp->index][led_group];
   949		led->port_num = dp->index;
   950		led->led_group = led_group;
   951		led->priv = priv;
   952	
 > 953		state = led_init_default_state_get(led_fwnode);
   954		switch (state) {
   955		case LEDS_DEFSTATE_ON:
   956			led->cdev.brightness = 1;
   957			rb8366rb_set_port_led(led, 1);
   958			break;
   959		case LEDS_DEFSTATE_KEEP:
   960			led->cdev.brightness =
   961				rb8366rb_get_port_led(led);
   962			break;
   963		case LEDS_DEFSTATE_OFF:
   964		default:
   965			led->cdev.brightness = 0;
   966			rb8366rb_set_port_led(led, 0);
   967		}
   968	
   969		led->cdev.max_brightness = 1;
   970		led->cdev.brightness_set_blocking =
   971			rtl8366rb_cled_brightness_set_blocking;
   972		init_data.fwnode = led_fwnode;
   973		init_data.devname_mandatory = true;
   974	
   975		init_data.devicename = kasprintf(GFP_KERNEL, "Realtek-%d:0%d:%d",
   976						 dp->ds->index, dp->index, led_group);
   977		if (!init_data.devicename)
   978			return -ENOMEM;
   979	
 > 980		ret = devm_led_classdev_register_ext(priv->dev, &led->cdev, &init_data);
   981		if (ret) {
   982			dev_warn(priv->dev, "Failed to init LED %d for port %d",
   983				 led_group, dp->index);
   984			return ret;
   985		}
   986	
   987		return 0;
   988	}
   989	

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

                 reply	other threads:[~2025-02-06 21:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202502070525.xMUImayb-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luizluca@gmail.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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

all inboxes | Powered by JetHome®