From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: "Vaittinen, Matti" <Matti.Vaittinen@fi.rohmeurope.com>
Cc: Matti Vaittinen <mazziesaccount@gmail.com>,
Jonathan Cameron <jic23@kernel.org>,
Lars-Peter Clausen <lars@metafoo.de>,
Shreeya Patel <shreeya.patel@collabora.com>,
Paul Gazzillo <paul@pgazz.com>,
Dmitry Osipenko <dmitry.osipenko@collabora.com>,
Zhigang Shi <Zhigang.Shi@liteon.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>
Subject: Re: [PATCH v3 2/6] iio: light: Add gain-time-scale helpers
Date: Tue, 14 Mar 2023 13:12:23 +0200 [thread overview]
Message-ID: <ZBBWlyDtyinbZBNJ@smile.fi.intel.com> (raw)
In-Reply-To: <d2986a9e-c516-ea6d-8f94-5cd4723312bd@fi.rohmeurope.com>
On Tue, Mar 14, 2023 at 06:19:35AM +0000, Vaittinen, Matti wrote:
> On 3/13/23 15:14, Andy Shevchenko wrote:
> > On Mon, Mar 13, 2023 at 02:56:59PM +0200, Matti Vaittinen wrote:
> >> On 3/12/23 18:51, Jonathan Cameron wrote:
> >>> On Mon, 6 Mar 2023 14:52:57 +0200
> >>> Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:
> >>>> On Mon, Mar 06, 2023 at 11:17:15AM +0200, Matti Vaittinen wrote:
...
> >>>>> +EXPORT_SYMBOL_NS_GPL(iio_gts_total_gain_to_scale, IIO_GTS_HELPER);
> >>>>
> >>>> I would say _HELPER part is too much, but fine with me.
> >>>
> >>> Hmm. I think I like the HELPER bit as separates it from being a driver.
> >>> Of course I might change my mind after a few sleeps.
> >>
> >> Ever considered a career as a politician? ;) (No offense intended - and feel
> >> free to change your mind on this. I don't expect this to be done tomorrow)
> >
> > It will be a one liner in the provider if you use DEFAULT_SYMBOL_NAMESPACE
> > definition.
>
> Oh. I didn't know about DEFAULT_SYMBOL_NAMESPACE - or if I did, I had
> forgot it. My memory has never been great and seems to be getting worse
> all the time...
>
> I don't know what to think of this define though. I can imagine that
> someone who is not familiar with it could be very confused as to why the
> symbols are not found even though EXPORT_SYMBOL or EXPORT_SYMBOL_GPL are
> used. OTOH, I think I once saw an error about symbols being in a
> namespace (when trying to use one without the namespace). This should
> probably just be a good enough hint for finding out what's going on.
>
> Luckily, I think all the exports in this case were oneliners even with
> the namespace explicitly spelled. Well, I think that for one or two
> exports the semicolon did slip to col 81 or 82 - but I am not sure if
> fixing this weighs more than the clarity of explicitly showing the
> namespace in export.
>
> Well, I guess I can go with either of these ways - do you have a strong
> opinion on using the DEFAULT_SYMBOL_NAMESPACE?
If you asking me, I'm fine with either way. Usually the latter makes sense
when we expect APIs in the certain module to:
1) always belong to the single namespace, *and / or*
2) be expanded in the future w/o bothering about their (default) NS, *and not*
3) be a single exported function for the feasible future.
Also you made a good point about line length, but with all respect, I prefer
100 than 80 and I do not believe we ever will have function name + NS longer
than that.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2023-03-14 11:14 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-06 9:15 [PATCH v3 0/6] Support ROHM BU27034 ALS sensor Matti Vaittinen
2023-03-06 9:15 ` [PATCH v3 1/6] dt-bindings: iio: light: Support ROHM BU27034 Matti Vaittinen
2023-03-06 9:17 ` [PATCH v3 2/6] iio: light: Add gain-time-scale helpers Matti Vaittinen
2023-03-06 12:52 ` Andy Shevchenko
2023-03-12 16:51 ` Jonathan Cameron
2023-03-13 12:56 ` Matti Vaittinen
2023-03-13 13:14 ` Andy Shevchenko
2023-03-14 6:19 ` Vaittinen, Matti
2023-03-14 11:12 ` Andy Shevchenko [this message]
2023-03-18 17:17 ` Jonathan Cameron
2023-03-19 14:28 ` Matti Vaittinen
2023-03-18 17:24 ` Jonathan Cameron
2023-03-13 12:47 ` Matti Vaittinen
2023-03-13 13:25 ` Andy Shevchenko
2023-03-13 13:59 ` Matti Vaittinen
2023-03-13 14:17 ` Andy Shevchenko
2023-03-13 14:25 ` Matti Vaittinen
2023-03-18 17:29 ` Jonathan Cameron
2023-03-12 17:06 ` Jonathan Cameron
2023-03-12 17:08 ` Jonathan Cameron
2023-03-13 12:40 ` Andy Shevchenko
2023-03-13 13:11 ` Matti Vaittinen
2023-03-13 13:29 ` Andy Shevchenko
2023-03-13 13:59 ` Matti Vaittinen
2023-03-15 10:51 ` Matti Vaittinen
2023-03-15 14:12 ` Andy Shevchenko
2023-03-15 14:14 ` Andy Shevchenko
2023-03-17 10:19 ` Maxime Ripard
2023-03-17 10:57 ` Vaittinen, Matti
2023-03-13 12:52 ` Matti Vaittinen
2023-03-06 9:17 ` [PATCH v3 3/6] iio: test: test " Matti Vaittinen
2023-03-06 9:19 ` [PATCH v3 4/6] MAINTAINERS: Add IIO " Matti Vaittinen
2023-03-06 9:23 ` [PATCH v3 5/6] iio: light: ROHM BU27034 Ambient Light Sensor Matti Vaittinen
2023-03-12 17:39 ` Jonathan Cameron
2023-03-13 13:34 ` Matti Vaittinen
2023-03-06 9:27 ` [PATCH v3 6/6] MAINTAINERS: Add ROHM BU27034 Matti Vaittinen
2023-03-06 12:25 ` [PATCH v3 0/6] Support ROHM BU27034 ALS sensor Andy Shevchenko
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=ZBBWlyDtyinbZBNJ@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=Matti.Vaittinen@fi.rohmeurope.com \
--cc=Zhigang.Shi@liteon.com \
--cc=dmitry.osipenko@collabora.com \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mazziesaccount@gmail.com \
--cc=paul@pgazz.com \
--cc=shreeya.patel@collabora.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