Bug 204541 - Link of kernel fails due to multiple definitions of trackpoint_detect
Summary: Link of kernel fails due to multiple definitions of trackpoint_detect
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: Input Devices (show other bugs)
Hardware: x86-64 Linux
: P1 normal
Assignee: drivers_input-devices
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-10 00:08 UTC by Jeffrey E. Bedard
Modified: 2019-08-19 12:40 UTC (History)
1 user (show)

See Also:
Kernel Version: 4.14.138
Subsystem:
Regression: No
Bisected commit-id:


Attachments
build log (862 bytes, text/plain)
2019-08-10 00:08 UTC, Jeffrey E. Bedard
Details

Description Jeffrey E. Bedard 2019-08-10 00:08:54 UTC
Created attachment 284305 [details]
build log

Linking fails with alps driver enabled, as follows:

drivers/input/mouse/alps.o: In function `trackpoint_detect':
alps.c:(.text+0x4ad0): multiple definition of `trackpoint_detect'
drivers/input/mouse/psmouse-base.o:psmouse-base.c:(.text+0x1480): first defined here

Enabling configuration option CONFIG_MOUSE_PS2_TRACKPOINT fixes the build.

Configuration option CONFIG_MOUSE_PS2_ALPS should be changed to depend upon CONFIG_MOUSE_PS2_TRACKPOINT.
Comment 1 Hui Wang 2019-08-19 12:40:38 UTC
This bug is fixed by:

commit 49e6979e7e92cf496105b5636f1df0ac17c159c0
Author: YueHaibing <yuehaibing@huawei.com>
Date:   Tue Jul 16 20:17:20 2019 +0200

    Input: psmouse - fix build error of multiple definition
   
    trackpoint_detect() should be static inline while
    CONFIG_MOUSE_PS2_TRACKPOINT is not set, otherwise, we build fails:
   
    drivers/input/mouse/alps.o: In function `trackpoint_detect':
    alps.c:(.text+0x8e00): multiple definition of `trackpoint_detect'
    drivers/input/mouse/psmouse-base.o:psmouse-base.c:(.text+0x1b50): first defined here
   
    Reported-by: Hulk Robot <hulkci@huawei.com>
    Fixes: 55e3d9224b60 ("Input: psmouse - allow disabing certain protocol extensions")
    Signed-off-by: YueHaibing <yuehaibing@huawei.com>
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

And it is in the mainline kernel from v5.3-rc1.

Note You need to log in before you can comment on or make changes to this bug.