Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Benjamin Philip and committed by
Ilpo Järvinen
2ccbdb61 118222e2

+16 -23
+16 -23
drivers/platform/x86/lenovo/ideapad-laptop.c
··· 219 219 static bool allow_v4_dytc; 220 220 module_param(allow_v4_dytc, bool, 0444); 221 221 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"); 224 223 225 224 static bool hw_rfkill_switch; 226 225 module_param(hw_rfkill_switch, bool, 0444); 227 226 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"); 230 228 231 229 static bool set_fn_lock_led; 232 230 module_param(set_fn_lock_led, bool, 0444); 233 231 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"); 236 233 237 234 static bool ctrl_ps2_aux_port; 238 235 module_param(ctrl_ps2_aux_port, bool, 0444); 239 236 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"); 242 238 243 239 static bool touchpad_ctrl_via_ec; 244 240 module_param(touchpad_ctrl_via_ec, bool, 0444); 245 241 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."); 248 243 249 244 static bool ymc_ec_trigger __read_mostly; 250 245 module_param(ymc_ec_trigger, bool, 0444); 251 246 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"); 254 248 255 249 /* 256 250 * shared data ··· 1440 1446 if (read_ec_data(priv->adev->handle, VPCCMD_R_SPECIAL_BUTTONS, &value)) 1441 1447 return; 1442 1448 1443 - for_each_set_bit (bit, &value, 16) { 1449 + for_each_set_bit(bit, &value, 16) { 1444 1450 switch (bit) { 1445 1451 case 6: /* Z570 */ 1446 1452 case 0: /* Z580 */ ··· 1700 1706 if (WARN_ON(priv->kbd_bl.initialized)) 1701 1707 return -EEXIST; 1702 1708 1703 - if (ideapad_kbd_bl_check_tristate(priv->kbd_bl.type)) { 1709 + if (ideapad_kbd_bl_check_tristate(priv->kbd_bl.type)) 1704 1710 priv->kbd_bl.led.max_brightness = 2; 1705 - } else { 1711 + else 1706 1712 priv->kbd_bl.led.max_brightness = 1; 1707 - } 1708 1713 1709 1714 brightness = ideapad_kbd_bl_brightness_get(priv); 1710 1715 if (brightness < 0) ··· 1745 1752 } 1746 1753 1747 1754 static int ideapad_fn_lock_led_cdev_set(struct led_classdev *led_cdev, 1748 - enum led_brightness brightness) 1755 + enum led_brightness brightness) 1749 1756 { 1750 1757 struct ideapad_private *priv = container_of(led_cdev, struct ideapad_private, fn_lock.led); 1751 1758 ··· 1921 1928 1922 1929 vpc1 = (vpc2 << 8) | vpc1; 1923 1930 1924 - for_each_set_bit (bit, &vpc1, 16) { 1931 + for_each_set_bit(bit, &vpc1, 16) { 1925 1932 switch (bit) { 1926 1933 case 13: 1927 1934 case 11: ··· 2135 2142 } 2136 2143 2137 2144 DEFINE_IDEAPAD_POWER_SUPPLY_EXTENSION(ideapad_battery_ext_v1, 2138 - (BIT(POWER_SUPPLY_CHARGE_TYPE_STANDARD) | 2139 - BIT(POWER_SUPPLY_CHARGE_TYPE_LONGLIFE)) 2145 + (BIT(POWER_SUPPLY_CHARGE_TYPE_STANDARD) | 2146 + BIT(POWER_SUPPLY_CHARGE_TYPE_LONGLIFE)) 2140 2147 ); 2141 2148 2142 2149 DEFINE_IDEAPAD_POWER_SUPPLY_EXTENSION(ideapad_battery_ext_v2, 2143 - (BIT(POWER_SUPPLY_CHARGE_TYPE_STANDARD) | 2144 - BIT(POWER_SUPPLY_CHARGE_TYPE_FAST) | 2145 - BIT(POWER_SUPPLY_CHARGE_TYPE_LONGLIFE)) 2150 + (BIT(POWER_SUPPLY_CHARGE_TYPE_STANDARD) | 2151 + BIT(POWER_SUPPLY_CHARGE_TYPE_FAST) | 2152 + BIT(POWER_SUPPLY_CHARGE_TYPE_LONGLIFE)) 2146 2153 ); 2147 2154 2148 2155 static int ideapad_battery_add(struct power_supply *battery, struct acpi_battery_hook *hook)