mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] platform/x86: ideadpad-laptop: Clean up style warnings and checks
@ 2025-12-23 12:45 Benjamin Philip
  2025-12-23 15:08 ` Mark Pearson
  2026-01-06  8:55 ` Ilpo Järvinen
  0 siblings, 2 replies; 4+ messages in thread
From: Benjamin Philip @ 2025-12-23 12:45 UTC (permalink / raw)
  To: platform-driver-x86, linux-kernel
  Cc: Benjamin Philip, Mark Pearson, Derek J. Clark, Ike Panhc,
	Hans de Goede, Ilpo Järvinen

This commit makes some style changes to clean up the following
checkpatch warnings and checks at various places in ideapad.c:

- WARNING: quoted string split across lines
- WARNING: space prohibited between function name and open parenthesis '('
- WARNING: braces {} are not necessary for any arm of this statement
- CHECK: Alignment should match open parenthesis

We exceed the 80 column limit to fix the quoted string warning since
strings in question are user visible. See coding style, part 2 for
details.

Signed-off-by: Benjamin Philip <benjamin.philip495@gmail.com>
---
 drivers/platform/x86/lenovo/ideapad-laptop.c | 39 ++++++++------------
 1 file changed, 16 insertions(+), 23 deletions(-)

diff --git a/drivers/platform/x86/lenovo/ideapad-laptop.c
b/drivers/platform/x86/lenovo/ideapad-laptop.c
index 5171a077f62c..3d8a8b4f3e86 100644
--- a/drivers/platform/x86/lenovo/ideapad-laptop.c
+++ b/drivers/platform/x86/lenovo/ideapad-laptop.c
@@ -219,38 +219,32 @@ MODULE_PARM_DESC(no_bt_rfkill, "No rfkill for
bluetooth.");
 static bool allow_v4_dytc;
 module_param(allow_v4_dytc, bool, 0444);
 MODULE_PARM_DESC(allow_v4_dytc,
-	"Enable DYTC version 4 platform-profile support. "
-	"If you need this please report this to:
platform-driver-x86@vger.kernel.org");
+		 "Enable DYTC version 4 platform-profile support. If you need this
please report this to: platform-driver-x86@vger.kernel.org");

 static bool hw_rfkill_switch;
 module_param(hw_rfkill_switch, bool, 0444);
 MODULE_PARM_DESC(hw_rfkill_switch,
-	"Enable rfkill support for laptops with a hw on/off wifi switch/slider. "
-	"If you need this please report this to:
platform-driver-x86@vger.kernel.org");
+		 "Enable rfkill support for laptops with a hw on/off wifi
switch/slider. If you need this please report this to:
platform-driver-x86@vger.kernel.org");

 static bool set_fn_lock_led;
 module_param(set_fn_lock_led, bool, 0444);
 MODULE_PARM_DESC(set_fn_lock_led,
-	"Enable driver based updates of the fn-lock LED on fn-lock changes. "
-	"If you need this please report this to:
platform-driver-x86@vger.kernel.org");
+		 "Enable driver based updates of the fn-lock LED on fn-lock
changes. If you need this please report this to:
platform-driver-x86@vger.kernel.org");

 static bool ctrl_ps2_aux_port;
 module_param(ctrl_ps2_aux_port, bool, 0444);
 MODULE_PARM_DESC(ctrl_ps2_aux_port,
-	"Enable driver based PS/2 aux port en-/dis-abling on touchpad on/off toggle. "
-	"If you need this please report this to:
platform-driver-x86@vger.kernel.org");
+		 "Enable driver based PS/2 aux port en-/dis-abling on touchpad
on/off toggle. If you need this please report this to:
platform-driver-x86@vger.kernel.org");

 static bool touchpad_ctrl_via_ec;
 module_param(touchpad_ctrl_via_ec, bool, 0444);
 MODULE_PARM_DESC(touchpad_ctrl_via_ec,
-	"Enable registering a 'touchpad' sysfs-attribute which can be used
to manually "
-	"tell the EC to enable/disable the touchpad. This may not work on
all models.");
+		 "Enable registering a 'touchpad' sysfs-attribute which can be used
to manually tell the EC to enable/disable the touchpad. This may not
work on all models.");

 static bool ymc_ec_trigger __read_mostly;
 module_param(ymc_ec_trigger, bool, 0444);
 MODULE_PARM_DESC(ymc_ec_trigger,
-	"Enable EC triggering work-around to force emitting tablet mode events. "
-	"If you need this please report this to:
platform-driver-x86@vger.kernel.org");
+		 "Enable EC triggering work-around to force emitting tablet mode
events. If you need this please report this to:
platform-driver-x86@vger.kernel.org");

 /*
  * shared data
@@ -1446,7 +1440,7 @@ static void ideapad_check_special_buttons(struct
ideapad_private *priv)
 		if (read_ec_data(priv->adev->handle, VPCCMD_R_SPECIAL_BUTTONS, &value))
 			return;

-	for_each_set_bit (bit, &value, 16) {
+	for_each_set_bit(bit, &value, 16) {
 		switch (bit) {
 		case 6:	/* Z570 */
 		case 0:	/* Z580 */
@@ -1706,11 +1700,10 @@ static int ideapad_kbd_bl_init(struct
ideapad_private *priv)
 	if (WARN_ON(priv->kbd_bl.initialized))
 		return -EEXIST;

-	if (ideapad_kbd_bl_check_tristate(priv->kbd_bl.type)) {
+	if (ideapad_kbd_bl_check_tristate(priv->kbd_bl.type))
 		priv->kbd_bl.led.max_brightness = 2;
-	} else {
+	else
 		priv->kbd_bl.led.max_brightness = 1;
-	}

 	brightness = ideapad_kbd_bl_brightness_get(priv);
 	if (brightness < 0)
@@ -1752,7 +1745,7 @@ static enum led_brightness
ideapad_fn_lock_led_cdev_get(struct led_classdev *led
 }

 static int ideapad_fn_lock_led_cdev_set(struct led_classdev *led_cdev,
-	enum led_brightness brightness)
+					enum led_brightness brightness)
 {
 	struct ideapad_private *priv = container_of(led_cdev, struct
ideapad_private, fn_lock.led);

@@ -1928,7 +1921,7 @@ static void ideapad_acpi_notify(acpi_handle
handle, u32 event, void *data)

 	vpc1 = (vpc2 << 8) | vpc1;

-	for_each_set_bit (bit, &vpc1, 16) {
+	for_each_set_bit(bit, &vpc1, 16) {
 		switch (bit) {
 		case 13:
 		case 11:
@@ -2142,14 +2135,14 @@ static const enum power_supply_property
ideapad_power_supply_props[] = {
 	}

 DEFINE_IDEAPAD_POWER_SUPPLY_EXTENSION(ideapad_battery_ext_v1,
-	(BIT(POWER_SUPPLY_CHARGE_TYPE_STANDARD) |
-	 BIT(POWER_SUPPLY_CHARGE_TYPE_LONGLIFE))
+				      (BIT(POWER_SUPPLY_CHARGE_TYPE_STANDARD) |
+				       BIT(POWER_SUPPLY_CHARGE_TYPE_LONGLIFE))
 );

 DEFINE_IDEAPAD_POWER_SUPPLY_EXTENSION(ideapad_battery_ext_v2,
-	(BIT(POWER_SUPPLY_CHARGE_TYPE_STANDARD) |
-	 BIT(POWER_SUPPLY_CHARGE_TYPE_FAST) |
-	 BIT(POWER_SUPPLY_CHARGE_TYPE_LONGLIFE))
+				      (BIT(POWER_SUPPLY_CHARGE_TYPE_STANDARD) |
+				       BIT(POWER_SUPPLY_CHARGE_TYPE_FAST) |
+				       BIT(POWER_SUPPLY_CHARGE_TYPE_LONGLIFE))
 );

 static int ideapad_battery_add(struct power_supply *battery, struct
acpi_battery_hook *hook)
-- 
2.52.0

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

* Re: [PATCH] platform/x86: ideadpad-laptop: Clean up style warnings and checks
  2025-12-23 12:45 [PATCH] platform/x86: ideadpad-laptop: Clean up style warnings and checks Benjamin Philip
@ 2025-12-23 15:08 ` Mark Pearson
  2026-01-06  8:55 ` Ilpo Järvinen
  1 sibling, 0 replies; 4+ messages in thread
From: Mark Pearson @ 2025-12-23 15:08 UTC (permalink / raw)
  To: Benjamin Philip, platform-driver-x86, linux-kernel
  Cc: Derek J . Clark, Ike Panhc, Hans de Goede, Ilpo Järvinen

On Tue, Dec 23, 2025, at 7:45 AM, Benjamin Philip wrote:
> This commit makes some style changes to clean up the following
> checkpatch warnings and checks at various places in ideapad.c:
>
> - WARNING: quoted string split across lines
> - WARNING: space prohibited between function name and open parenthesis '('
> - WARNING: braces {} are not necessary for any arm of this statement
> - CHECK: Alignment should match open parenthesis
>
> We exceed the 80 column limit to fix the quoted string warning since
> strings in question are user visible. See coding style, part 2 for
> details.
>
> Signed-off-by: Benjamin Philip <benjamin.philip495@gmail.com>
> ---
>  drivers/platform/x86/lenovo/ideapad-laptop.c | 39 ++++++++------------
>  1 file changed, 16 insertions(+), 23 deletions(-)
>
> diff --git a/drivers/platform/x86/lenovo/ideapad-laptop.c
> b/drivers/platform/x86/lenovo/ideapad-laptop.c
> index 5171a077f62c..3d8a8b4f3e86 100644
> --- a/drivers/platform/x86/lenovo/ideapad-laptop.c
> +++ b/drivers/platform/x86/lenovo/ideapad-laptop.c
> @@ -219,38 +219,32 @@ MODULE_PARM_DESC(no_bt_rfkill, "No rfkill for
> bluetooth.");
>  static bool allow_v4_dytc;
>  module_param(allow_v4_dytc, bool, 0444);
>  MODULE_PARM_DESC(allow_v4_dytc,
> -	"Enable DYTC version 4 platform-profile support. "
> -	"If you need this please report this to:
> platform-driver-x86@vger.kernel.org");
> +		 "Enable DYTC version 4 platform-profile support. If you need this
> please report this to: platform-driver-x86@vger.kernel.org");
>
>  static bool hw_rfkill_switch;
>  module_param(hw_rfkill_switch, bool, 0444);
>  MODULE_PARM_DESC(hw_rfkill_switch,
> -	"Enable rfkill support for laptops with a hw on/off wifi switch/slider. "
> -	"If you need this please report this to:
> platform-driver-x86@vger.kernel.org");
> +		 "Enable rfkill support for laptops with a hw on/off wifi
> switch/slider. If you need this please report this to:
> platform-driver-x86@vger.kernel.org");
>
>  static bool set_fn_lock_led;
>  module_param(set_fn_lock_led, bool, 0444);
>  MODULE_PARM_DESC(set_fn_lock_led,
> -	"Enable driver based updates of the fn-lock LED on fn-lock changes. "
> -	"If you need this please report this to:
> platform-driver-x86@vger.kernel.org");
> +		 "Enable driver based updates of the fn-lock LED on fn-lock
> changes. If you need this please report this to:
> platform-driver-x86@vger.kernel.org");
>
>  static bool ctrl_ps2_aux_port;
>  module_param(ctrl_ps2_aux_port, bool, 0444);
>  MODULE_PARM_DESC(ctrl_ps2_aux_port,
> -	"Enable driver based PS/2 aux port en-/dis-abling on touchpad on/off toggle. "
> -	"If you need this please report this to:
> platform-driver-x86@vger.kernel.org");
> +		 "Enable driver based PS/2 aux port en-/dis-abling on touchpad
> on/off toggle. If you need this please report this to:
> platform-driver-x86@vger.kernel.org");
>
>  static bool touchpad_ctrl_via_ec;
>  module_param(touchpad_ctrl_via_ec, bool, 0444);
>  MODULE_PARM_DESC(touchpad_ctrl_via_ec,
> -	"Enable registering a 'touchpad' sysfs-attribute which can be used
> to manually "
> -	"tell the EC to enable/disable the touchpad. This may not work on
> all models.");
> +		 "Enable registering a 'touchpad' sysfs-attribute which can be used
> to manually tell the EC to enable/disable the touchpad. This may not
> work on all models.");
>
>  static bool ymc_ec_trigger __read_mostly;
>  module_param(ymc_ec_trigger, bool, 0444);
>  MODULE_PARM_DESC(ymc_ec_trigger,
> -	"Enable EC triggering work-around to force emitting tablet mode events. "
> -	"If you need this please report this to:
> platform-driver-x86@vger.kernel.org");
> +		 "Enable EC triggering work-around to force emitting tablet mode
> events. If you need this please report this to:
> platform-driver-x86@vger.kernel.org");
>
>  /*
>   * shared data
> @@ -1446,7 +1440,7 @@ static void ideapad_check_special_buttons(struct
> ideapad_private *priv)
>  		if (read_ec_data(priv->adev->handle, VPCCMD_R_SPECIAL_BUTTONS, &value))
>  			return;
>
> -	for_each_set_bit (bit, &value, 16) {
> +	for_each_set_bit(bit, &value, 16) {
>  		switch (bit) {
>  		case 6:	/* Z570 */
>  		case 0:	/* Z580 */
> @@ -1706,11 +1700,10 @@ static int ideapad_kbd_bl_init(struct
> ideapad_private *priv)
>  	if (WARN_ON(priv->kbd_bl.initialized))
>  		return -EEXIST;
>
> -	if (ideapad_kbd_bl_check_tristate(priv->kbd_bl.type)) {
> +	if (ideapad_kbd_bl_check_tristate(priv->kbd_bl.type))
>  		priv->kbd_bl.led.max_brightness = 2;
> -	} else {
> +	else
>  		priv->kbd_bl.led.max_brightness = 1;
> -	}
>
>  	brightness = ideapad_kbd_bl_brightness_get(priv);
>  	if (brightness < 0)
> @@ -1752,7 +1745,7 @@ static enum led_brightness
> ideapad_fn_lock_led_cdev_get(struct led_classdev *led
>  }
>
>  static int ideapad_fn_lock_led_cdev_set(struct led_classdev *led_cdev,
> -	enum led_brightness brightness)
> +					enum led_brightness brightness)
>  {
>  	struct ideapad_private *priv = container_of(led_cdev, struct
> ideapad_private, fn_lock.led);
>
> @@ -1928,7 +1921,7 @@ static void ideapad_acpi_notify(acpi_handle
> handle, u32 event, void *data)
>
>  	vpc1 = (vpc2 << 8) | vpc1;
>
> -	for_each_set_bit (bit, &vpc1, 16) {
> +	for_each_set_bit(bit, &vpc1, 16) {
>  		switch (bit) {
>  		case 13:
>  		case 11:
> @@ -2142,14 +2135,14 @@ static const enum power_supply_property
> ideapad_power_supply_props[] = {
>  	}
>
>  DEFINE_IDEAPAD_POWER_SUPPLY_EXTENSION(ideapad_battery_ext_v1,
> -	(BIT(POWER_SUPPLY_CHARGE_TYPE_STANDARD) |
> -	 BIT(POWER_SUPPLY_CHARGE_TYPE_LONGLIFE))
> +				      (BIT(POWER_SUPPLY_CHARGE_TYPE_STANDARD) |
> +				       BIT(POWER_SUPPLY_CHARGE_TYPE_LONGLIFE))
>  );
>
>  DEFINE_IDEAPAD_POWER_SUPPLY_EXTENSION(ideapad_battery_ext_v2,
> -	(BIT(POWER_SUPPLY_CHARGE_TYPE_STANDARD) |
> -	 BIT(POWER_SUPPLY_CHARGE_TYPE_FAST) |
> -	 BIT(POWER_SUPPLY_CHARGE_TYPE_LONGLIFE))
> +				      (BIT(POWER_SUPPLY_CHARGE_TYPE_STANDARD) |
> +				       BIT(POWER_SUPPLY_CHARGE_TYPE_FAST) |
> +				       BIT(POWER_SUPPLY_CHARGE_TYPE_LONGLIFE))
>  );
>
>  static int ideapad_battery_add(struct power_supply *battery, struct
> acpi_battery_hook *hook)
> -- 
> 2.52.0

Looks good to me.
Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca>
Mark

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

* Re: [PATCH] platform/x86: ideadpad-laptop: Clean up style warnings and checks
  2025-12-23 12:45 [PATCH] platform/x86: ideadpad-laptop: Clean up style warnings and checks Benjamin Philip
  2025-12-23 15:08 ` Mark Pearson
@ 2026-01-06  8:55 ` Ilpo Järvinen
  2026-01-06 18:53   ` Benjamin Philip
  1 sibling, 1 reply; 4+ messages in thread
From: Ilpo Järvinen @ 2026-01-06  8:55 UTC (permalink / raw)
  To: Benjamin Philip
  Cc: platform-driver-x86, LKML, Mark Pearson, Derek J. Clark,
	Ike Panhc, Hans de Goede

On Tue, 23 Dec 2025, Benjamin Philip wrote:

> This commit makes some style changes to clean up the following
> checkpatch warnings and checks at various places in ideapad.c:
> 
> - WARNING: quoted string split across lines
> - WARNING: space prohibited between function name and open parenthesis '('
> - WARNING: braces {} are not necessary for any arm of this statement
> - CHECK: Alignment should match open parenthesis
> 
> We exceed the 80 column limit to fix the quoted string warning since
> strings in question are user visible. See coding style, part 2 for
> details.
> 
> Signed-off-by: Benjamin Philip <benjamin.philip495@gmail.com>

This patch has some formatting issue.

--
 i.

> ---
>  drivers/platform/x86/lenovo/ideapad-laptop.c | 39 ++++++++------------
>  1 file changed, 16 insertions(+), 23 deletions(-)
> 
> diff --git a/drivers/platform/x86/lenovo/ideapad-laptop.c
> b/drivers/platform/x86/lenovo/ideapad-laptop.c
> index 5171a077f62c..3d8a8b4f3e86 100644
> --- a/drivers/platform/x86/lenovo/ideapad-laptop.c
> +++ b/drivers/platform/x86/lenovo/ideapad-laptop.c
> @@ -219,38 +219,32 @@ MODULE_PARM_DESC(no_bt_rfkill, "No rfkill for
> bluetooth.");
>  static bool allow_v4_dytc;
>  module_param(allow_v4_dytc, bool, 0444);
>  MODULE_PARM_DESC(allow_v4_dytc,
> -	"Enable DYTC version 4 platform-profile support. "
> -	"If you need this please report this to:
> platform-driver-x86@vger.kernel.org");
> +		 "Enable DYTC version 4 platform-profile support. If you need this
> please report this to: platform-driver-x86@vger.kernel.org");
> 
>  static bool hw_rfkill_switch;
>  module_param(hw_rfkill_switch, bool, 0444);
>  MODULE_PARM_DESC(hw_rfkill_switch,
> -	"Enable rfkill support for laptops with a hw on/off wifi switch/slider. "
> -	"If you need this please report this to:
> platform-driver-x86@vger.kernel.org");
> +		 "Enable rfkill support for laptops with a hw on/off wifi
> switch/slider. If you need this please report this to:
> platform-driver-x86@vger.kernel.org");
> 
>  static bool set_fn_lock_led;
>  module_param(set_fn_lock_led, bool, 0444);
>  MODULE_PARM_DESC(set_fn_lock_led,
> -	"Enable driver based updates of the fn-lock LED on fn-lock changes. "
> -	"If you need this please report this to:
> platform-driver-x86@vger.kernel.org");
> +		 "Enable driver based updates of the fn-lock LED on fn-lock
> changes. If you need this please report this to:
> platform-driver-x86@vger.kernel.org");
> 
>  static bool ctrl_ps2_aux_port;
>  module_param(ctrl_ps2_aux_port, bool, 0444);
>  MODULE_PARM_DESC(ctrl_ps2_aux_port,
> -	"Enable driver based PS/2 aux port en-/dis-abling on touchpad on/off toggle. "
> -	"If you need this please report this to:
> platform-driver-x86@vger.kernel.org");
> +		 "Enable driver based PS/2 aux port en-/dis-abling on touchpad
> on/off toggle. If you need this please report this to:
> platform-driver-x86@vger.kernel.org");
> 
>  static bool touchpad_ctrl_via_ec;
>  module_param(touchpad_ctrl_via_ec, bool, 0444);
>  MODULE_PARM_DESC(touchpad_ctrl_via_ec,
> -	"Enable registering a 'touchpad' sysfs-attribute which can be used
> to manually "
> -	"tell the EC to enable/disable the touchpad. This may not work on
> all models.");
> +		 "Enable registering a 'touchpad' sysfs-attribute which can be used
> to manually tell the EC to enable/disable the touchpad. This may not
> work on all models.");
> 
>  static bool ymc_ec_trigger __read_mostly;
>  module_param(ymc_ec_trigger, bool, 0444);
>  MODULE_PARM_DESC(ymc_ec_trigger,
> -	"Enable EC triggering work-around to force emitting tablet mode events. "
> -	"If you need this please report this to:
> platform-driver-x86@vger.kernel.org");
> +		 "Enable EC triggering work-around to force emitting tablet mode
> events. If you need this please report this to:
> platform-driver-x86@vger.kernel.org");
> 
>  /*
>   * shared data
> @@ -1446,7 +1440,7 @@ static void ideapad_check_special_buttons(struct
> ideapad_private *priv)
>  		if (read_ec_data(priv->adev->handle, VPCCMD_R_SPECIAL_BUTTONS, &value))
>  			return;
> 
> -	for_each_set_bit (bit, &value, 16) {
> +	for_each_set_bit(bit, &value, 16) {
>  		switch (bit) {
>  		case 6:	/* Z570 */
>  		case 0:	/* Z580 */
> @@ -1706,11 +1700,10 @@ static int ideapad_kbd_bl_init(struct
> ideapad_private *priv)
>  	if (WARN_ON(priv->kbd_bl.initialized))
>  		return -EEXIST;
> 
> -	if (ideapad_kbd_bl_check_tristate(priv->kbd_bl.type)) {
> +	if (ideapad_kbd_bl_check_tristate(priv->kbd_bl.type))
>  		priv->kbd_bl.led.max_brightness = 2;
> -	} else {
> +	else
>  		priv->kbd_bl.led.max_brightness = 1;
> -	}
> 
>  	brightness = ideapad_kbd_bl_brightness_get(priv);
>  	if (brightness < 0)
> @@ -1752,7 +1745,7 @@ static enum led_brightness
> ideapad_fn_lock_led_cdev_get(struct led_classdev *led
>  }
> 
>  static int ideapad_fn_lock_led_cdev_set(struct led_classdev *led_cdev,
> -	enum led_brightness brightness)
> +					enum led_brightness brightness)
>  {
>  	struct ideapad_private *priv = container_of(led_cdev, struct
> ideapad_private, fn_lock.led);
> 
> @@ -1928,7 +1921,7 @@ static void ideapad_acpi_notify(acpi_handle
> handle, u32 event, void *data)
> 
>  	vpc1 = (vpc2 << 8) | vpc1;
> 
> -	for_each_set_bit (bit, &vpc1, 16) {
> +	for_each_set_bit(bit, &vpc1, 16) {
>  		switch (bit) {
>  		case 13:
>  		case 11:
> @@ -2142,14 +2135,14 @@ static const enum power_supply_property
> ideapad_power_supply_props[] = {
>  	}
> 
>  DEFINE_IDEAPAD_POWER_SUPPLY_EXTENSION(ideapad_battery_ext_v1,
> -	(BIT(POWER_SUPPLY_CHARGE_TYPE_STANDARD) |
> -	 BIT(POWER_SUPPLY_CHARGE_TYPE_LONGLIFE))
> +				      (BIT(POWER_SUPPLY_CHARGE_TYPE_STANDARD) |
> +				       BIT(POWER_SUPPLY_CHARGE_TYPE_LONGLIFE))
>  );
> 
>  DEFINE_IDEAPAD_POWER_SUPPLY_EXTENSION(ideapad_battery_ext_v2,
> -	(BIT(POWER_SUPPLY_CHARGE_TYPE_STANDARD) |
> -	 BIT(POWER_SUPPLY_CHARGE_TYPE_FAST) |
> -	 BIT(POWER_SUPPLY_CHARGE_TYPE_LONGLIFE))
> +				      (BIT(POWER_SUPPLY_CHARGE_TYPE_STANDARD) |
> +				       BIT(POWER_SUPPLY_CHARGE_TYPE_FAST) |
> +				       BIT(POWER_SUPPLY_CHARGE_TYPE_LONGLIFE))
>  );
> 
>  static int ideapad_battery_add(struct power_supply *battery, struct
> acpi_battery_hook *hook)
> 

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

* Re: [PATCH] platform/x86: ideadpad-laptop: Clean up style warnings and checks
  2026-01-06  8:55 ` Ilpo Järvinen
@ 2026-01-06 18:53   ` Benjamin Philip
  0 siblings, 0 replies; 4+ messages in thread
From: Benjamin Philip @ 2026-01-06 18:53 UTC (permalink / raw)
  To: Ilpo Järvinen
  Cc: platform-driver-x86, LKML, Mark Pearson, Derek J. Clark,
	Ike Panhc, Hans de Goede

Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> writes:

> On Tue, 23 Dec 2025, Benjamin Philip wrote:
>
>> This commit makes some style changes to clean up the following
>> checkpatch warnings and checks at various places in ideapad.c:
>>
>> - WARNING: quoted string split across lines
>> - WARNING: space prohibited between function name and open parenthesis '('
>> - WARNING: braces {} are not necessary for any arm of this statement
>> - CHECK: Alignment should match open parenthesis
>>
>> We exceed the 80 column limit to fix the quoted string warning since
>> strings in question are user visible. See coding style, part 2 for
>> details.
>>
>> Signed-off-by: Benjamin Philip <benjamin.philip495@gmail.com>
>
> This patch has some formatting issue.
>
> --
>  i.
>

Sorry about that. Resent with formatting fixed.
Link: https://lore.kernel.org/platform-driver-x86/20260106184830.34426-1-benjamin.philip495@gmail.com/T/#u

-- bp

>> ---
>>  drivers/platform/x86/lenovo/ideapad-laptop.c | 39 ++++++++------------
>>  1 file changed, 16 insertions(+), 23 deletions(-)
>>
>> diff --git a/drivers/platform/x86/lenovo/ideapad-laptop.c
>> b/drivers/platform/x86/lenovo/ideapad-laptop.c
>> index 5171a077f62c..3d8a8b4f3e86 100644
>> --- a/drivers/platform/x86/lenovo/ideapad-laptop.c
>> +++ b/drivers/platform/x86/lenovo/ideapad-laptop.c
>> @@ -219,38 +219,32 @@ MODULE_PARM_DESC(no_bt_rfkill, "No rfkill for
>> bluetooth.");
>>  static bool allow_v4_dytc;
>>  module_param(allow_v4_dytc, bool, 0444);
>>  MODULE_PARM_DESC(allow_v4_dytc,
>> -	"Enable DYTC version 4 platform-profile support. "
>> -	"If you need this please report this to:
>> platform-driver-x86@vger.kernel.org");
>> +		 "Enable DYTC version 4 platform-profile support. If you need this
>> please report this to: platform-driver-x86@vger.kernel.org");
>>
>>  static bool hw_rfkill_switch;
>>  module_param(hw_rfkill_switch, bool, 0444);
>>  MODULE_PARM_DESC(hw_rfkill_switch,
>> -	"Enable rfkill support for laptops with a hw on/off wifi switch/slider. "
>> -	"If you need this please report this to:
>> platform-driver-x86@vger.kernel.org");
>> +		 "Enable rfkill support for laptops with a hw on/off wifi
>> switch/slider. If you need this please report this to:
>> platform-driver-x86@vger.kernel.org");
>>
>>  static bool set_fn_lock_led;
>>  module_param(set_fn_lock_led, bool, 0444);
>>  MODULE_PARM_DESC(set_fn_lock_led,
>> -	"Enable driver based updates of the fn-lock LED on fn-lock changes. "
>> -	"If you need this please report this to:
>> platform-driver-x86@vger.kernel.org");
>> +		 "Enable driver based updates of the fn-lock LED on fn-lock
>> changes. If you need this please report this to:
>> platform-driver-x86@vger.kernel.org");
>>
>>  static bool ctrl_ps2_aux_port;
>>  module_param(ctrl_ps2_aux_port, bool, 0444);
>>  MODULE_PARM_DESC(ctrl_ps2_aux_port,
>> -	"Enable driver based PS/2 aux port en-/dis-abling on touchpad on/off toggle. "
>> -	"If you need this please report this to:
>> platform-driver-x86@vger.kernel.org");
>> +		 "Enable driver based PS/2 aux port en-/dis-abling on touchpad
>> on/off toggle. If you need this please report this to:
>> platform-driver-x86@vger.kernel.org");
>>
>>  static bool touchpad_ctrl_via_ec;
>>  module_param(touchpad_ctrl_via_ec, bool, 0444);
>>  MODULE_PARM_DESC(touchpad_ctrl_via_ec,
>> -	"Enable registering a 'touchpad' sysfs-attribute which can be used
>> to manually "
>> -	"tell the EC to enable/disable the touchpad. This may not work on
>> all models.");
>> +		 "Enable registering a 'touchpad' sysfs-attribute which can be used
>> to manually tell the EC to enable/disable the touchpad. This may not
>> work on all models.");
>>
>>  static bool ymc_ec_trigger __read_mostly;
>>  module_param(ymc_ec_trigger, bool, 0444);
>>  MODULE_PARM_DESC(ymc_ec_trigger,
>> -	"Enable EC triggering work-around to force emitting tablet mode events. "
>> -	"If you need this please report this to:
>> platform-driver-x86@vger.kernel.org");
>> +		 "Enable EC triggering work-around to force emitting tablet mode
>> events. If you need this please report this to:
>> platform-driver-x86@vger.kernel.org");
>>
>>  /*
>>   * shared data
>> @@ -1446,7 +1440,7 @@ static void ideapad_check_special_buttons(struct
>> ideapad_private *priv)
>>  		if (read_ec_data(priv->adev->handle, VPCCMD_R_SPECIAL_BUTTONS, &value))
>>  			return;
>>
>> -	for_each_set_bit (bit, &value, 16) {
>> +	for_each_set_bit(bit, &value, 16) {
>>  		switch (bit) {
>>  		case 6:	/* Z570 */
>>  		case 0:	/* Z580 */
>> @@ -1706,11 +1700,10 @@ static int ideapad_kbd_bl_init(struct
>> ideapad_private *priv)
>>  	if (WARN_ON(priv->kbd_bl.initialized))
>>  		return -EEXIST;
>>
>> -	if (ideapad_kbd_bl_check_tristate(priv->kbd_bl.type)) {
>> +	if (ideapad_kbd_bl_check_tristate(priv->kbd_bl.type))
>>  		priv->kbd_bl.led.max_brightness = 2;
>> -	} else {
>> +	else
>>  		priv->kbd_bl.led.max_brightness = 1;
>> -	}
>>
>>  	brightness = ideapad_kbd_bl_brightness_get(priv);
>>  	if (brightness < 0)
>> @@ -1752,7 +1745,7 @@ static enum led_brightness
>> ideapad_fn_lock_led_cdev_get(struct led_classdev *led
>>  }
>>
>>  static int ideapad_fn_lock_led_cdev_set(struct led_classdev *led_cdev,
>> -	enum led_brightness brightness)
>> +					enum led_brightness brightness)
>>  {
>>  	struct ideapad_private *priv = container_of(led_cdev, struct
>> ideapad_private, fn_lock.led);
>>
>> @@ -1928,7 +1921,7 @@ static void ideapad_acpi_notify(acpi_handle
>> handle, u32 event, void *data)
>>
>>  	vpc1 = (vpc2 << 8) | vpc1;
>>
>> -	for_each_set_bit (bit, &vpc1, 16) {
>> +	for_each_set_bit(bit, &vpc1, 16) {
>>  		switch (bit) {
>>  		case 13:
>>  		case 11:
>> @@ -2142,14 +2135,14 @@ static const enum power_supply_property
>> ideapad_power_supply_props[] = {
>>  	}
>>
>>  DEFINE_IDEAPAD_POWER_SUPPLY_EXTENSION(ideapad_battery_ext_v1,
>> -	(BIT(POWER_SUPPLY_CHARGE_TYPE_STANDARD) |
>> -	 BIT(POWER_SUPPLY_CHARGE_TYPE_LONGLIFE))
>> +				      (BIT(POWER_SUPPLY_CHARGE_TYPE_STANDARD) |
>> +				       BIT(POWER_SUPPLY_CHARGE_TYPE_LONGLIFE))
>>  );
>>
>>  DEFINE_IDEAPAD_POWER_SUPPLY_EXTENSION(ideapad_battery_ext_v2,
>> -	(BIT(POWER_SUPPLY_CHARGE_TYPE_STANDARD) |
>> -	 BIT(POWER_SUPPLY_CHARGE_TYPE_FAST) |
>> -	 BIT(POWER_SUPPLY_CHARGE_TYPE_LONGLIFE))
>> +				      (BIT(POWER_SUPPLY_CHARGE_TYPE_STANDARD) |
>> +				       BIT(POWER_SUPPLY_CHARGE_TYPE_FAST) |
>> +				       BIT(POWER_SUPPLY_CHARGE_TYPE_LONGLIFE))
>>  );
>>
>>  static int ideapad_battery_add(struct power_supply *battery, struct
>> acpi_battery_hook *hook)
>>

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

end of thread, other threads:[~2026-01-06 18:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-23 12:45 [PATCH] platform/x86: ideadpad-laptop: Clean up style warnings and checks Benjamin Philip
2025-12-23 15:08 ` Mark Pearson
2026-01-06  8:55 ` Ilpo Järvinen
2026-01-06 18:53   ` Benjamin Philip

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®