From: Lee Jones <lee.jones@linaro.org> To: broonie@kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, Lee Jones <lee.jones@linaro.org>, Daniel Mack <daniel@zonque.org>, Haojian Zhuang <haojian.zhuang@gmail.com>, Robert Jarzmik <robert.jarzmik@free.fr> Subject: [PATCH 13/14] spi: spi-pxa2xx: Do not define 'struct acpi_device_id' when Date: Wed, 15 Jul 2020 16:06:31 +0100 [thread overview] Message-ID: <20200715150632.409077-14-lee.jones@linaro.org> (raw) In-Reply-To: <20200715150632.409077-1-lee.jones@linaro.org> Since ACPI_PTR() is used to NULLify the value when !CONFIG_ACPI, struct 'pxa2xx_spi_acpi_match' becomes defined but unused. Fixes the following W=1 kernel build warning(s): drivers/spi/spi-pxa2xx.c:1435:36: warning: ‘pxa2xx_spi_acpi_match’ defined but not used [-Wunused-const-variable=] 1435 | static const struct acpi_device_id pxa2xx_spi_acpi_match[] = { | ^~~~~~~~~~~~~~~~~~~~~ Cc: Daniel Mack <daniel@zonque.org> Cc: Haojian Zhuang <haojian.zhuang@gmail.com> Cc: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Lee Jones <lee.jones@linaro.org> --- drivers/spi/spi-pxa2xx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c index 0040362b71622..814268405ab0b 100644 --- a/drivers/spi/spi-pxa2xx.c +++ b/drivers/spi/spi-pxa2xx.c @@ -1432,6 +1432,7 @@ static void cleanup(struct spi_device *spi) kfree(chip); } +#ifdef CONFIG_ACPI static const struct acpi_device_id pxa2xx_spi_acpi_match[] = { { "INT33C0", LPSS_LPT_SSP }, { "INT33C1", LPSS_LPT_SSP }, @@ -1442,6 +1443,7 @@ static const struct acpi_device_id pxa2xx_spi_acpi_match[] = { { }, }; MODULE_DEVICE_TABLE(acpi, pxa2xx_spi_acpi_match); +#endif /* * PCI IDs of compound devices that integrate both host controller and private -- 2.25.1
WARNING: multiple messages have this Message-ID (diff)
From: Lee Jones <lee.jones@linaro.org> To: broonie@kernel.org Cc: Robert Jarzmik <robert.jarzmik@free.fr>, linux-kernel@vger.kernel.org, Haojian Zhuang <haojian.zhuang@gmail.com>, linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Lee Jones <lee.jones@linaro.org>, Daniel Mack <daniel@zonque.org> Subject: [PATCH 13/14] spi: spi-pxa2xx: Do not define 'struct acpi_device_id' when Date: Wed, 15 Jul 2020 16:06:31 +0100 [thread overview] Message-ID: <20200715150632.409077-14-lee.jones@linaro.org> (raw) In-Reply-To: <20200715150632.409077-1-lee.jones@linaro.org> Since ACPI_PTR() is used to NULLify the value when !CONFIG_ACPI, struct 'pxa2xx_spi_acpi_match' becomes defined but unused. Fixes the following W=1 kernel build warning(s): drivers/spi/spi-pxa2xx.c:1435:36: warning: ‘pxa2xx_spi_acpi_match’ defined but not used [-Wunused-const-variable=] 1435 | static const struct acpi_device_id pxa2xx_spi_acpi_match[] = { | ^~~~~~~~~~~~~~~~~~~~~ Cc: Daniel Mack <daniel@zonque.org> Cc: Haojian Zhuang <haojian.zhuang@gmail.com> Cc: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Lee Jones <lee.jones@linaro.org> --- drivers/spi/spi-pxa2xx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c index 0040362b71622..814268405ab0b 100644 --- a/drivers/spi/spi-pxa2xx.c +++ b/drivers/spi/spi-pxa2xx.c @@ -1432,6 +1432,7 @@ static void cleanup(struct spi_device *spi) kfree(chip); } +#ifdef CONFIG_ACPI static const struct acpi_device_id pxa2xx_spi_acpi_match[] = { { "INT33C0", LPSS_LPT_SSP }, { "INT33C1", LPSS_LPT_SSP }, @@ -1442,6 +1443,7 @@ static const struct acpi_device_id pxa2xx_spi_acpi_match[] = { { }, }; MODULE_DEVICE_TABLE(acpi, pxa2xx_spi_acpi_match); +#endif /* * PCI IDs of compound devices that integrate both host controller and private -- 2.25.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-07-15 15:07 UTC|newest] Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-07-15 15:06 [PATCH 00/14] Rid W=1 warnings in SPI Lee Jones 2020-07-15 15:06 ` Lee Jones 2020-07-15 15:06 ` [PATCH 01/14] spi: spi-loopback-test: Fix formatting issues in function header blocks Lee Jones 2020-07-15 15:06 ` Lee Jones 2020-07-15 15:06 ` [PATCH 02/14] spi: spi-bitbang: Demote obvious misuse of kerneldoc to standard comment blocks Lee Jones 2020-07-15 15:06 ` Lee Jones 2020-07-15 15:06 ` [PATCH 03/14] spi: spi-davinci: Fix a few kerneldoc misspellings and API slippages Lee Jones 2020-07-15 15:06 ` Lee Jones 2020-07-15 15:06 ` [PATCH 04/14] spi: spi-ep93xx: Fix API slippage Lee Jones 2020-07-15 15:06 ` Lee Jones 2020-07-15 15:06 ` [PATCH 05/14] spi: spi-meson-spifc: Fix misdocumenting of 'dev' in 'struct meson_spifc' Lee Jones 2020-07-15 15:06 ` Lee Jones 2020-07-15 15:06 ` Lee Jones 2020-07-15 15:06 ` [PATCH 06/14] spi: spi-meson-spicc: Remove set but never used variable 'data' from meson_spicc_reset_fifo() Lee Jones 2020-07-15 15:06 ` Lee Jones 2020-07-15 15:06 ` Lee Jones 2020-07-15 15:06 ` [PATCH 07/14] spi: spi-s3c64xx: Add missing entries for structs 's3c64xx_spi_dma_data' and 's3c64xx_spi_dma_data' Lee Jones 2020-07-15 15:06 ` Lee Jones 2020-07-15 15:06 ` [PATCH 08/14] spi: spi-pl022: Provide missing struct attribute/function param docs Lee Jones 2020-07-15 15:06 ` Lee Jones 2020-07-16 13:59 ` Linus Walleij 2020-07-16 13:59 ` Linus Walleij 2020-07-15 15:06 ` [PATCH 09/14] spi: spi-zynq-qspi: Add description for 2 missing attributes/parameters Lee Jones 2020-07-15 15:06 ` Lee Jones 2020-07-16 7:19 ` Michal Simek 2020-07-16 7:19 ` Michal Simek 2020-07-15 15:06 ` [PATCH 10/14] spi: spi-zynqmp-gqspi: Correct a couple of misspellings in kerneldoc Lee Jones 2020-07-15 15:06 ` Lee Jones 2020-07-16 7:20 ` Michal Simek 2020-07-16 7:20 ` Michal Simek 2020-07-15 15:06 ` [PATCH 11/14] spi: spi-topcliff-pch: Add missing descriptions to 'struct pch_spi_data' Lee Jones 2020-07-15 15:06 ` Lee Jones 2020-07-15 15:06 ` [PATCH 12/14] spi: spi-at91-usart: Make use of the defined 'struct of_device_id' Lee Jones 2020-07-15 15:06 ` Lee Jones 2020-07-15 21:24 ` Alexandre Belloni 2020-07-15 21:24 ` Alexandre Belloni 2020-07-16 7:56 ` Lee Jones 2020-07-16 7:56 ` Lee Jones 2020-07-16 8:50 ` Alexandre Belloni 2020-07-16 8:50 ` Alexandre Belloni 2020-07-15 15:06 ` Lee Jones [this message] 2020-07-15 15:06 ` [PATCH 13/14] spi: spi-pxa2xx: Do not define 'struct acpi_device_id' when Lee Jones 2020-07-15 15:06 ` [PATCH 14/14] spi: spi-amd: " Lee Jones 2020-07-15 15:06 ` Lee Jones 2020-07-20 11:12 ` [PATCH 00/14] Rid W=1 warnings in SPI Mark Brown 2020-07-20 11:12 ` Mark Brown
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=20200715150632.409077-14-lee.jones@linaro.org \ --to=lee.jones@linaro.org \ --cc=broonie@kernel.org \ --cc=daniel@zonque.org \ --cc=haojian.zhuang@gmail.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-spi@vger.kernel.org \ --cc=robert.jarzmik@free.fr \ /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: linkBe 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.