Skip to content

Commit b6237f6

Browse files
committed
Merge branch 'acpi-misc'
* acpi-misc: ACPI: dock: fix some coding style issues ACPI: sysfs: fix some coding style issues ACPI: PM: add a missed blank line after declarations ACPI: custom_method: fix a coding style issue ACPI: CPPC: fix some coding style issues ACPI: button: fix some coding style issues ACPI: battery: fix some coding style issues ACPI: acpi_pad: add a missed blank line after declarations ACPI: LPSS: add a missed blank line after declarations ACPI: ipmi: remove useless return statement for void function ACPI: processor: fix some coding style issues ACPI: APD: fix a block comment align issue ACPI: AC: fix some coding style issues ACPI: fix various typos in comments
2 parents aad659e + 6ee4bdc commit b6237f6

22 files changed

+130
-133
lines changed

drivers/acpi/ac.c

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// SPDX-License-Identifier: GPL-2.0-or-later
22
/*
3-
* acpi_ac.c - ACPI AC Adapter Driver ($Revision: 27 $)
3+
* acpi_ac.c - ACPI AC Adapter Driver (Revision: 27)
44
*
55
* Copyright (C) 2001, 2002 Andy Grover <[email protected]>
66
* Copyright (C) 2001, 2002 Paul Diefenbaugh <[email protected]>
@@ -78,17 +78,14 @@ static struct acpi_driver acpi_ac_driver = {
7878
struct acpi_ac {
7979
struct power_supply *charger;
8080
struct power_supply_desc charger_desc;
81-
struct acpi_device * device;
81+
struct acpi_device *device;
8282
unsigned long long state;
8383
struct notifier_block battery_nb;
8484
};
8585

8686
#define to_acpi_ac(x) power_supply_get_drvdata(x)
8787

88-
/* --------------------------------------------------------------------------
89-
AC Adapter Management
90-
-------------------------------------------------------------------------- */
91-
88+
/* AC Adapter Management */
9289
static int acpi_ac_get_state(struct acpi_ac *ac)
9390
{
9491
acpi_status status = AE_OK;
@@ -109,9 +106,7 @@ static int acpi_ac_get_state(struct acpi_ac *ac)
109106
return 0;
110107
}
111108

112-
/* --------------------------------------------------------------------------
113-
sysfs I/F
114-
-------------------------------------------------------------------------- */
109+
/* sysfs I/F */
115110
static int get_ac_property(struct power_supply *psy,
116111
enum power_supply_property psp,
117112
union power_supply_propval *val)
@@ -138,10 +133,7 @@ static enum power_supply_property ac_props[] = {
138133
POWER_SUPPLY_PROP_ONLINE,
139134
};
140135

141-
/* --------------------------------------------------------------------------
142-
Driver Model
143-
-------------------------------------------------------------------------- */
144-
136+
/* Driver Model */
145137
static void acpi_ac_notify(struct acpi_device *device, u32 event)
146138
{
147139
struct acpi_ac *ac = acpi_driver_data(device);
@@ -174,8 +166,6 @@ static void acpi_ac_notify(struct acpi_device *device, u32 event)
174166
acpi_notifier_call_chain(device, event, (u32) ac->state);
175167
kobject_uevent(&ac->charger->dev.kobj, KOBJ_CHANGE);
176168
}
177-
178-
return;
179169
}
180170

181171
static int acpi_ac_battery_notify(struct notifier_block *nb,
@@ -187,7 +177,7 @@ static int acpi_ac_battery_notify(struct notifier_block *nb,
187177
/*
188178
* On HP Pavilion dv6-6179er AC status notifications aren't triggered
189179
* when adapter is plugged/unplugged. However, battery status
190-
* notifcations are triggered when battery starts charging or
180+
* notifications are triggered when battery starts charging or
191181
* discharging. Re-reading AC status triggers lost AC notifications,
192182
* if AC status has changed.
193183
*/
@@ -282,9 +272,8 @@ static int acpi_ac_add(struct acpi_device *device)
282272
ac->battery_nb.notifier_call = acpi_ac_battery_notify;
283273
register_acpi_notifier(&ac->battery_nb);
284274
end:
285-
if (result) {
275+
if (result)
286276
kfree(ac);
287-
}
288277

289278
return result;
290279
}
@@ -293,7 +282,7 @@ static int acpi_ac_add(struct acpi_device *device)
293282
static int acpi_ac_resume(struct device *dev)
294283
{
295284
struct acpi_ac *ac;
296-
unsigned old_state;
285+
unsigned int old_state;
297286

298287
if (!dev)
299288
return -EINVAL;
@@ -352,9 +341,8 @@ static int __init acpi_ac_init(void)
352341
}
353342

354343
result = acpi_bus_register_driver(&acpi_ac_driver);
355-
if (result < 0) {
344+
if (result < 0)
356345
return -ENODEV;
357-
}
358346

359347
return 0;
360348
}

drivers/acpi/acpi_apd.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,10 @@ static const struct apd_device_desc hip08_spi_desc = {
176176

177177
#endif
178178

179-
/**
180-
* Create platform device during acpi scan attach handle.
181-
* Return value > 0 on success of creating device.
182-
*/
179+
/*
180+
* Create platform device during acpi scan attach handle.
181+
* Return value > 0 on success of creating device.
182+
*/
183183
static int acpi_apd_create_device(struct acpi_device *adev,
184184
const struct acpi_device_id *id)
185185
{

drivers/acpi/acpi_ipmi.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,6 @@ static void ipmi_register_bmc(int iface, struct device *dev)
478478
ipmi_dev_release(ipmi_device);
479479
err_ref:
480480
put_device(smi_data.dev);
481-
return;
482481
}
483482

484483
static void ipmi_bmc_gone(int iface)

drivers/acpi/acpi_lpss.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,7 @@ static const struct acpi_device_id acpi_lpss_device_ids[] = {
377377
static int is_memory(struct acpi_resource *res, void *not_used)
378378
{
379379
struct resource r;
380+
380381
return !acpi_dev_resource_memory(res, &r);
381382
}
382383

@@ -1200,6 +1201,7 @@ static int acpi_lpss_poweroff_noirq(struct device *dev)
12001201
if (pdata->dev_desc->resume_from_noirq) {
12011202
/* This is analogous to the acpi_lpss_suspend_noirq() case. */
12021203
int ret = acpi_lpss_do_poweroff_late(dev);
1204+
12031205
if (ret)
12041206
return ret;
12051207
}

drivers/acpi/acpi_pad.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ static void round_robin_cpu(unsigned int tsk_index)
128128
static void exit_round_robin(unsigned int tsk_index)
129129
{
130130
struct cpumask *pad_busy_cpus = to_cpumask(pad_busy_cpus_bits);
131+
131132
cpumask_clear_cpu(tsk_in_cpu[tsk_index], pad_busy_cpus);
132133
tsk_in_cpu[tsk_index] = -1;
133134
}
@@ -265,6 +266,7 @@ static ssize_t rrtime_store(struct device *dev,
265266
struct device_attribute *attr, const char *buf, size_t count)
266267
{
267268
unsigned long num;
269+
268270
if (kstrtoul(buf, 0, &num))
269271
return -EINVAL;
270272
if (num < 1 || num >= 100)
@@ -286,6 +288,7 @@ static ssize_t idlepct_store(struct device *dev,
286288
struct device_attribute *attr, const char *buf, size_t count)
287289
{
288290
unsigned long num;
291+
289292
if (kstrtoul(buf, 0, &num))
290293
return -EINVAL;
291294
if (num < 1 || num >= 100)
@@ -307,6 +310,7 @@ static ssize_t idlecpus_store(struct device *dev,
307310
struct device_attribute *attr, const char *buf, size_t count)
308311
{
309312
unsigned long num;
313+
310314
if (kstrtoul(buf, 0, &num))
311315
return -EINVAL;
312316
mutex_lock(&isolated_cpus_lock);

drivers/acpi/acpi_processor.c

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,7 @@
2525
DEFINE_PER_CPU(struct acpi_processor *, processors);
2626
EXPORT_PER_CPU_SYMBOL(processors);
2727

28-
/* --------------------------------------------------------------------------
29-
Errata Handling
30-
-------------------------------------------------------------------------- */
31-
28+
/* Errata Handling */
3229
struct acpi_processor_errata errata __read_mostly;
3330
EXPORT_SYMBOL_GPL(errata);
3431

@@ -151,10 +148,7 @@ static int acpi_processor_errata(void)
151148
return result;
152149
}
153150

154-
/* --------------------------------------------------------------------------
155-
Initialization
156-
-------------------------------------------------------------------------- */
157-
151+
/* Initialization */
158152
#ifdef CONFIG_ACPI_HOTPLUG_CPU
159153
int __weak acpi_map_cpu(acpi_handle handle,
160154
phys_cpuid_t physid, u32 acpi_id, int *pcpu)
@@ -306,6 +300,7 @@ static int acpi_processor_get_info(struct acpi_device *device)
306300
*/
307301
if (invalid_logical_cpuid(pr->id) || !cpu_present(pr->id)) {
308302
int ret = acpi_processor_hotadd_init(pr);
303+
309304
if (ret)
310305
return ret;
311306
}
@@ -431,10 +426,7 @@ static int acpi_processor_add(struct acpi_device *device,
431426
}
432427

433428
#ifdef CONFIG_ACPI_HOTPLUG_CPU
434-
/* --------------------------------------------------------------------------
435-
Removal
436-
-------------------------------------------------------------------------- */
437-
429+
/* Removal */
438430
static void acpi_processor_remove(struct acpi_device *device)
439431
{
440432
struct acpi_processor *pr;
@@ -892,7 +884,7 @@ int acpi_processor_evaluate_cst(acpi_handle handle, u32 cpu,
892884

893885
info->count = last_index;
894886

895-
end:
887+
end:
896888
kfree(buffer.pointer);
897889

898890
return ret;

drivers/acpi/acpi_video.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1392,7 +1392,7 @@ acpi_video_get_next_level(struct acpi_video_device *device,
13921392
break;
13931393
}
13941394
}
1395-
/* Ajust level_current to closest available level */
1395+
/* Adjust level_current to closest available level */
13961396
level_current += delta;
13971397
for (i = ACPI_VIDEO_FIRST_LEVEL; i < device->brightness->count; i++) {
13981398
l = device->brightness->levels[i];
@@ -1555,7 +1555,7 @@ acpi_video_bus_get_devices(struct acpi_video_bus *video,
15551555

15561556
/*
15571557
* Win8 requires setting bit2 of _DOS to let firmware know it shouldn't
1558-
* preform any automatic brightness change on receiving a notification.
1558+
* perform any automatic brightness change on receiving a notification.
15591559
*/
15601560
static int acpi_video_bus_start_devices(struct acpi_video_bus *video)
15611561
{

drivers/acpi/apei/erst.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ EXPORT_SYMBOL_GPL(erst_disable);
5454

5555
static struct acpi_table_erst *erst_tab;
5656

57-
/* ERST Error Log Address Range atrributes */
57+
/* ERST Error Log Address Range attributes */
5858
#define ERST_RANGE_RESERVED 0x0001
5959
#define ERST_RANGE_NVRAM 0x0002
6060
#define ERST_RANGE_SLOW 0x0004

drivers/acpi/apei/hest.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// SPDX-License-Identifier: GPL-2.0-only
22
/*
3-
* APEI Hardware Error Souce Table support
3+
* APEI Hardware Error Source Table support
44
*
55
* HEST describes error sources in detail; communicates operational
66
* parameters (i.e. severity levels, masking bits, and threshold

0 commit comments

Comments
 (0)