Re: pm.c:undefined reference to `i8042_command'

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

 




On 12/5/23 22:52, Arnd Bergmann wrote:
> On Wed, Dec 6, 2023, at 06:24, Randy Dunlap wrote:
>>> All errors (new ones prefixed by >>):
>>>
>>>    mips64el-linux-ld: arch/mips/loongson2ef/lemote-2f/pm.o: in function `setup_wakeup_events':
>>>>> pm.c:(.text+0x118): undefined reference to `i8042_command'
>>>>> mips64el-linux-ld: pm.c:(.text+0x154): undefined reference to `i8042_command'
>>
>>
>> How do we feel about this?
>> I suppose that an ARCH or mach or board should know what it requires.
>>
>>
>> ---
>>  arch/mips/loongson2ef/Kconfig |    3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff -- a/arch/mips/loongson2ef/Kconfig b/arch/mips/loongson2ef/Kconfig
>> --- a/arch/mips/loongson2ef/Kconfig
>> +++ b/arch/mips/loongson2ef/Kconfig
>> @@ -40,6 +40,9 @@ config LEMOTE_MACH2F
>>  	select ARCH_HAS_PHYS_TO_DMA
>>  	select ARCH_MIGHT_HAVE_PC_PARPORT
>>  	select ARCH_MIGHT_HAVE_PC_SERIO
>> +	select INPUT
>> +	select SERIO
>> +	select SERIO_I8042
>>  	select BOARD_SCACHE
>>  	select BOOT_ELF32
> 
> I think it's bad style to force-select an optional subsystem.
> How about making the entire file optional? It seems that there
> are already __weak functions in its place.

Yes, I agree in general.

Hopefully the maintainer will opine your suggestion.
Jiaxun?

Thanks.

> 
> --- a/arch/mips/loongson2ef/lemote-2f/Makefile
> +++ b/arch/mips/loongson2ef/lemote-2f/Makefile
> @@ -8,5 +8,6 @@ obj-y += clock.o machtype.o irq.o reset.o dma.o ec_kb3310b.o
>  #
>  # Suspend Support
>  #
> -
> +ifdef CONFIG_SERIO_I8042
>  obj-$(CONFIG_SUSPEND) += pm.o
> +endif
> 
>      Arnd

-- 
~Randy




[Index of Archives]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux