Re: [PATCH v3 04/11] HID: haptic: introduce hid_haptic_device

From: Thorsten Leemhuis
Date: Fri Oct 10 2025 - 02:48:34 EST


[Top-Posting for easier consumption]

Mainly writing this mail to bring Lucas GISSOT in here, who reported the
same error yesterday here:
https://lore.kernel.org/all/aOgvA8Jiofcnk2xb@ARSENIURE.localdomain/

Lucas there suggested:
"""but it seems to me that the #if IS_ENABLED(CONFIG_HID_HAPTIC) in
hid-haptic.h should be replaced by IS_BUILTIN(CONFIG_HID_HAPTIC) and
Kconfig updated."""

And Randy: Thx for the closer investigation! It explains some of the
"that feels odd, am I holding this wrong" feeling I had when reporting this.

Ciao, Thorsten

On 10/10/25 06:50, Randy Dunlap wrote:
> On 10/9/25 7:43 AM, Thorsten Leemhuis wrote:
>> On 8/19/25 01:08, Jonathan Denose wrote:
>>> From: Angela Czubak <aczubak@xxxxxxxxxx>
>>>
>>> Define a new structure that contains simple haptic device configuration
>>> as well as current state.
>>> Add functions that recognize auto trigger and manual trigger reports
>>> as well as save their addresses.Hi,
>>> Verify that the pressure unit is either grams or newtons.
>>> Mark the input device as a haptic touchpad if the unit is correct and
>>> the reports are found.
>>> [...]
>>> +config HID_HAPTIC
>>> + tristate "Haptic touchpad support"
>>> + default n
>>> + help
>>> + Support for touchpads with force sensors and haptic actuators instead of a
>>> + traditional button.
>>> + Adds extra parsing and FF device for the hid multitouch driver.
>>> + It can be used for Elan 2703 haptic touchpad.
>>> +
>>> + If unsure, say N.
>>> +
>>> menu "Special HID drivers"
>>
>> I suspect this change is related to a build error I ran into today:
>>
>> MODPOST Module.symvers
>> ERROR: modpost: "hid_haptic_init" [drivers/hid/hid-multitouch.ko] undefined!
>> ERROR: modpost: "hid_haptic_pressure_increase" [drivers/hid/hid-multitouch.ko] undefined!
>> ERROR: modpost: "hid_haptic_check_pressure_unit" [drivers/hid/hid-multitouch.ko] undefined!
>> ERROR: modpost: "hid_haptic_input_configured" [drivers/hid/hid-multitouch.ko] undefined!
>> ERROR: modpost: "hid_haptic_input_mapping" [drivers/hid/hid-multitouch.ko] undefined!
>> ERROR: modpost: "hid_haptic_feature_mapping" [drivers/hid/hid-multitouch.ko] undefined!
>> ERROR: modpost: "hid_haptic_pressure_reset" [drivers/hid/hid-multitouch.ko] undefined!
>> make[3]: *** [/home/thl/var/linux.dev/scripts/Makefile.modpost:147: Module.symvers] Error 1
>>
>> The config where this occurred had this:
>>
>> CONFIG_HID=y
>> CONFIG_HID_MULTITOUCH=m
>> CONFIG_HID_HAPTIC=m
>>
>> Changing the latter to "CONFIG_HID_HAPTIC=y" fixed the problem for me.
>
> Sure, but that's just covering up the problem.
>> First, I get this build error:
>
> ERROR: modpost: missing MODULE_LICENSE() in drivers/hid/hid-haptic.o
> WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-haptic.o
>
> so I added those to hid-haptic.c.... and I still get that same build error.
>
> So I looked at the hid-haptic.o file, in the .modinfo section,
> and saw this:
>
> Disassembly of section .modinfo:
>
> 0000000000000000 <__UNIQUE_ID_modinfo569>:
> 0: 68 69 64 2e 6c push $0x6c2e6469
> 5: 69 63 65 6e 73 65 3d imul $0x3d65736e,0x65(%rbx),%esp
> c: 47 50 rex.RXB push %r8
> e: 4c 00 rex.WR add %r13b,0x69(%rax)
>
> which is ASCII " h i d . l i c e n s e = G P L".
>
> so the license string is there.
>
> Maybe something is modpost is having a problem.
> Unless someone who has modified modpost recently has any ideas,
> this needs a git bisect, I expect.