Skip to content

Commit 2ef53bf

Browse files
Clayton Casciatorafaeljw
authored andcommitted
ACPI: processor_throttling: Fix several coding style issues
Drop one redundant return statement and fix a few white space issues. Signed-off-by: Clayton Casciato <[email protected]> [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 69530b4 commit 2ef53bf

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

drivers/acpi/processor_throttling.c

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Copyright (C) 2001, 2002 Paul Diefenbaugh <[email protected]>
77
* Copyright (C) 2004 Dominik Brodowski <[email protected]>
88
* Copyright (C) 2004 Anil S Keshavamurthy <[email protected]>
9-
* - Added processor hotplug support
9+
* - Added processor hotplug support
1010
*/
1111

1212
#include <linux/kernel.h>
@@ -195,15 +195,13 @@ void acpi_processor_throttling_init(void)
195195
{
196196
if (acpi_processor_update_tsd_coord())
197197
pr_debug("Assume no T-state coordination\n");
198-
199-
return;
200198
}
201199

202200
static int acpi_processor_throttling_notifier(unsigned long event, void *data)
203201
{
204202
struct throttling_tstate *p_tstate = data;
205203
struct acpi_processor *pr;
206-
unsigned int cpu ;
204+
unsigned int cpu;
207205
int target_state;
208206
struct acpi_processor_limit *p_limit;
209207
struct acpi_processor_throttling *p_throttling;
@@ -477,7 +475,7 @@ static int acpi_processor_get_throttling_control(struct acpi_processor *pr)
477475
goto end;
478476
}
479477

480-
end:
478+
end:
481479
kfree(buffer.pointer);
482480

483481
return result;
@@ -554,7 +552,7 @@ static int acpi_processor_get_throttling_states(struct acpi_processor *pr)
554552
}
555553
}
556554

557-
end:
555+
end:
558556
kfree(buffer.pointer);
559557

560558
return result;
@@ -639,7 +637,7 @@ static int acpi_processor_get_tsd(struct acpi_processor *pr)
639637
pthrottling->shared_type = DOMAIN_COORD_TYPE_SW_ALL;
640638
}
641639

642-
end:
640+
end:
643641
kfree(buffer.pointer);
644642
return result;
645643
}
@@ -717,7 +715,7 @@ static int acpi_throttling_rdmsr(u64 *value)
717715
msr_low = 0;
718716
msr_high = 0;
719717
rdmsr_safe(MSR_IA32_THERM_CONTROL,
720-
(u32 *)&msr_low , (u32 *) &msr_high);
718+
(u32 *)&msr_low, (u32 *) &msr_high);
721719
msr = (msr_high << 32) | msr_low;
722720
*value = (u64) msr;
723721
ret = 0;
@@ -1185,8 +1183,7 @@ int acpi_processor_get_throttling_info(struct acpi_processor *pr)
11851183
*/
11861184
if (acpi_processor_get_throttling_control(pr) ||
11871185
acpi_processor_get_throttling_states(pr) ||
1188-
acpi_processor_get_platform_limit(pr))
1189-
{
1186+
acpi_processor_get_platform_limit(pr)) {
11901187
pr->throttling.acpi_processor_get_throttling =
11911188
&acpi_processor_get_throttling_fadt;
11921189
pr->throttling.acpi_processor_set_throttling =
@@ -1246,7 +1243,7 @@ int acpi_processor_get_throttling_info(struct acpi_processor *pr)
12461243
goto end;
12471244
}
12481245

1249-
end:
1246+
end:
12501247
if (result)
12511248
pr->flags.throttling = 0;
12521249

0 commit comments

Comments
 (0)