From f4ceb2a044f653344ea52c79d775fb876dfb1d1c Mon Sep 17 00:00:00 2001 From: José Expósito Date: Fri, 14 Jun 2024 18:16:05 +0200 Subject: HID: uclogic: Avoid linking common code into multiple modules MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The hid-uclogic-params.o and hid-uclogic-rdesc.o files are linked into both the driver module and the unit test, which triggers a W=1 warning: scripts/Makefile.build:236: drivers/hid/Makefile: hid-uclogic-rdesc.o is added to multiple modules: hid-uclogic hid-uclogic-test scripts/Makefile.build:236: drivers/hid/Makefile: hid-uclogic-params.o is added to multiple modules: hid-uclogic hid-uclogic-test Avoids this by moving these two files into a separate module that is used by the driver and the unit test. Reported-by: Arnd Bergmann Acked-by: Arnd Bergmann Signed-off-by: José Expósito Signed-off-by: Jiri Kosina --- drivers/hid/hid-uclogic-rdesc-test.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/hid/hid-uclogic-rdesc-test.c') diff --git a/drivers/hid/hid-uclogic-rdesc-test.c b/drivers/hid/hid-uclogic-rdesc-test.c index 90bf4e586e01..d6b18213f45f 100644 --- a/drivers/hid/hid-uclogic-rdesc-test.c +++ b/drivers/hid/hid-uclogic-rdesc-test.c @@ -9,6 +9,8 @@ #include #include "./hid-uclogic-rdesc.h" +MODULE_IMPORT_NS(EXPORTED_FOR_KUNIT_TESTING); + struct uclogic_template_case { const char *name; const __u8 *template; -- cgit v1.2.3-73-gaa49b