linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] iio: imu: inv_mpu6050: Mark acpi match table as maybe unused
@ 2021-09-13 11:29 Daniel Palmer
  2021-09-13 12:19 ` Jean-Baptiste Maneyrol
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Palmer @ 2021-09-13 11:29 UTC (permalink / raw)
  To: jic23, lars, jmaneyrol, 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>
---
Ignore the first version. I'm an idiot and generated a patch,
check that it worked, noticed it didn't, fixed it up and then
forgot to regenerate the patch before sending it.

 drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c
index 95f16951c8f4..3ef17e3f50e2 100644
--- a/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c
+++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c
@@ -249,7 +249,7 @@ static const struct of_device_id inv_of_match[] = {
 };
 MODULE_DEVICE_TABLE(of, inv_of_match);
 
-static const struct acpi_device_id inv_acpi_match[] = {
+static const struct acpi_device_id __maybe_unused inv_acpi_match[] = {
 	{"INVN6500", INV_MPU6500},
 	{ },
 };
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] iio: imu: inv_mpu6050: Mark acpi match table as maybe unused
  2021-09-13 11:29 [PATCH v2] iio: imu: inv_mpu6050: Mark acpi match table as maybe unused Daniel Palmer
@ 2021-09-13 12:19 ` Jean-Baptiste Maneyrol
  2021-09-18 17:59   ` Jonathan Cameron
  0 siblings, 1 reply; 3+ messages in thread
From: Jean-Baptiste Maneyrol @ 2021-09-13 12:19 UTC (permalink / raw)
  To: Daniel Palmer, jic23, lars, linux-iio; +Cc: linux-kernel

Hello,

looks obviously good to me.
Thanks for your patch.

Acked-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>

Thanks,
JB

From: Daniel Palmer <daniel@0x0f.com>
Sent: Monday, September 13, 2021 13:29
To: jic23@kernel.org <jic23@kernel.org>; lars@metafoo.de <lars@metafoo.de>; Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>; linux-iio@vger.kernel.org <linux-iio@vger.kernel.org>
Cc: linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org>; Daniel Palmer <daniel@0x0f.com>
Subject: [PATCH v2] iio: imu: inv_mpu6050: Mark acpi match table as maybe unused 
 
 CAUTION: This email originated from outside of the organization. Please make sure the sender is who they say they are and do not click links or open attachments unless you recognize the sender and know the content is safe.

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>
---
Ignore the first version. I'm an idiot and generated a patch,
check that it worked, noticed it didn't, fixed it up and then
forgot to regenerate the patch before sending it.

 drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c
index 95f16951c8f4..3ef17e3f50e2 100644
--- a/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c
+++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c
@@ -249,7 +249,7 @@ static const struct of_device_id inv_of_match[] = {
 };
 MODULE_DEVICE_TABLE(of, inv_of_match);
 
-static const struct acpi_device_id inv_acpi_match[] = {
+static const struct acpi_device_id __maybe_unused inv_acpi_match[] = {
         {"INVN6500", INV_MPU6500},
         { },
 };
-- 
2.33.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] iio: imu: inv_mpu6050: Mark acpi match table as maybe unused
  2021-09-13 12:19 ` Jean-Baptiste Maneyrol
@ 2021-09-18 17:59   ` Jonathan Cameron
  0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Cameron @ 2021-09-18 17:59 UTC (permalink / raw)
  To: Jean-Baptiste Maneyrol; +Cc: Daniel Palmer, lars, linux-iio, linux-kernel

On Mon, 13 Sep 2021 12:19:10 +0000
Jean-Baptiste Maneyrol <JManeyrol@invensense.com> wrote:

> Hello,
> 
> looks obviously good to me.
> Thanks for your patch.
> 
> Acked-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>

Applied to the togreg branch of iio.git and pushed out as testing for
0-day to see if it can find anything we missed.

Thanks,

Jonathan

> 
> Thanks,
> JB
> 
> From: Daniel Palmer <daniel@0x0f.com>
> Sent: Monday, September 13, 2021 13:29
> To: jic23@kernel.org <jic23@kernel.org>; lars@metafoo.de <lars@metafoo.de>; Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>; linux-iio@vger.kernel.org <linux-iio@vger.kernel.org>
> Cc: linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org>; Daniel Palmer <daniel@0x0f.com>
> Subject: [PATCH v2] iio: imu: inv_mpu6050: Mark acpi match table as maybe unused 
>  
>  CAUTION: This email originated from outside of the organization. Please make sure the sender is who they say they are and do not click links or open attachments unless you recognize the sender and know the content is safe.
> 
> 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>
> ---
> Ignore the first version. I'm an idiot and generated a patch,
> check that it worked, noticed it didn't, fixed it up and then
> forgot to regenerate the patch before sending it.
> 
>  drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c
> index 95f16951c8f4..3ef17e3f50e2 100644
> --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c
> +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c
> @@ -249,7 +249,7 @@ static const struct of_device_id inv_of_match[] = {
>  };
>  MODULE_DEVICE_TABLE(of, inv_of_match);
>  
> -static const struct acpi_device_id inv_acpi_match[] = {
> +static const struct acpi_device_id __maybe_unused inv_acpi_match[] = {
>          {"INVN6500", INV_MPU6500},
>          { },
>  };


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-09-18 17:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-13 11:29 [PATCH v2] iio: imu: inv_mpu6050: Mark acpi match table as maybe unused Daniel Palmer
2021-09-13 12:19 ` Jean-Baptiste Maneyrol
2021-09-18 17:59   ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).