linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/1] HID: i2c-hid: acpi: Drop redundant ACPI_PTR()
@ 2021-02-26 18:28 Andy Shevchenko
  2021-02-26 18:45 ` Andy Shevchenko
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2021-02-26 18:28 UTC (permalink / raw)
  To: Douglas Anderson, Andy Shevchenko, linux-input, linux-kernel
  Cc: Jiri Kosina, Benjamin Tissoires

The driver depends on ACPI, ACPI_PTR() resolution is always the same.
Otherwise a compiler may produce a warning.

That said, the rule of thumb either ugly ifdeffery with ACPI_PTR or
none should be used in a driver.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/hid/i2c-hid/i2c-hid-acpi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hid/i2c-hid/i2c-hid-acpi.c b/drivers/hid/i2c-hid/i2c-hid-acpi.c
index 00bbd218f1e8..d35ff3f16a5b 100644
--- a/drivers/hid/i2c-hid/i2c-hid-acpi.c
+++ b/drivers/hid/i2c-hid/i2c-hid-acpi.c
@@ -131,7 +131,7 @@ static struct i2c_driver i2c_hid_acpi_driver = {
 		.name	= "i2c_hid_acpi",
 		.pm	= &i2c_hid_core_pm,
 		.probe_type = PROBE_PREFER_ASYNCHRONOUS,
-		.acpi_match_table = ACPI_PTR(i2c_hid_acpi_match),
+		.acpi_match_table = i2c_hid_acpi_match,
 	},
 
 	.probe		= i2c_hid_acpi_probe,
-- 
2.30.0


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

* Re: [PATCH v1 1/1] HID: i2c-hid: acpi: Drop redundant ACPI_PTR()
  2021-02-26 18:28 [PATCH v1 1/1] HID: i2c-hid: acpi: Drop redundant ACPI_PTR() Andy Shevchenko
@ 2021-02-26 18:45 ` Andy Shevchenko
  0 siblings, 0 replies; 2+ messages in thread
From: Andy Shevchenko @ 2021-02-26 18:45 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Douglas Anderson, linux-input, Linux Kernel Mailing List,
	Jiri Kosina, Benjamin Tissoires

On Fri, Feb 26, 2021 at 8:35 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> The driver depends on ACPI, ACPI_PTR() resolution is always the same.
> Otherwise a compiler may produce a warning.
>
> That said, the rule of thumb either ugly ifdeffery with ACPI_PTR or
> none should be used in a driver.

Oh, I see more improvements can be done, so, I will send this and the
rest as v2 altogether.

--
With Best Regards,
Andy Shevchenko

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

end of thread, other threads:[~2021-02-26 18:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-26 18:28 [PATCH v1 1/1] HID: i2c-hid: acpi: Drop redundant ACPI_PTR() Andy Shevchenko
2021-02-26 18:45 ` Andy Shevchenko

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).