From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
Cc: Jarkko Nikula <jarkko.nikula@linux.intel.com>,
Andi Shyti <andi.shyti@kernel.org>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
Jan Dabros <jsd@semihalf.com>,
linux-i2c@vger.kernel.org
Subject: Re: [PATCH] i2c: designware: Actually make use of the I2C_DW_COMMON and I2C_DW symbol namespaces
Date: Wed, 4 Dec 2024 03:23:52 +0200 [thread overview]
Message-ID: <Z0-vKE3FLxa2BWmS@smile.fi.intel.com> (raw)
In-Reply-To: <aenflylxg46hie6yj2hzlelnzbq42mox24fzzz7o44dvb3j575@r2hgad4ghgym>
On Tue, Dec 03, 2024 at 11:46:07PM +0100, Uwe Kleine-König wrote:
> On Tue, Dec 03, 2024 at 09:27:35PM +0200, Andy Shevchenko wrote:
> > On Tue, Dec 03, 2024 at 06:36:40PM +0100, Uwe Kleine-König wrote:
> > > DEFAULT_SYMBOL_NAMESPACE must already be defined when <linux/export.h>
> > > is included. So move the define above the include block.
> >
> > As in the other email I pointed out the doc says that we need to undef the
> > symbol. No need to move it around.
> >
> > The only requirement is to place that before any EXPORT_SYMBOL*() we want to
> > add it to.
>
> Did you test your statement?
I speak the documentation.
> I did on top of v6.13-rc1:
>
> - Remove the MODULE_IMPORT_NS(I2C_DW_COMMON) statements from
> drivers/i2c/busses/i2c-designware-master.c,
> drivers/i2c/busses/i2c-designware-pcidrv.c,
> drivers/i2c/busses/i2c-designware-platdrv.c and
> drivers/i2c/busses/i2c-designware-slave.c
> => Built fine, ergo the symbols are not in the I2C_DW_COMMON
> namespace.
>
> - On top of the previous: Add an #undef for DEFAULT_SYMBOL_NAMESPACE
> directly before the #define
> => Built fine, ergo the #undef doesn't make the namespace define
> work.
>
> - On top of the previous: Move #undef + #define above the #includes
> => Several warnings like:
>
> WARNING: modpost: module i2c-designware-platform uses symbol i2c_dw_prepare_clk from namespace I2C_DW_COMMON, but does not import it.
>
> Ergo the position of the definition is relevant.
>
> - On top of the previous: Drop the #undef
> => same as before, ergo the #undef is not needed.
>
> Independent of what is in the docs that matches my understandment of C.
>
> I don't expect that DEFAULT_SYMBOL_NAMESPACE to be already defined. If
> there was a definition already, a #define without #undef results (under
> some likely conditions) in a compiler warning. With the #undef this
> warning would be suppressed. So the #undef is something like a --force
> switch that I prefer not to use without reason, because I want to get
> the warning if my expectations are not met.
>
> So I still think the patch is fine as is.
Perhaps we need to update the documentation first.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2024-12-04 1:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-03 17:36 [PATCH] i2c: designware: Actually make use of the I2C_DW_COMMON and I2C_DW symbol namespaces Uwe Kleine-König
2024-12-03 19:27 ` Andy Shevchenko
2024-12-03 22:46 ` Uwe Kleine-König
2024-12-04 1:23 ` Andy Shevchenko [this message]
2024-12-04 10:25 ` Uwe Kleine-König
2024-12-05 7:53 ` Andy Shevchenko
2024-12-05 8:12 ` Jarkko Nikula
2024-12-05 8:26 ` Andy Shevchenko
2024-12-27 0:07 ` Andi Shyti
2024-12-28 21:45 ` 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=Z0-vKE3FLxa2BWmS@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=andi.shyti@kernel.org \
--cc=jarkko.nikula@linux.intel.com \
--cc=jsd@semihalf.com \
--cc=linux-i2c@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=u.kleine-koenig@baylibre.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.