From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: "Uwe Kleine-König" <uwe@kleine-koenig.org>
Cc: Ian Abbott <abbotti@mev.co.uk>,
H Hartley Sweeten <hsweeten@visionengravers.com>,
linux-kernel@vger.kernel.org, Lee Jones <lee.jones@linaro.org>,
Dan Carpenter <dan.carpenter@oracle.com>
Subject: Re: [PATCH] comedi: Make ni_mio_common a standalone module
Date: Fri, 21 May 2021 20:14:33 +0200 [thread overview]
Message-ID: <YKf4iUkA+QzfoN0e@kroah.com> (raw)
In-Reply-To: <20210521172749.579900-1-uwe@kleine-koenig.org>
On Fri, May 21, 2021 at 07:27:50PM +0200, Uwe Kleine-König wrote:
> This allows to get rid of the ugly
>
> #include "ni_mio_common.c"
>
> in three modules.
>
> For an amd64 allmodconfig this changed the size for the following object
> files:
> | before | after
> drivers/comedi/drivers/ni_atmio.o | 323944 | 20752
> drivers/comedi/drivers/ni_mio_cs.o | 318376 | 14920
> drivers/comedi/drivers/ni_mio_common.o | - | 324872
> drivers/comedi/drivers/ni_pcimio.o | 389344 | 48168
> ---------------------------------------+---------+-------
> sum | 1031664 | 408712
>
> So this results in a considerable decrease in binary size of more than
> 600 KiB.
Very nice!
One tiny nit that I can see that might matter later on (not now):
> @@ -168,6 +173,7 @@ static const struct comedi_lrange range_ni_E_ao_ext = {
> RANGE_ext(0, 1)
> }
> };
> +EXPORT_SYMBOL_GPL(range_ni_E_ao_ext);
not the nicest global symbol, ideally these would all start with:
comedi_ni_...
Oh wait, use the module namespace here! Make a namespace for the NI
comedi drivers to use and then we don't care so much about the names
(within reason, 'allyesconfig' builds still will care).
But that's an add-on patch, not needed here.
thanks,
greg k-h
prev parent reply other threads:[~2021-05-21 18:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-21 17:27 Uwe Kleine-König
2021-05-21 18:14 ` Greg Kroah-Hartman [this message]
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=YKf4iUkA+QzfoN0e@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=abbotti@mev.co.uk \
--cc=dan.carpenter@oracle.com \
--cc=hsweeten@visionengravers.com \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=uwe@kleine-koenig.org \
/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®