diff mbox series

[v12,3/9] ACPI: x86: s2idle: Post-increment variables when getting constraints

Message ID 20230816204143.66281-4-mario.limonciello@amd.com
State New
Headers show
Series Fix wakeup problems on some AMD platforms | expand

Commit Message

Mario Limonciello Aug. 16, 2023, 8:41 p.m. UTC
There is no reason for the variables to be pre-incremented.
No intended functional changes.

Suggested-by: Bjorn Helgaas <helgaas@kernel.org>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
 drivers/acpi/x86/s2idle.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Kuppuswamy Sathyanarayanan Aug. 17, 2023, 2:42 a.m. UTC | #1
On 8/16/2023 1:41 PM, Mario Limonciello wrote:
> There is no reason for the variables to be pre-incremented.
> No intended functional changes.
>
> Suggested-by: Bjorn Helgaas <helgaas@kernel.org>
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> ---

I think you need to explain bit more in commit log.  Otherwise, looks good.

Reviewed-by: Kuppuswamy Sathyanarayanan 
<sathyanarayanan.kuppuswamy@linux.intel.com>

>   drivers/acpi/x86/s2idle.c | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/acpi/x86/s2idle.c b/drivers/acpi/x86/s2idle.c
> index ce62e61a9605e..7711dde68947f 100644
> --- a/drivers/acpi/x86/s2idle.c
> +++ b/drivers/acpi/x86/s2idle.c
> @@ -123,13 +123,13 @@ static void lpi_device_get_constraints_amd(void)
>   			acpi_handle_debug(lps0_device_handle,
>   					  "LPI: constraints list begin:\n");
>   
> -			for (j = 0; j < package->package.count; ++j) {
> +			for (j = 0; j < package->package.count; j++) {
>   				union acpi_object *info_obj = &package->package.elements[j];
>   				struct lpi_device_constraint_amd dev_info = {};
>   				struct lpi_constraints *list;
>   				acpi_status status;
>   
> -				for (k = 0; k < info_obj->package.count; ++k) {
> +				for (k = 0; k < info_obj->package.count; k++) {
>   					union acpi_object *obj = &info_obj->package.elements[k];
>   
>   					list = &lpi_constraints_table[lpi_constraints_table_size];
> @@ -214,7 +214,7 @@ static void lpi_device_get_constraints(void)
>   		if (!package)
>   			continue;
>   
> -		for (j = 0; j < package->package.count; ++j) {
> +		for (j = 0; j < package->package.count; j++) {
>   			union acpi_object *element =
>   					&(package->package.elements[j]);
>   
> @@ -246,7 +246,7 @@ static void lpi_device_get_constraints(void)
>   
>   		constraint->min_dstate = -1;
>   
> -		for (j = 0; j < package_count; ++j) {
> +		for (j = 0; j < package_count; j++) {
>   			union acpi_object *info_obj = &info.package[j];
>   			union acpi_object *cnstr_pkg;
>   			union acpi_object *obj;
Andy Shevchenko Aug. 17, 2023, 10:10 a.m. UTC | #2
On Wed, Aug 16, 2023 at 07:42:19PM -0700, Kuppuswamy Sathyanarayanan wrote:
> On 8/16/2023 1:41 PM, Mario Limonciello wrote:

...

> Reviewed-by: Kuppuswamy Sathyanarayanan
> <sathyanarayanan.kuppuswamy@linux.intel.com>

It's not the first time your tag gets broken. Can you fix it?
Kuppuswamy Sathyanarayanan Aug. 17, 2023, 3:28 p.m. UTC | #3
On 8/17/2023 3:10 AM, Andy Shevchenko wrote:
> On Wed, Aug 16, 2023 at 07:42:19PM -0700, Kuppuswamy Sathyanarayanan wrote:
>> On 8/16/2023 1:41 PM, Mario Limonciello wrote:
> 
> ...
> 
>> Reviewed-by: Kuppuswamy Sathyanarayanan
>> <sathyanarayanan.kuppuswamy@linux.intel.com>
> 
> It's not the first time your tag gets broken. Can you fix it?
> 

Sorry, changed the system recently and did not re-configure the email
client settings. I hope it is fixed now.

Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Andy Shevchenko Aug. 17, 2023, 3:52 p.m. UTC | #4
On Thu, Aug 17, 2023 at 08:28:09AM -0700, Kuppuswamy Sathyanarayanan wrote:
> On 8/17/2023 3:10 AM, Andy Shevchenko wrote:
> > On Wed, Aug 16, 2023 at 07:42:19PM -0700, Kuppuswamy Sathyanarayanan wrote:
> >> On 8/16/2023 1:41 PM, Mario Limonciello wrote:

...

> >> Reviewed-by: Kuppuswamy Sathyanarayanan
> >> <sathyanarayanan.kuppuswamy@linux.intel.com>
> > 
> > It's not the first time your tag gets broken. Can you fix it?
> > 
> 
> Sorry, changed the system recently and did not re-configure the email
> client settings. I hope it is fixed now.
> 
> Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>

Seems good to me, thank you!
diff mbox series

Patch

diff --git a/drivers/acpi/x86/s2idle.c b/drivers/acpi/x86/s2idle.c
index ce62e61a9605e..7711dde68947f 100644
--- a/drivers/acpi/x86/s2idle.c
+++ b/drivers/acpi/x86/s2idle.c
@@ -123,13 +123,13 @@  static void lpi_device_get_constraints_amd(void)
 			acpi_handle_debug(lps0_device_handle,
 					  "LPI: constraints list begin:\n");
 
-			for (j = 0; j < package->package.count; ++j) {
+			for (j = 0; j < package->package.count; j++) {
 				union acpi_object *info_obj = &package->package.elements[j];
 				struct lpi_device_constraint_amd dev_info = {};
 				struct lpi_constraints *list;
 				acpi_status status;
 
-				for (k = 0; k < info_obj->package.count; ++k) {
+				for (k = 0; k < info_obj->package.count; k++) {
 					union acpi_object *obj = &info_obj->package.elements[k];
 
 					list = &lpi_constraints_table[lpi_constraints_table_size];
@@ -214,7 +214,7 @@  static void lpi_device_get_constraints(void)
 		if (!package)
 			continue;
 
-		for (j = 0; j < package->package.count; ++j) {
+		for (j = 0; j < package->package.count; j++) {
 			union acpi_object *element =
 					&(package->package.elements[j]);
 
@@ -246,7 +246,7 @@  static void lpi_device_get_constraints(void)
 
 		constraint->min_dstate = -1;
 
-		for (j = 0; j < package_count; ++j) {
+		for (j = 0; j < package_count; j++) {
 			union acpi_object *info_obj = &info.package[j];
 			union acpi_object *cnstr_pkg;
 			union acpi_object *obj;