Skip to content

Commit 3c6b121

Browse files
superm1rafaeljw
authored andcommitted
ACPI: x86: s2idle: Post-increment variables when getting constraints
When code uses a pre-increment it makes the reader question "why". In the constraint fetching code there is no reason for the variables to be pre-incremented so adjust to post-increment. No intended functional changes. Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com> Suggested-by: Bjorn Helgaas <helgaas@kernel.org> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 3ac9b73 commit 3c6b121

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/acpi/x86/s2idle.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,13 @@ static void lpi_device_get_constraints_amd(void)
123123
acpi_handle_debug(lps0_device_handle,
124124
"LPI: constraints list begin:\n");
125125

126-
for (j = 0; j < package->package.count; ++j) {
126+
for (j = 0; j < package->package.count; j++) {
127127
union acpi_object *info_obj = &package->package.elements[j];
128128
struct lpi_device_constraint_amd dev_info = {};
129129
struct lpi_constraints *list;
130130
acpi_status status;
131131

132-
for (k = 0; k < info_obj->package.count; ++k) {
132+
for (k = 0; k < info_obj->package.count; k++) {
133133
union acpi_object *obj = &info_obj->package.elements[k];
134134

135135
list = &lpi_constraints_table[lpi_constraints_table_size];
@@ -214,7 +214,7 @@ static void lpi_device_get_constraints(void)
214214
if (!package)
215215
continue;
216216

217-
for (j = 0; j < package->package.count; ++j) {
217+
for (j = 0; j < package->package.count; j++) {
218218
union acpi_object *element =
219219
&(package->package.elements[j]);
220220

@@ -246,7 +246,7 @@ static void lpi_device_get_constraints(void)
246246

247247
constraint->min_dstate = -1;
248248

249-
for (j = 0; j < package_count; ++j) {
249+
for (j = 0; j < package_count; j++) {
250250
union acpi_object *info_obj = &info.package[j];
251251
union acpi_object *cnstr_pkg;
252252
union acpi_object *obj;

0 commit comments

Comments
 (0)