[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202408290528.lIGXaLsw-lkp@intel.com>
Date: Thu, 29 Aug 2024 05:34:10 +0800
From: kernel test robot <lkp@...el.com>
To: Luiz Angelo Daros de Luca <luizluca@...il.com>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
Linus Walleij <linus.walleij@...aro.org>
Subject: drivers/net/dsa/realtek/rtl8366rb.c:953:undefined reference to
`led_init_default_state_get'
Hi Luiz,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 928f79a188aacc057ba36c85b36b6d1e99c8f595
commit: 32d617005475a71ebcc4ec8b2791e8d1481e9a10 net: dsa: realtek: add LED drivers for rtl8366rb
date: 4 months ago
config: nios2-randconfig-002-20240828 (https://download.01.org/0day-ci/archive/20240829/202408290528.lIGXaLsw-lkp@intel.com/config)
compiler: nios2-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240829/202408290528.lIGXaLsw-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408290528.lIGXaLsw-lkp@intel.com/
All errors (new ones prefixed by >>):
nios2-linux-ld: drivers/net/dsa/realtek/rtl8366rb.o: in function `rtl8366rb_setup_led':
>> drivers/net/dsa/realtek/rtl8366rb.c:953:(.text.unlikely+0x3ec): undefined reference to `led_init_default_state_get'
>> drivers/net/dsa/realtek/rtl8366rb.c:953:(.text.unlikely+0x3ec): relocation truncated to fit: R_NIOS2_CALL26 against `led_init_default_state_get'
>> nios2-linux-ld: drivers/net/dsa/realtek/rtl8366rb.c:980:(.text.unlikely+0x52c): undefined reference to `devm_led_classdev_register_ext'
>> drivers/net/dsa/realtek/rtl8366rb.c:980:(.text.unlikely+0x52c): relocation truncated to fit: R_NIOS2_CALL26 against `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
Powered by blists - more mailing lists