* [PATCH] iio: accel: mma7660: Mark acpi match table as maybe unused
@ 2021-09-19 7:26 Daniel Palmer
2021-09-19 16:03 ` Jonathan Cameron
0 siblings, 1 reply; 2+ messages in thread
From: Daniel Palmer @ 2021-09-19 7:26 UTC (permalink / raw)
To: jic23, lars, linux-iio; +Cc: linux-kernel, Daniel Palmer
When building kernels without ACPI support the table is declared
but is not used because ACPI_PTR() turns it into a NULL.
Add the __maybe_unused attribute to stop the compiler whining.
Signed-off-by: Daniel Palmer <daniel@0x0f.com>
---
drivers/iio/accel/mma7660.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/accel/mma7660.c b/drivers/iio/accel/mma7660.c
index 47f5cd66e996..cd6cdf2c51b0 100644
--- a/drivers/iio/accel/mma7660.c
+++ b/drivers/iio/accel/mma7660.c
@@ -254,7 +254,7 @@ static const struct of_device_id mma7660_of_match[] = {
};
MODULE_DEVICE_TABLE(of, mma7660_of_match);
-static const struct acpi_device_id mma7660_acpi_id[] = {
+static const struct acpi_device_id __maybe_unused mma7660_acpi_id[] = {
{"MMA7660", 0},
{}
};
--
2.33.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] iio: accel: mma7660: Mark acpi match table as maybe unused
2021-09-19 7:26 [PATCH] iio: accel: mma7660: Mark acpi match table as maybe unused Daniel Palmer
@ 2021-09-19 16:03 ` Jonathan Cameron
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2021-09-19 16:03 UTC (permalink / raw)
To: Daniel Palmer; +Cc: lars, linux-iio, linux-kernel
On Sun, 19 Sep 2021 16:26:16 +0900
Daniel Palmer <daniel@0x0f.com> wrote:
> When building kernels without ACPI support the table is declared
> but is not used because ACPI_PTR() turns it into a NULL.
>
> Add the __maybe_unused attribute to stop the compiler whining.
>
> Signed-off-by: Daniel Palmer <daniel@0x0f.com>
Applied to the togreg branch of iio.git which is initially pushed out as testing
to let 0-day poke at it and see if we missed anything.
Thanks,
Jonathan
> ---
> drivers/iio/accel/mma7660.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/accel/mma7660.c b/drivers/iio/accel/mma7660.c
> index 47f5cd66e996..cd6cdf2c51b0 100644
> --- a/drivers/iio/accel/mma7660.c
> +++ b/drivers/iio/accel/mma7660.c
> @@ -254,7 +254,7 @@ static const struct of_device_id mma7660_of_match[] = {
> };
> MODULE_DEVICE_TABLE(of, mma7660_of_match);
>
> -static const struct acpi_device_id mma7660_acpi_id[] = {
> +static const struct acpi_device_id __maybe_unused mma7660_acpi_id[] = {
> {"MMA7660", 0},
> {}
> };
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-09-19 15:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-19 7:26 [PATCH] iio: accel: mma7660: Mark acpi match table as maybe unused Daniel Palmer
2021-09-19 16:03 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox