From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: linux-kernel@vger.kernel.org, linux-pwm@vger.kernel.org,
Thierry Reding <thierry.reding@gmail.com>
Subject: Re: [PATCH v1 2/9] pwm: lpss: Move exported symbols to PWM_LPSS namespace
Date: Wed, 7 Sep 2022 17:21:52 +0300 [thread overview]
Message-ID: <YxipACrMCQbE4xmk@smile.fi.intel.com> (raw)
In-Reply-To: <20220907091144.picr3byckxco7w6m@pengutronix.de>
On Wed, Sep 07, 2022 at 11:11:44AM +0200, Uwe Kleine-König wrote:
> On Tue, Sep 06, 2022 at 10:57:28PM +0300, Andy Shevchenko wrote:
> > MODULE_DESCRIPTION("PWM platform driver for Intel LPSS");
> > MODULE_LICENSE("GPL v2");
> > +MODULE_IMPORT_NS(PWM_LPSS);
> > MODULE_ALIAS("platform:pwm-lpss");
>
> While it's not wrong to add the IMPORT_NS statement to each file, I'd
> had added it to pwm-lpss.h. IMHO that makes sense as every includer of
> that header needs that IMPORT_NS to actually use the symbols declared
> there.
If you have an optional dependency you may not need to include namespace
to avoid dragging it for peanuts.
...
> > -EXPORT_SYMBOL_GPL(pwm_lpss_probe);
> > +EXPORT_SYMBOL_NS_GPL(pwm_lpss_probe, PWM_LPSS);
>
> There is something possible with more magic:
I know.
> #define DEFAULT_SYMBOL_NAMESPACE PWM_LPSS
>
> which you only need once in pwm-lpss.c and then all exports use that
> namespace. (And if you pick up my suggestion for patch 1 you also
> benefit from that.)
For a single export (even for a few of them) it's an overkill.
Taking above into consideration I don't think we need to alter
a proposed change.
Thanks for review!
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2022-09-07 14:22 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-06 19:57 [PATCH v1 1/9] pwm: lpss: Deduplicate board info data structures Andy Shevchenko
2022-09-06 19:57 ` [PATCH v1 2/9] pwm: lpss: Move exported symbols to PWM_LPSS namespace Andy Shevchenko
2022-09-07 9:11 ` Uwe Kleine-König
2022-09-07 14:21 ` Andy Shevchenko [this message]
2022-09-07 17:00 ` Andy Shevchenko
2022-09-07 17:14 ` Andy Shevchenko
2022-09-06 19:57 ` [PATCH v1 3/9] pwm: lpss: Move resource mapping to the glue drivers Andy Shevchenko
2022-09-06 19:57 ` [PATCH v1 4/9] pwm: lpss: Include headers we are direct user of Andy Shevchenko
2022-09-07 9:13 ` Uwe Kleine-König
2022-09-07 14:23 ` Andy Shevchenko
2022-09-06 19:57 ` [PATCH v1 5/9] pwm: lpss: Use device_get_match_data to get device data Andy Shevchenko
2022-09-06 19:57 ` [PATCH v1 6/9] pwm: lpss: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr() macros Andy Shevchenko
2022-09-06 19:57 ` [PATCH v1 7/9] pwm: lpss: Make use of bits.h macros for all masks Andy Shevchenko
2022-09-06 19:57 ` [PATCH v1 8/9] pwm: lpss: Add a comment to the bypass field Andy Shevchenko
2022-09-06 19:57 ` [PATCH v1 9/9] pwm: lpss: Allow other drivers to enable PWM LPSS Andy Shevchenko
2022-09-07 9:04 ` [PATCH v1 1/9] pwm: lpss: Deduplicate board info data structures Uwe Kleine-König
2022-09-07 14:27 ` Andy Shevchenko
2022-09-08 8:25 ` Uwe Kleine-König
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=YxipACrMCQbE4xmk@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=thierry.reding@gmail.com \
--cc=u.kleine-koenig@pengutronix.de \
/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