Re: ld.lld: error: undefined symbol: sysfs_format_mac

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On 9/3/23 06:32, Randy Dunlap wrote:
> On 9/2/23 19:39, kernel test robot wrote:
>> tree: master
>> head:   92901222f83d988617aee37680cb29e1a743b5e4
>> commit: 7e38a7422f128e7d7ba24b444e957d585dbb272f mlxbf-bootctl: Support sysfs entries for MFG fields
>> date:   10 days ago
>> config: arm64-randconfig-r024-20230902 (
>> compiler: clang version 17.0.0 ( 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
>> reproduce (this is a W=1 build): (
>> 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:
>> All errors (new ones prefixed by >>):
>>>> ld.lld: error: undefined symbol: sysfs_format_mac
>>    >>> referenced by xarray.c
> I don't see what xarray.c has to do with this.
> This happens when CONFIG_NET is not enabled.

Right, so this suggests that config MLXBF_BOOTCTL in
drivers/platform/mellanox/Kconfig needs a:

	depends on NET

David, Vadim, can one of you submit a patch for this?

Then I'll get that queued up as a 6.6 fix.




I wonder if it would not be better to just turn into
a static inline helper instead of an exported symbol.

It is really just a small wrapper around sysfs_emit():

ssize_t sysfs_format_mac(char *buf, const unsigned char *addr, int len)
        return sysfs_emit(buf, "%*phC\n", len, addr);

Making this a static inline thus should not grow the code
size, while removing a symbol from the exported symbol list.



>>    >>>               vmlinux.o:(oob_mac_show)

[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux