2020-07-01 08:33:21

by Lee Jones

[permalink] [raw]
Subject: [PATCH v2 26/30] misc: eeprom: at24: Tell the compiler that ACPI functions may not be used

... as is the case when !CONFIG_ACPI.

Fixes the following W=1 kernel build warning:

drivers/misc/eeprom/at24.c:228:36: warning: ‘at24_acpi_ids’ defined but not used [-Wunused-const-variable=]

Cc: Wolfram Sang <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
---
drivers/misc/eeprom/at24.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c
index 9ff18d4961ceb..2591c21b2b5d8 100644
--- a/drivers/misc/eeprom/at24.c
+++ b/drivers/misc/eeprom/at24.c
@@ -225,7 +225,7 @@ static const struct of_device_id at24_of_match[] = {
};
MODULE_DEVICE_TABLE(of, at24_of_match);

-static const struct acpi_device_id at24_acpi_ids[] = {
+static const struct acpi_device_id __maybe_unused at24_acpi_ids[] = {
{ "INT3499", (kernel_ulong_t)&at24_data_INT3499 },
{ "TPF0001", (kernel_ulong_t)&at24_data_24c1024 },
{ /* END OF LIST */ }
--
2.25.1


2020-07-01 08:52:01

by Wolfram Sang

[permalink] [raw]
Subject: Re: [PATCH v2 26/30] misc: eeprom: at24: Tell the compiler that ACPI functions may not be used

On Wed, Jul 01, 2020 at 09:31:14AM +0100, Lee Jones wrote:
> ... as is the case when !CONFIG_ACPI.
>
> Fixes the following W=1 kernel build warning:
>
> drivers/misc/eeprom/at24.c:228:36: warning: ‘at24_acpi_ids’ defined but not used [-Wunused-const-variable=]
>
> Cc: Wolfram Sang <[email protected]>
> Signed-off-by: Lee Jones <[email protected]>

Please CC the maintainer (Bartosz Golaszewski
<[email protected]>) and the I2C list. get_maintainer.pl will
help you doing that automatically. Please also mention if this is
planned to go in via a specific tree and want acks or if you want the
patches to be picked up individually.

> ---
> drivers/misc/eeprom/at24.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c
> index 9ff18d4961ceb..2591c21b2b5d8 100644
> --- a/drivers/misc/eeprom/at24.c
> +++ b/drivers/misc/eeprom/at24.c
> @@ -225,7 +225,7 @@ static const struct of_device_id at24_of_match[] = {
> };
> MODULE_DEVICE_TABLE(of, at24_of_match);
>
> -static const struct acpi_device_id at24_acpi_ids[] = {
> +static const struct acpi_device_id __maybe_unused at24_acpi_ids[] = {
> { "INT3499", (kernel_ulong_t)&at24_data_INT3499 },
> { "TPF0001", (kernel_ulong_t)&at24_data_24c1024 },
> { /* END OF LIST */ }
> --
> 2.25.1
>


Attachments:
(No filename) (1.35 kB)
signature.asc (849.00 B)
Download all attachments

2020-07-01 09:37:49

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH v2 26/30] misc: eeprom: at24: Tell the compiler that ACPI functions may not be used

... as is the case when !CONFIG_ACPI.

Fixes the following W=1 kernel build warning:

drivers/misc/eeprom/at24.c:228:36: warning: ‘at24_acpi_ids’ defined but not used [-Wunused-const-variable=]

Signed-off-by: Lee Jones <[email protected]>
---
- Resending to add the I2C ML and Bartosz to the conversation
- Looks like I missed them when running get_maintainer.pl
- This patch, like all the others in the set, should go in via Misc
- Although the patches are orthogonal, this makes life easier for Greg

drivers/misc/eeprom/at24.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c
index 9ff18d4961ceb..2591c21b2b5d8 100644
--- a/drivers/misc/eeprom/at24.c
+++ b/drivers/misc/eeprom/at24.c
@@ -225,7 +225,7 @@ static const struct of_device_id at24_of_match[] = {
};
MODULE_DEVICE_TABLE(of, at24_of_match);

-static const struct acpi_device_id at24_acpi_ids[] = {
+static const struct acpi_device_id __maybe_unused at24_acpi_ids[] = {
{ "INT3499", (kernel_ulong_t)&at24_data_INT3499 },
{ "TPF0001", (kernel_ulong_t)&at24_data_24c1024 },
{ /* END OF LIST */ }

2020-07-06 17:17:26

by Bartosz Golaszewski

[permalink] [raw]
Subject: Re: [PATCH v2 26/30] misc: eeprom: at24: Tell the compiler that ACPI functions may not be used

On Wed, Jul 1, 2020 at 11:36 AM Lee Jones <[email protected]> wrote:
>
> ... as is the case when !CONFIG_ACPI.
>
> Fixes the following W=1 kernel build warning:
>
> drivers/misc/eeprom/at24.c:228:36: warning: ‘at24_acpi_ids’ defined but not used [-Wunused-const-variable=]
>
> Signed-off-by: Lee Jones <[email protected]>
> ---
> - Resending to add the I2C ML and Bartosz to the conversation
> - Looks like I missed them when running get_maintainer.pl
> - This patch, like all the others in the set, should go in via Misc
> - Although the patches are orthogonal, this makes life easier for Greg
>
> drivers/misc/eeprom/at24.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c
> index 9ff18d4961ceb..2591c21b2b5d8 100644
> --- a/drivers/misc/eeprom/at24.c
> +++ b/drivers/misc/eeprom/at24.c
> @@ -225,7 +225,7 @@ static const struct of_device_id at24_of_match[] = {
> };
> MODULE_DEVICE_TABLE(of, at24_of_match);
>
> -static const struct acpi_device_id at24_acpi_ids[] = {
> +static const struct acpi_device_id __maybe_unused at24_acpi_ids[] = {
> { "INT3499", (kernel_ulong_t)&at24_data_INT3499 },
> { "TPF0001", (kernel_ulong_t)&at24_data_24c1024 },
> { /* END OF LIST */ }

Acked-by: Bartosz Golaszewski <[email protected]>

Please, drop the "Re:" prefix from the subject next time, I nearly
missed this in my inbox.

Thanks!
Bartosz