From: "Uwe Kleine-König (The Capable Hub)" <u.kleine-koenig@baylibre.com>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: David Heidelberg <david@ixit.cz>,
Mark Greer <mgreer@animalcreek.com>,
Simon Horman <horms@kernel.org>,
Tomasz Unger <tomasz.unger@yahoo.pl>,
oe-linux-nfc@lists.linux.dev, linux-kernel@vger.kernel.org,
linux-wireless@vger.kernel.org
Subject: Re: [PATCH v1 07/12] nfc: Drop __maybe_unused from of_device_id tables
Date: Wed, 8 Jul 2026 07:05:23 +0200 [thread overview]
Message-ID: <ak3YSbzhmHi75INN@monoceros> (raw)
In-Reply-To: <c5b1dec1-de39-4359-9cee-86cfac87b358@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 1975 bytes --]
On Tue, Jul 07, 2026 at 07:28:57PM +0200, Krzysztof Kozlowski wrote:
> On 03/07/2026 17:46, Uwe Kleine-König (The Capable Hub) wrote:
> > Referencing these arrays in MODULE_DEVICE_TABLE() is enough to convince
> > the compiler that they are used even if the drivers are built-in (since
> > 5ab23c7923a1 ("modpost: Create modalias for builtin modules"). So the
> > __maybe_unused marking can be removed without introducing a compiler
> > warning.
> >
> > Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
> > ---
> > drivers/nfc/nfcmrvl/i2c.c | 2 +-
> > drivers/nfc/nfcmrvl/spi.c | 2 +-
> > drivers/nfc/pn533/i2c.c | 2 +-
> > drivers/nfc/pn544/i2c.c | 2 +-
> > drivers/nfc/s3fwrn5/i2c.c | 2 +-
> > drivers/nfc/st-nci/i2c.c | 2 +-
> > drivers/nfc/st-nci/spi.c | 2 +-
> > drivers/nfc/st21nfca/i2c.c | 2 +-
> > drivers/nfc/st95hf/core.c | 2 +-
> > drivers/nfc/trf7970a.c | 2 +-
> > 10 files changed, 10 insertions(+), 10 deletions(-)
> >
> > diff --git a/drivers/nfc/nfcmrvl/i2c.c b/drivers/nfc/nfcmrvl/i2c.c
> > index 66877a7d03f2..687d2979b881 100644
> > --- a/drivers/nfc/nfcmrvl/i2c.c
> > +++ b/drivers/nfc/nfcmrvl/i2c.c
> > @@ -245,7 +245,7 @@ static void nfcmrvl_i2c_remove(struct i2c_client *client)
> > }
> >
> >
> > -static const struct of_device_id of_nfcmrvl_i2c_match[] __maybe_unused = {
> > +static const struct of_device_id of_nfcmrvl_i2c_match[] = {
> > { .compatible = "marvell,nfc-i2c", },
> > {},
>
> This (and probably others) should re-introduce warnings on !MODULE and
> !OF builds (and other cases).
With an x86_64 allnoconfig and just the things enabled to make this
driver build (i.e. I2C and a few NFC related switches, but neither OF
nor MODULES) the driver builds fine even with W=1. If I drop
MODULE_DEVICE_TABLE() the warning appears. So unless proven otherwise I
claim the commit log and the patch are correct.
Best regards
Uwe
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2026-07-08 5:05 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-03 15:46 [PATCH v1 00/12] nfc: Various cleanups around device_id arrays Uwe Kleine-König (The Capable Hub)
2026-07-03 15:46 ` [PATCH v1 01/12] nfc: Drop __maybe_unused from acpi_device_id tables Uwe Kleine-König (The Capable Hub)
2026-07-03 15:46 ` [PATCH v1 02/12] nfc: Drop unused assignment of acpi_device_id driver data Uwe Kleine-König (The Capable Hub)
2026-07-03 15:46 ` [PATCH v1 03/12] nfc: Initialize acpi_device_id arrays using member names Uwe Kleine-König (The Capable Hub)
2026-07-07 17:12 ` Ian Ray
2026-07-03 15:46 ` [PATCH v1 04/12] nfc: Unify style of acpi_device_id arrays Uwe Kleine-König (The Capable Hub)
2026-07-03 15:46 ` [PATCH v1 05/12] nfc: pn544: Drop empty line between i2c_device_id array and MODULE_DEVICE_TABLE() Uwe Kleine-König (The Capable Hub)
2026-07-03 15:46 ` [PATCH v1 06/12] nfc: Initialize mei_cl_device_idarrays using member names Uwe Kleine-König (The Capable Hub)
2026-07-03 15:46 ` [PATCH v1 07/12] nfc: Drop __maybe_unused from of_device_id tables Uwe Kleine-König (The Capable Hub)
2026-07-07 17:28 ` Krzysztof Kozlowski
2026-07-08 5:05 ` Uwe Kleine-König (The Capable Hub) [this message]
2026-07-03 15:46 ` [PATCH v1 08/12] nfc: Unify style of of_device_id arrays Uwe Kleine-König (The Capable Hub)
2026-07-07 17:13 ` Ian Ray
2026-07-03 15:46 ` [PATCH v1 09/12] nfc: Drop unused assignment of spi_device_id driver data Uwe Kleine-König (The Capable Hub)
2026-07-03 15:46 ` [PATCH v1 10/12] nfc: Initialize spi_device_idarrays using member names Uwe Kleine-König (The Capable Hub)
2026-07-03 15:46 ` [PATCH v1 11/12] nfc: Unify style of spi_device_id arrays Uwe Kleine-König (The Capable Hub)
2026-07-03 15:46 ` [PATCH v1 12/12] nfc: Unify style of usb_device_id arrays Uwe Kleine-König (The Capable Hub)
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=ak3YSbzhmHi75INN@monoceros \
--to=u.kleine-koenig@baylibre.com \
--cc=david@ixit.cz \
--cc=horms@kernel.org \
--cc=krzk@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=mgreer@animalcreek.com \
--cc=oe-linux-nfc@lists.linux.dev \
--cc=tomasz.unger@yahoo.pl \
/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.