* [PATCH v1 1/1] platform/x86/intel: punit_ipc: Drop wrong use of ACPI_PTR()
@ 2021-08-27 14:53 Andy Shevchenko
2021-09-13 8:38 ` Hans de Goede
0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2021-08-27 14:53 UTC (permalink / raw)
To: Hans de Goede, Andy Shevchenko, platform-driver-x86, linux-kernel
Cc: Zha Qipeng, Mark Gross, kernel test robot
ACPI_PTR() is more harmful than helpful. For example, in this case
if CONFIG_ACPI=n, the ID table left unused which is not what we want.
Instead of adding ifdeffery here and there, drop ACPI_PTR()
and unused acpi.h.
Fixes: fdca4f16f57d ("platform:x86: add Intel P-Unit mailbox IPC driver")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/platform/x86/intel/punit_ipc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/platform/x86/intel/punit_ipc.c b/drivers/platform/x86/intel/punit_ipc.c
index f58b8543f6ac..66bb39fd0ef9 100644
--- a/drivers/platform/x86/intel/punit_ipc.c
+++ b/drivers/platform/x86/intel/punit_ipc.c
@@ -8,7 +8,6 @@
* which provide mailbox interface for power management usage.
*/
-#include <linux/acpi.h>
#include <linux/bitops.h>
#include <linux/delay.h>
#include <linux/device.h>
@@ -319,7 +318,7 @@ static struct platform_driver intel_punit_ipc_driver = {
.remove = intel_punit_ipc_remove,
.driver = {
.name = "intel_punit_ipc",
- .acpi_match_table = ACPI_PTR(punit_ipc_acpi_ids),
+ .acpi_match_table = punit_ipc_acpi_ids,
},
};
--
2.33.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v1 1/1] platform/x86/intel: punit_ipc: Drop wrong use of ACPI_PTR()
2021-08-27 14:53 [PATCH v1 1/1] platform/x86/intel: punit_ipc: Drop wrong use of ACPI_PTR() Andy Shevchenko
@ 2021-09-13 8:38 ` Hans de Goede
0 siblings, 0 replies; 2+ messages in thread
From: Hans de Goede @ 2021-09-13 8:38 UTC (permalink / raw)
To: Andy Shevchenko, platform-driver-x86, linux-kernel
Cc: Zha Qipeng, Mark Gross, kernel test robot
Hi,
On 8/27/21 4:53 PM, Andy Shevchenko wrote:
> ACPI_PTR() is more harmful than helpful. For example, in this case
> if CONFIG_ACPI=n, the ID table left unused which is not what we want.
>
> Instead of adding ifdeffery here and there, drop ACPI_PTR()
> and unused acpi.h.
>
> Fixes: fdca4f16f57d ("platform:x86: add Intel P-Unit mailbox IPC driver")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Thank you for your patch, I've applied this patch to my review-hans
branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans
I will also add this to the fixes branch, so that it gets send out
to Linus in my next pull-request with fixes for 5.15.
Once I've run some tests on this branch the patches there will be
added to the platform-drivers-x86/for-next branch and eventually
will be included in the pdx86 pull-request to Linus for the next
merge-window.
Regards,
Hans
> ---
> drivers/platform/x86/intel/punit_ipc.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/platform/x86/intel/punit_ipc.c b/drivers/platform/x86/intel/punit_ipc.c
> index f58b8543f6ac..66bb39fd0ef9 100644
> --- a/drivers/platform/x86/intel/punit_ipc.c
> +++ b/drivers/platform/x86/intel/punit_ipc.c
> @@ -8,7 +8,6 @@
> * which provide mailbox interface for power management usage.
> */
>
> -#include <linux/acpi.h>
> #include <linux/bitops.h>
> #include <linux/delay.h>
> #include <linux/device.h>
> @@ -319,7 +318,7 @@ static struct platform_driver intel_punit_ipc_driver = {
> .remove = intel_punit_ipc_remove,
> .driver = {
> .name = "intel_punit_ipc",
> - .acpi_match_table = ACPI_PTR(punit_ipc_acpi_ids),
> + .acpi_match_table = punit_ipc_acpi_ids,
> },
> };
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-09-13 8:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-27 14:53 [PATCH v1 1/1] platform/x86/intel: punit_ipc: Drop wrong use of ACPI_PTR() Andy Shevchenko
2021-09-13 8:38 ` Hans de Goede
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).