From: Jarkko Sakkinen <jarkko@kernel.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Peter Huewe <peterhuewe@gmx.de>, Jason Gunthorpe <jgg@ziepe.ca>,
linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] tpm: st33zp24: Mark ACPI and OF related data as maybe unused
Date: Mon, 20 Mar 2023 15:49:09 +0200 [thread overview]
Message-ID: <20230320134909.kzemkumkibiu7bwe@kernel.org> (raw)
In-Reply-To: <20230319141354.22907-1-krzysztof.kozlowski@linaro.org>
On Sun, Mar 19, 2023 at 03:13:53PM +0100, Krzysztof Kozlowski wrote:
> The driver can be compile tested with !CONFIG_OF or !CONFIG_ACPI making
> unused. This fixes compile tests with W=1 by annotating device ID table
> as possibly unused:
>
> drivers/char/tpm/st33zp24/i2c.c:141:34: error: ‘of_st33zp24_i2c_match’ defined but not used [-Werror=unused-const-variable=]
> drivers/char/tpm/st33zp24/spi.c:258:34: error: ‘of_st33zp24_spi_match’ defined but not used [-Werror=unused-const-variable=]
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>
> ---
>
> Changes since v1:
> 1. Enhance commit msg.
> ---
> drivers/char/tpm/st33zp24/i2c.c | 4 ++--
> drivers/char/tpm/st33zp24/spi.c | 4 ++--
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/char/tpm/st33zp24/i2c.c b/drivers/char/tpm/st33zp24/i2c.c
> index c4d0b744e3cc..2d28f55ef490 100644
> --- a/drivers/char/tpm/st33zp24/i2c.c
> +++ b/drivers/char/tpm/st33zp24/i2c.c
> @@ -138,13 +138,13 @@ static const struct i2c_device_id st33zp24_i2c_id[] = {
> };
> MODULE_DEVICE_TABLE(i2c, st33zp24_i2c_id);
>
> -static const struct of_device_id of_st33zp24_i2c_match[] = {
> +static const struct of_device_id of_st33zp24_i2c_match[] __maybe_unused = {
> { .compatible = "st,st33zp24-i2c", },
> {}
> };
> MODULE_DEVICE_TABLE(of, of_st33zp24_i2c_match);
>
> -static const struct acpi_device_id st33zp24_i2c_acpi_match[] = {
> +static const struct acpi_device_id st33zp24_i2c_acpi_match[] __maybe_unused = {
> {"SMO3324"},
> {}
> };
> diff --git a/drivers/char/tpm/st33zp24/spi.c b/drivers/char/tpm/st33zp24/spi.c
> index 2154059f0235..f5811b301d3b 100644
> --- a/drivers/char/tpm/st33zp24/spi.c
> +++ b/drivers/char/tpm/st33zp24/spi.c
> @@ -255,13 +255,13 @@ static const struct spi_device_id st33zp24_spi_id[] = {
> };
> MODULE_DEVICE_TABLE(spi, st33zp24_spi_id);
>
> -static const struct of_device_id of_st33zp24_spi_match[] = {
> +static const struct of_device_id of_st33zp24_spi_match[] __maybe_unused = {
> { .compatible = "st,st33zp24-spi", },
> {}
> };
> MODULE_DEVICE_TABLE(of, of_st33zp24_spi_match);
>
> -static const struct acpi_device_id st33zp24_spi_acpi_match[] = {
> +static const struct acpi_device_id st33zp24_spi_acpi_match[] __maybe_unused = {
> {"SMO3324"},
> {}
> };
> --
> 2.34.1
>
To both:
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
BR, Jarkko
prev parent reply other threads:[~2023-03-20 13:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-19 14:13 Krzysztof Kozlowski
2023-03-19 14:13 ` [PATCH v2 2/2] tpm: tpm_tis_spi: " Krzysztof Kozlowski
2023-03-20 13:49 ` Jarkko Sakkinen [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=20230320134909.kzemkumkibiu7bwe@kernel.org \
--to=jarkko@kernel.org \
--cc=jgg@ziepe.ca \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterhuewe@gmx.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
all inboxes | Powered by JetHome®