mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "José Expósito" <jose.exposito89@gmail.com>,
	"Arnd Bergmann" <arnd@kernel.org>
Cc: "Jiri Kosina" <jikos@kernel.org>,
	"Benjamin Tissoires" <bentiss@kernel.org>,
	"Rahul Rameshbabu" <rrameshbabu@nvidia.com>,
	"Fabio Baltieri" <fabiobaltieri@chromium.org>,
	"Ivan Gorinov" <linux-kernel@altimeter.info>,
	"Johannes Roith" <johannes@gnu-linux.rocks>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] HID: uclogic: avoid linking common code into multiple modules
Date: Mon, 10 Jun 2024 08:24:51 +0200	[thread overview]
Message-ID: <54c19328-35e2-4506-aa3a-a0b08813d873@app.fastmail.com> (raw)
In-Reply-To: <ZmSi5_-4mD4AaIJW@fedora>

On Sat, Jun 8, 2024, at 20:28, José Expósito wrote:
> On Wed, May 29, 2024 at 11:48:05AM +0200, Arnd Bergmann wrote:

>> @@ -154,10 +152,8 @@ obj-$(CONFIG_HID_WINWING)	+= hid-winwing.o
>>  obj-$(CONFIG_HID_SENSOR_HUB)	+= hid-sensor-hub.o
>>  obj-$(CONFIG_HID_SENSOR_CUSTOM_SENSOR)	+= hid-sensor-custom.o
>>  
>> -hid-uclogic-test-objs		:= hid-uclogic-rdesc.o \
>> -				   hid-uclogic-params.o \
>> -				   hid-uclogic-rdesc-test.o
>> -obj-$(CONFIG_HID_KUNIT_TEST)	+= hid-uclogic-test.o
>> +hid-uclogic-test-objs		:= hid-uclogic-rdesc-test.o
>> +obj-$(CONFIG_HID_KUNIT_TEST)	+= hid-uclogic-test.o hid-uclogic-params.o hid-uclogic-params.o
>>  
>>  obj-$(CONFIG_USB_HID)		+= usbhid/
>>  obj-$(CONFIG_USB_MOUSE)		+= usbhid/
>
> I tested your patch with:
>
> 	hid-uclogic-objs		:= hid-uclogic-core.o \
> 					   hid-uclogic-rdesc.o \
> 					   hid-uclogic-params.o
> 	obj-$(CONFIG_HID_UCLOGIC)	+= hid-uclogic.o
> 	[...]
> 	hid-uclogic-test-objs		:= hid-uclogic-rdesc-test.o
> 	obj-$(CONFIG_HID_KUNIT_TEST)	+= hid-uclogic.o hid-uclogic-test.o
>
> And I think it is a bit more clear and it looks like it does the trick
> removing the warning.

Right, that seems fine.

> Also, with that change only "EXPORT_SYMBOL_GPL(uclogic_rdesc_template_apply);"
> is required. The other EXPORT_SYMBOL_GPL can be removed.
>
> However, I'm not sure about what are the best practices using EXPORT_SYMBOL_GPL
> and if it should be used for each function/data in the .h file. Maybe that's
> why you added them.

No, having only the single export is better here, you should
have as few of them as possible. I did picked the more complicated
approach as I wasn't sure if loading the entire driver from the
test module caused any problems. Let's use your simpler patch
then.

     Arnd

  reply	other threads:[~2024-06-10  6:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-29  9:48 Arnd Bergmann
2024-06-08 18:28 ` José Expósito
2024-06-10  6:24   ` Arnd Bergmann [this message]
2024-06-10 16:57     ` José Expósito
2024-06-10 18:25       ` Arnd Bergmann
2024-06-14 16:22         ` José Expósito
2024-06-19 14:30           ` Jiri Kosina

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54c19328-35e2-4506-aa3a-a0b08813d873@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=bentiss@kernel.org \
    --cc=fabiobaltieri@chromium.org \
    --cc=jikos@kernel.org \
    --cc=johannes@gnu-linux.rocks \
    --cc=jose.exposito89@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@altimeter.info \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rrameshbabu@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®