From: kernel test robot <lkp@intel.com>
To: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Cc: oe-kbuild-all@lists.linux.dev,
Linux Memory Management List <linux-mm@kvack.org>,
Linus Walleij <linus.walleij@linaro.org>
Subject: [linux-next:master 8796/10967] drivers/net/dsa/realtek/rtl8366rb.c:953:undefined reference to `led_init_default_state_get'
Date: Sun, 5 May 2024 21:50:54 +0800 [thread overview]
Message-ID: <202405052115.cnbey0X4-lkp@intel.com> (raw)
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@intel.com/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@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/202405052115.cnbey0X4-lkp@intel.com/
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
reply other threads:[~2024-05-05 13:51 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=202405052115.cnbey0X4-lkp@intel.com \
--to=lkp@intel.com \
--cc=linus.walleij@linaro.org \
--cc=linux-mm@kvack.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).