tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 9221b2819b8a4196eecf5476d66201be60fbcf29 commit: 32d617005475a71ebcc4ec8b2791e8d1481e9a10 [8796/10967] net: dsa: realtek: add LED drivers for rtl8366rb config: parisc-randconfig-r033-20220123 (https://download.01.org/0day-ci/archive/20240505/202405052115.cnbey0X4-lkp@xxxxxxxxx/config) compiler: hppa-linux-gcc (GCC) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240505/202405052115.cnbey0X4-lkp@xxxxxxxxx/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@xxxxxxxxx> | Closes: https://lore.kernel.org/oe-kbuild-all/202405052115.cnbey0X4-lkp@xxxxxxxxx/ All errors (new ones prefixed by >>): hppa-linux-ld: drivers/net/dsa/realtek/rtl8366rb.o: in function `rtl8366rb_setup_led': >> drivers/net/dsa/realtek/rtl8366rb.c:953:(.text+0x1648): undefined reference to `led_init_default_state_get' >> hppa-linux-ld: drivers/net/dsa/realtek/rtl8366rb.c:980:(.text+0x178c): undefined reference to `devm_led_classdev_register_ext' pahole: .tmp_vmlinux.btf: Invalid argument .btf.vmlinux.bin.o: file not recognized: file format not recognized 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