Skip to contentSkip to conversation

platform/x86: quickstart: Miscellaneous improvements

PATCH In review Andy Shevchenko 3 participants 6 messages Mar 27, 2024 – Apr 8, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 platform/x86: quickstart: Miscellaneous improvements

There is a mix of a few improvements to the driver. I have done this instead of review, so it can quickly be folded into the original code (partially or fully).

---
 drivers/platform/x86/quickstart.c | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)
drivers/platform/x86/quickstart.c +10 -6
index ba3a7a25dda70..f686942662ccc 100644
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0-or-later
 /*
- * quickstart.c - ACPI Direct App Launch driver
+ * ACPI Direct App Launch driver
  *
  * Copyright (C) 2024 Armin Wolf <[email protected]>
  * Copyright (C) 2022 Arvid Norlander <[email protected]>
@@ -10,15 +10,18 @@
  * <https://archive.org/details/microsoft-acpi-dirapplaunch>
  */
 
-#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
-
 #include <linux/acpi.h>
+#include <linux/device.h>
+#include <linux/errno.h>
 #include <linux/init.h>
 #include <linux/input.h>
 #include <linux/input/sparse-keymap.h>
-#include <linux/kernel.h>
+#include <linux/mod_devicetable.h>
 #include <linux/module.h>
 #include <linux/platform_device.h>
+#include <linux/pm_wakeup.h>
+#include <linux/printk.h>
+#include <linux/slab.h>
 #include <linux/sysfs.h>
 #include <linux/types.h>
 
@@ -165,7 +168,8 @@ static int quickstart_probe(struct platform_device *pdev)
 	data->dev = &pdev->dev;
 	dev_set_drvdata(&pdev->dev, data);
 
-	/* We have to initialize the device wakeup before evaluating GHID because
+	/*
+	 * We have to initialize the device wakeup before evaluating GHID because
 	 * doing so will notify the device if the button was used to wake the machine
 	 * from S5.
 	 */
@@ -202,7 +206,7 @@ static int quickstart_probe(struct platform_device *pdev)
 }
 
 static const struct acpi_device_id quickstart_device_ids[] = {
-	{ "PNP0C32", 0 },
+	{ "PNP0C32" },
 	{ }
 };
 MODULE_DEVICE_TABLE(acpi, quickstart_device_ids);
Signature · 1 line
2.44.0
maintainer
#1 lore raw

Am 27.03.24 um 22:52 schrieb Andy Shevchenko:

Quoted 22 lines

There is a mix of a few improvements to the driver. I have done this instead of review, so it can quickly be folded into the original code (partially or fully).

---
  drivers/platform/x86/quickstart.c | 16 ++++++++++------
  1 file changed, 10 insertions(+), 6 deletions(-)
drivers/platform/x86/quickstart.c +1 -1
index ba3a7a25dda70..f686942662ccc 100644
@@ -1,6 +1,6 @@
  // SPDX-License-Identifier: GPL-2.0-or-later
  /*
- * quickstart.c - ACPI Direct App Launch driver
+ * ACPI Direct App Launch driver
   *
   * Copyright (C) 2024 Armin Wolf <[email protected]>
   * Copyright (C) 2022 Arvid Norlander <[email protected]>

drivers/platform/x86/quickstart.c line 14

Quoted 5 lines
drivers/platform/x86/quickstart.c +0 -2
@@ -10,15 +10,18 @@
   * <https://archive.org/details/microsoft-acpi-dirapplaunch>
   */
 
-#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
-

Hi,

that is the reason for removing this?

Quoted 35 lines
drivers/platform/x86/quickstart.c +9 -3
  #include <linux/acpi.h>
+#include <linux/device.h>
+#include <linux/errno.h>
  #include <linux/init.h>
  #include <linux/input.h>
  #include <linux/input/sparse-keymap.h>
-#include <linux/kernel.h>
+#include <linux/mod_devicetable.h>
  #include <linux/module.h>
  #include <linux/platform_device.h>
+#include <linux/pm_wakeup.h>
+#include <linux/printk.h>
+#include <linux/slab.h>
  #include <linux/sysfs.h>
  #include <linux/types.h>
 
@@ -165,7 +168,8 @@ static int quickstart_probe(struct platform_device *pdev)
  	data->dev = &pdev->dev;
  	dev_set_drvdata(&pdev->dev, data);
 
-	/* We have to initialize the device wakeup before evaluating GHID because
+	/*
+	 * We have to initialize the device wakeup before evaluating GHID because
  	 * doing so will notify the device if the button was used to wake the machine
  	 * from S5.
  	 */
@@ -202,7 +206,7 @@ static int quickstart_probe(struct platform_device *pdev)
  }
 
  static const struct acpi_device_id quickstart_device_ids[] = {
-	{ "PNP0C32", 0 },
+	{ "PNP0C32" },
  	{ }
  };
  MODULE_DEVICE_TABLE(acpi, quickstart_device_ids);
#2 lore raw
Quoted 1 line · Armin Wolf

Am 27.03.24 um 22:52 schrieb Andy Shevchenko:

...

Quoted 3 lines
Quoted 1 line

-#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

that is the reason for removing this?

Yes, it's a dead code. Likely the cargo cult line was copied from another driver.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
maintainer
#3 lore raw

Am 28.03.24 um 09:50 schrieb Andy Shevchenko:

Quoted 9 lines · Armin Wolf
Quoted 1 line

Am 27.03.24 um 22:52 schrieb Andy Shevchenko:

...

Quoted 2 lines
Quoted 1 line

-#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

that is the reason for removing this?

Yes, it's a dead code. Likely the cargo cult line was copied from another driver.

In that case: Reviewed-by: Armin Wolf <[email protected]>

#4 lore raw

Fri, Mar 29, 2024 at 01:23:25AM +0100, Armin Wolf kirjoitti:

Quoted 3 lines

Am 28.03.24 um 09:50 schrieb Andy Shevchenko:

Quoted 2 lines · Armin Wolf
Quoted 1 line

Am 27.03.24 um 22:52 schrieb Andy Shevchenko:

...

Quoted 6 lines
Quoted 5 lines
Quoted 2 lines
Quoted 1 line

-#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

that is the reason for removing this?

Yes, it's a dead code. Likely the cargo cult line was copied from another driver.

In that case: Reviewed-by: Armin Wolf <[email protected]>

Thank you!

You need to use a whole line for the tag.

P.S.
It seems Hans hadn't folded anything from here, so I will send a patch (series?) next week.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#5 lore raw

Hi,

Quoted 14 lines · Andy Shevchenko

Fri, Mar 29, 2024 at 01:23:25AM +0100, Armin Wolf kirjoitti:

Quoted 3 lines

Am 28.03.24 um 09:50 schrieb Andy Shevchenko:

Quoted 2 lines · Armin Wolf
Quoted 1 line

Am 27.03.24 um 22:52 schrieb Andy Shevchenko:

...

Quoted 6 lines
Quoted 5 lines
Quoted 2 lines
Quoted 1 line

-#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

that is the reason for removing this?

Yes, it's a dead code. Likely the cargo cult line was copied from another driver.

In that case: Reviewed-by: Armin Wolf <[email protected]>

Quoted 7 lines

Thank you!

You need to use a whole line for the tag.

P.S.
It seems Hans hadn't folded anything from here, so I will send a patch (series?) next week.

Sorry about being a bit slow with merging this. I usually process the pdx86 patch-queue on Monday and last Monday was a bank holiday.

I'm merging this (and the other quickstart driver fixes) today:

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

Note it will show up in my review-hans branch once I've pushed my local branch there, which might take a while.

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