Skip to content

Commit 2ccbdb6

Browse files
Benjamin-Philipij-intel
authored andcommitted
platform/x86: ideadpad-laptop: Clean up style warnings and checks
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> Acked-by: Ike Panhc <ikepanhc@gmail.com> Link: https://patch.msgid.link/20260106184830.34426-1-benjamin.philip495@gmail.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
1 parent 118222e commit 2ccbdb6

1 file changed

Lines changed: 16 additions & 23 deletions

File tree

drivers/platform/x86/lenovo/ideapad-laptop.c

Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -219,38 +219,32 @@ MODULE_PARM_DESC(no_bt_rfkill, "No rfkill for bluetooth.");
219219
static bool allow_v4_dytc;
220220
module_param(allow_v4_dytc, bool, 0444);
221221
MODULE_PARM_DESC(allow_v4_dytc,
222-
"Enable DYTC version 4 platform-profile support. "
223-
"If you need this please report this to: platform-driver-x86@vger.kernel.org");
222+
"Enable DYTC version 4 platform-profile support. If you need this please report this to: platform-driver-x86@vger.kernel.org");
224223

225224
static bool hw_rfkill_switch;
226225
module_param(hw_rfkill_switch, bool, 0444);
227226
MODULE_PARM_DESC(hw_rfkill_switch,
228-
"Enable rfkill support for laptops with a hw on/off wifi switch/slider. "
229-
"If you need this please report this to: platform-driver-x86@vger.kernel.org");
227+
"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");
230228

231229
static bool set_fn_lock_led;
232230
module_param(set_fn_lock_led, bool, 0444);
233231
MODULE_PARM_DESC(set_fn_lock_led,
234-
"Enable driver based updates of the fn-lock LED on fn-lock changes. "
235-
"If you need this please report this to: platform-driver-x86@vger.kernel.org");
232+
"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");
236233

237234
static bool ctrl_ps2_aux_port;
238235
module_param(ctrl_ps2_aux_port, bool, 0444);
239236
MODULE_PARM_DESC(ctrl_ps2_aux_port,
240-
"Enable driver based PS/2 aux port en-/dis-abling on touchpad on/off toggle. "
241-
"If you need this please report this to: platform-driver-x86@vger.kernel.org");
237+
"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");
242238

243239
static bool touchpad_ctrl_via_ec;
244240
module_param(touchpad_ctrl_via_ec, bool, 0444);
245241
MODULE_PARM_DESC(touchpad_ctrl_via_ec,
246-
"Enable registering a 'touchpad' sysfs-attribute which can be used to manually "
247-
"tell the EC to enable/disable the touchpad. This may not work on all models.");
242+
"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.");
248243

249244
static bool ymc_ec_trigger __read_mostly;
250245
module_param(ymc_ec_trigger, bool, 0444);
251246
MODULE_PARM_DESC(ymc_ec_trigger,
252-
"Enable EC triggering work-around to force emitting tablet mode events. "
253-
"If you need this please report this to: platform-driver-x86@vger.kernel.org");
247+
"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");
254248

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

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

1709-
if (ideapad_kbd_bl_check_tristate(priv->kbd_bl.type)) {
1703+
if (ideapad_kbd_bl_check_tristate(priv->kbd_bl.type))
17101704
priv->kbd_bl.led.max_brightness = 2;
1711-
} else {
1705+
else
17121706
priv->kbd_bl.led.max_brightness = 1;
1713-
}
17141707

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

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

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

19291922
vpc1 = (vpc2 << 8) | vpc1;
19301923

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

21442137
DEFINE_IDEAPAD_POWER_SUPPLY_EXTENSION(ideapad_battery_ext_v1,
2145-
(BIT(POWER_SUPPLY_CHARGE_TYPE_STANDARD) |
2146-
BIT(POWER_SUPPLY_CHARGE_TYPE_LONGLIFE))
2138+
(BIT(POWER_SUPPLY_CHARGE_TYPE_STANDARD) |
2139+
BIT(POWER_SUPPLY_CHARGE_TYPE_LONGLIFE))
21472140
);
21482141

21492142
DEFINE_IDEAPAD_POWER_SUPPLY_EXTENSION(ideapad_battery_ext_v2,
2150-
(BIT(POWER_SUPPLY_CHARGE_TYPE_STANDARD) |
2151-
BIT(POWER_SUPPLY_CHARGE_TYPE_FAST) |
2152-
BIT(POWER_SUPPLY_CHARGE_TYPE_LONGLIFE))
2143+
(BIT(POWER_SUPPLY_CHARGE_TYPE_STANDARD) |
2144+
BIT(POWER_SUPPLY_CHARGE_TYPE_FAST) |
2145+
BIT(POWER_SUPPLY_CHARGE_TYPE_LONGLIFE))
21532146
);
21542147

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

0 commit comments

Comments
 (0)