Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1480554 > unrolled thread

[PATCH 00/30] ACPI-processor: Fine-tuning for several function implementations

Started bySF Markus Elfring <elfring@users.sourceforge.net>
First post2016-09-10 11:40 +0200
Last post2016-09-10 12:20 +0200
Articles 10 on this page of 30 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 00/30] ACPI-processor: Fine-tuning for several function  implementations SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-10 11:40 +0200
    [PATCH 03/30] ACPI-processor: Rename jump labels in  acpi_processor_get_performance_states() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-10 11:50 +0200
    [PATCH 05/30] ACPI-processor: Rename jump labels in  acpi_processor_preregister_performance() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-10 11:50 +0200
    [PATCH 04/30] ACPI-processor: Delete two unnecessary initialisations  in acpi_processor_get_performance_states() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-10 11:50 +0200
    [PATCH 08/30] ACPI-processor: Delete two unnecessary initialisations  in acpi_processor_get_psd() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-10 11:50 +0200
    [PATCH 07/30] ACPI-processor: Rename jump labels in  acpi_processor_get_psd() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-10 11:50 +0200
    [PATCH 06/30] ACPI-processor: Move a success indication in  acpi_processor_preregister_performance() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-10 11:50 +0200
    [PATCH 15/30] ACPI-processor: Delete an unnecessary initialisation in  acpi_processor_get_platform_limit() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-10 12:00 +0200
    [PATCH 17/30] ACPI-processor: Improve another size determination in  acpi_processor_get_throttling_states() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-10 12:00 +0200
    [PATCH 10/30] ACPI-processor: Rename jump labels in  acpi_processor_get_performance_control() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-10 12:00 +0200
    [PATCH 16/30] ACPI-processor: Use kmalloc_array() in  acpi_processor_get_throttling_states() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-10 12:00 +0200
    [PATCH 11/30] ACPI-processor: Delete two unnecessary initialisations  in acpi_processor_get_performance_control() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-10 12:00 +0200
    [PATCH 09/30] ACPI-processor: Improve a size determination in  acpi_processor_get_psd() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-10 12:00 +0200
    [PATCH 14/30] ACPI-processor: Delete an unnecessary initialisation in  acpi_processor_get_performance_info() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-10 12:00 +0200
    Re: [PATCH 00/30] ACPI-processor: Fine-tuning for several function  implementations Paolo Bonzini <pbonzini@redhat.com> - 2016-09-10 12:00 +0200
    [PATCH 13/30] ACPI-processor: Delete an unnecessary initialisation in  acpi_processor_ppc_notifier() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-10 12:00 +0200
    [PATCH 12/30] ACPI-processor: Rename jump labels in  acpi_processor_ppc_notifier() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-10 12:00 +0200
    [PATCH 23/30] ACPI-processor: Improve a size determination in  acpi_processor_get_tsd() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-10 12:10 +0200
    [PATCH 25/30] ACPI-processor: Delete two unnecessary initialisations  in acpi_processor_get_throttling_control() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-10 12:10 +0200
    [PATCH 27/30] ACPI-processor: Delete an unnecessary initialisation in  acpi_processor_reevaluate_tstate() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-10 12:10 +0200
    [PATCH 26/30] ACPI-processor: Fix jump targets in  acpi_processor_reevaluate_tstate() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-10 12:10 +0200
    [PATCH 19/30] ACPI-processor: Delete two unnecessary initialisations  in acpi_processor_get_throttling_states() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-10 12:10 +0200
    [PATCH 18/30] ACPI-processor: Rename jump labels in  acpi_processor_get_throttling_states() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-10 12:10 +0200
    [PATCH 21/30] ACPI-processor: Rename jump labels in  acpi_processor_get_tsd() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-10 12:10 +0200
    [PATCH 22/30] ACPI-processor: Delete two unnecessary initialisations  in acpi_processor_get_tsd() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-10 12:10 +0200
    [PATCH 24/30] ACPI-processor: Rename jump labels in  acpi_processor_get_throttling_control() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-10 12:10 +0200
    [PATCH 20/30] ACPI-processor: Fix jump targets in  acpi_processor_get_throttling_info() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-10 12:10 +0200
    [PATCH 29/30] ACPI-processor: Delete an unnecessary initialisation in  acpi_processor_get_platform_limit() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-10 12:20 +0200
    [PATCH 28/30] ACPI-processor: Rename a jump label in  acpi_processor_get_platform_limit() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-10 12:20 +0200
    [PATCH 30/30] ACPI-processor: Improve jump targets in  acpi_processor_update_tsd_coord() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-10 12:20 +0200

Page 2 of 2 — ← Prev page 1 [2]


#1480586 — [PATCH 26/30] ACPI-processor: Fix jump targets in acpi_processor_reevaluate_tstate()

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2016-09-10 12:10 +0200
Subject[PATCH 26/30] ACPI-processor: Fix jump targets in acpi_processor_reevaluate_tstate()
Message-ID<sfNot-7ju-13@gated-at.bofh.it>
In reply to#1480554
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 6 Sep 2016 21:40:40 +0200

1. Adjust jump targets according to the current Linux coding
   style convention.

2. Delete a duplicate check then at the end.

3. Do not use curly brackets at two source code places
   where a single statement should be sufficient.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/acpi/processor_throttling.c | 23 +++++++++--------------
 1 file changed, 9 insertions(+), 14 deletions(-)

diff --git a/drivers/acpi/processor_throttling.c b/drivers/acpi/processor_throttling.c
index 0b4e058..994f21c 100644
--- a/drivers/acpi/processor_throttling.c
+++ b/drivers/acpi/processor_throttling.c
@@ -379,23 +379,19 @@ void acpi_processor_reevaluate_tstate(struct acpi_processor *pr,
 {
 	int result = 0;
 
-	if (action == CPU_DEAD) {
+	if (action == CPU_DEAD)
 		/* When one CPU is offline, the T-state throttling
 		 * will be invalidated.
 		 */
-		pr->flags.throttling = 0;
-		return;
-	}
+		goto disable_throttling;
 	/* the following is to recheck whether the T-state is valid for
 	 * the online CPU
 	 */
-	if (!pr->throttling.state_count) {
+	if (!pr->throttling.state_count)
 		/* If the number of T-state is invalid, it is
 		 * invalidated.
 		 */
-		pr->flags.throttling = 0;
-		return;
-	}
+		goto disable_throttling;
 	pr->flags.throttling = 1;
 
 	/* Disable throttling (if enabled).  We'll let subsequent
@@ -405,17 +401,16 @@ void acpi_processor_reevaluate_tstate(struct acpi_processor *pr,
 
 	result = acpi_processor_get_throttling(pr);
 	if (result)
-		goto end;
+		goto disable_throttling;
 
 	if (pr->throttling.state) {
 		result = acpi_processor_set_throttling(pr, 0, false);
 		if (result)
-			goto end;
+			goto disable_throttling;
 	}
-
-end:
-	if (result)
-		pr->flags.throttling = 0;
+	return;
+ disable_throttling:
+	pr->flags.throttling = 0;
 }
 /*
  * _PTC - Processor Throttling Control (and status) register location
-- 
2.10.0

[toc] | [prev] | [next] | [standalone]


#1480587 — [PATCH 19/30] ACPI-processor: Delete two unnecessary initialisations in acpi_processor_get_throttling_states()

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2016-09-10 12:10 +0200
Subject[PATCH 19/30] ACPI-processor: Delete two unnecessary initialisations in acpi_processor_get_throttling_states()
Message-ID<sfNou-7ju-17@gated-at.bofh.it>
In reply to#1480554
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 6 Sep 2016 20:00:43 +0200

The local variables "tss" and "status" will be set to an appropriate value
a bit later. Thus omit the explicit initialisation at the beginning.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/acpi/processor_throttling.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/acpi/processor_throttling.c b/drivers/acpi/processor_throttling.c
index 665e8de..8847bca 100644
--- a/drivers/acpi/processor_throttling.c
+++ b/drivers/acpi/processor_throttling.c
@@ -507,11 +507,11 @@ static int acpi_processor_get_throttling_control(struct acpi_processor *pr)
 static int acpi_processor_get_throttling_states(struct acpi_processor *pr)
 {
 	int result = 0;
-	acpi_status status = AE_OK;
+	acpi_status status;
 	struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
 	struct acpi_buffer format = { sizeof("NNNNN"), "NNNNN" };
 	struct acpi_buffer state = { 0, NULL };
-	union acpi_object *tss = NULL;
+	union acpi_object *tss;
 	int i;
 
 	status = acpi_evaluate_object(pr->handle, "_TSS", NULL, &buffer);
-- 
2.10.0

[toc] | [prev] | [next] | [standalone]


#1480588 — [PATCH 18/30] ACPI-processor: Rename jump labels in acpi_processor_get_throttling_states()

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2016-09-10 12:10 +0200
Subject[PATCH 18/30] ACPI-processor: Rename jump labels in acpi_processor_get_throttling_states()
Message-ID<sfNou-7ju-21@gated-at.bofh.it>
In reply to#1480554
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 6 Sep 2016 19:26:33 +0200

Adjust jump labels according to the current Linux coding style convention.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/acpi/processor_throttling.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/acpi/processor_throttling.c b/drivers/acpi/processor_throttling.c
index c5ddf96..665e8de 100644
--- a/drivers/acpi/processor_throttling.c
+++ b/drivers/acpi/processor_throttling.c
@@ -526,7 +526,7 @@ static int acpi_processor_get_throttling_states(struct acpi_processor *pr)
 	if (!tss || (tss->type != ACPI_TYPE_PACKAGE)) {
 		printk(KERN_ERR PREFIX "Invalid _TSS data\n");
 		result = -EFAULT;
-		goto end;
+		goto free_buffer;
 	}
 
 	ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found %d throttling states\n",
@@ -539,7 +539,7 @@ static int acpi_processor_get_throttling_states(struct acpi_processor *pr)
 						  GFP_KERNEL);
 	if (!pr->throttling.states_tss) {
 		result = -ENOMEM;
-		goto end;
+		goto free_buffer;
 	}
 
 	for (i = 0; i < pr->throttling.state_count; i++) {
@@ -559,7 +559,7 @@ static int acpi_processor_get_throttling_states(struct acpi_processor *pr)
 			ACPI_EXCEPTION((AE_INFO, status, "Invalid _TSS data"));
 			result = -EFAULT;
 			kfree(pr->throttling.states_tss);
-			goto end;
+			goto free_buffer;
 		}
 
 		if (!tx->freqpercentage) {
@@ -567,11 +567,10 @@ static int acpi_processor_get_throttling_states(struct acpi_processor *pr)
 			       "Invalid _TSS data: freq is zero\n");
 			result = -EFAULT;
 			kfree(pr->throttling.states_tss);
-			goto end;
+			goto free_buffer;
 		}
 	}
-
-      end:
+ free_buffer:
 	kfree(buffer.pointer);
 
 	return result;
-- 
2.10.0

[toc] | [prev] | [next] | [standalone]


#1480589 — [PATCH 21/30] ACPI-processor: Rename jump labels in acpi_processor_get_tsd()

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2016-09-10 12:10 +0200
Subject[PATCH 21/30] ACPI-processor: Rename jump labels in acpi_processor_get_tsd()
Message-ID<sfNot-7ju-15@gated-at.bofh.it>
In reply to#1480554
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 6 Sep 2016 20:50:12 +0200

Adjust jump labels according to the current Linux coding style convention.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/acpi/processor_throttling.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/drivers/acpi/processor_throttling.c b/drivers/acpi/processor_throttling.c
index 24bd97f..2e3ef48 100644
--- a/drivers/acpi/processor_throttling.c
+++ b/drivers/acpi/processor_throttling.c
@@ -605,13 +605,13 @@ static int acpi_processor_get_tsd(struct acpi_processor *pr)
 	if (!tsd || (tsd->type != ACPI_TYPE_PACKAGE)) {
 		printk(KERN_ERR PREFIX "Invalid _TSD data\n");
 		result = -EFAULT;
-		goto end;
+		goto free_buffer;
 	}
 
 	if (tsd->package.count != 1) {
 		printk(KERN_ERR PREFIX "Invalid _TSD data\n");
 		result = -EFAULT;
-		goto end;
+		goto free_buffer;
 	}
 
 	pdomain = &(pr->throttling.domain_info);
@@ -624,19 +624,19 @@ static int acpi_processor_get_tsd(struct acpi_processor *pr)
 	if (ACPI_FAILURE(status)) {
 		printk(KERN_ERR PREFIX "Invalid _TSD data\n");
 		result = -EFAULT;
-		goto end;
+		goto free_buffer;
 	}
 
 	if (pdomain->num_entries != ACPI_TSD_REV0_ENTRIES) {
 		printk(KERN_ERR PREFIX "Unknown _TSD:num_entries\n");
 		result = -EFAULT;
-		goto end;
+		goto free_buffer;
 	}
 
 	if (pdomain->revision != ACPI_TSD_REV0_REVISION) {
 		printk(KERN_ERR PREFIX "Unknown _TSD:revision\n");
 		result = -EFAULT;
-		goto end;
+		goto free_buffer;
 	}
 
 	pthrottling = &pr->throttling;
@@ -654,8 +654,7 @@ static int acpi_processor_get_tsd(struct acpi_processor *pr)
 		pthrottling->tsd_valid_flag = 0;
 		pthrottling->shared_type = DOMAIN_COORD_TYPE_SW_ALL;
 	}
-
-      end:
+ free_buffer:
 	kfree(buffer.pointer);
 	return result;
 }
-- 
2.10.0

[toc] | [prev] | [next] | [standalone]


#1480590 — [PATCH 22/30] ACPI-processor: Delete two unnecessary initialisations in acpi_processor_get_tsd()

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2016-09-10 12:10 +0200
Subject[PATCH 22/30] ACPI-processor: Delete two unnecessary initialisations in acpi_processor_get_tsd()
Message-ID<sfNou-7ju-23@gated-at.bofh.it>
In reply to#1480554
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 6 Sep 2016 20:52:33 +0200

The local variables "tsd" and "status" will be set to an appropriate value
a bit later. Thus omit the explicit initialisation at the beginning.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/acpi/processor_throttling.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/acpi/processor_throttling.c b/drivers/acpi/processor_throttling.c
index 2e3ef48..ea1e959 100644
--- a/drivers/acpi/processor_throttling.c
+++ b/drivers/acpi/processor_throttling.c
@@ -582,11 +582,11 @@ static int acpi_processor_get_throttling_states(struct acpi_processor *pr)
 static int acpi_processor_get_tsd(struct acpi_processor *pr)
 {
 	int result = 0;
-	acpi_status status = AE_OK;
+	acpi_status status;
 	struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
 	struct acpi_buffer format = { sizeof("NNNNN"), "NNNNN" };
 	struct acpi_buffer state = { 0, NULL };
-	union acpi_object *tsd = NULL;
+	union acpi_object *tsd;
 	struct acpi_tsd_package *pdomain;
 	struct acpi_processor_throttling *pthrottling;
 
-- 
2.10.0

[toc] | [prev] | [next] | [standalone]


#1480591 — [PATCH 24/30] ACPI-processor: Rename jump labels in acpi_processor_get_throttling_control()

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2016-09-10 12:10 +0200
Subject[PATCH 24/30] ACPI-processor: Rename jump labels in acpi_processor_get_throttling_control()
Message-ID<sfNou-7ju-19@gated-at.bofh.it>
In reply to#1480554
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 6 Sep 2016 21:12:17 +0200

Adjust jump labels according to the current Linux coding style convention.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/acpi/processor_throttling.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/acpi/processor_throttling.c b/drivers/acpi/processor_throttling.c
index dcebb4b2..cdcd5d6f 100644
--- a/drivers/acpi/processor_throttling.c
+++ b/drivers/acpi/processor_throttling.c
@@ -442,7 +442,7 @@ static int acpi_processor_get_throttling_control(struct acpi_processor *pr)
 	    || (ptc->package.count != 2)) {
 		printk(KERN_ERR PREFIX "Invalid _PTC data\n");
 		result = -EFAULT;
-		goto end;
+		goto free_buffer;
 	}
 
 	/*
@@ -457,7 +457,7 @@ static int acpi_processor_get_throttling_control(struct acpi_processor *pr)
 		printk(KERN_ERR PREFIX
 		       "Invalid _PTC data (control_register)\n");
 		result = -EFAULT;
-		goto end;
+		goto free_buffer;
 	}
 	memcpy(&pr->throttling.control_register, obj.buffer.pointer,
 	       sizeof(struct acpi_ptc_register));
@@ -473,7 +473,7 @@ static int acpi_processor_get_throttling_control(struct acpi_processor *pr)
 	    || (obj.buffer.pointer == NULL)) {
 		printk(KERN_ERR PREFIX "Invalid _PTC data (status_register)\n");
 		result = -EFAULT;
-		goto end;
+		goto free_buffer;
 	}
 
 	memcpy(&pr->throttling.status_register, obj.buffer.pointer,
@@ -485,17 +485,15 @@ static int acpi_processor_get_throttling_control(struct acpi_processor *pr)
 		throttling->control_register.bit_offset) > 32) {
 		printk(KERN_ERR PREFIX "Invalid _PTC control register\n");
 		result = -EFAULT;
-		goto end;
+		goto free_buffer;
 	}
 
 	if ((throttling->status_register.bit_width +
 		throttling->status_register.bit_offset) > 32) {
 		printk(KERN_ERR PREFIX "Invalid _PTC status register\n");
 		result = -EFAULT;
-		goto end;
 	}
-
-      end:
+ free_buffer:
 	kfree(buffer.pointer);
 
 	return result;
-- 
2.10.0

[toc] | [prev] | [next] | [standalone]


#1480593 — [PATCH 20/30] ACPI-processor: Fix jump targets in acpi_processor_get_throttling_info()

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2016-09-10 12:10 +0200
Subject[PATCH 20/30] ACPI-processor: Fix jump targets in acpi_processor_get_throttling_info()
Message-ID<sfNou-7ju-27@gated-at.bofh.it>
In reply to#1480554
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 6 Sep 2016 20:32:46 +0200

1. Adjust jump targets according to the current Linux coding
   style convention.

2. Delete a duplicate check then at the end.

3. Omit the explicit initialisation for the local variable "result"
   at the beginning which became unnecessary with this refactoring.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/acpi/processor_throttling.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/drivers/acpi/processor_throttling.c b/drivers/acpi/processor_throttling.c
index 8847bca..24bd97f 100644
--- a/drivers/acpi/processor_throttling.c
+++ b/drivers/acpi/processor_throttling.c
@@ -1184,7 +1184,7 @@ int acpi_processor_set_throttling(struct acpi_processor *pr,
 
 int acpi_processor_get_throttling_info(struct acpi_processor *pr)
 {
-	int result = 0;
+	int result;
 	struct acpi_processor_throttling *pthrottling;
 
 	ACPI_DEBUG_PRINT((ACPI_DB_INFO,
@@ -1249,7 +1249,7 @@ int acpi_processor_get_throttling_info(struct acpi_processor *pr)
 
 	result = acpi_processor_get_throttling(pr);
 	if (result)
-		goto end;
+		goto disable_throttling;
 
 	if (pr->throttling.state) {
 		ACPI_DEBUG_PRINT((ACPI_DB_INFO,
@@ -1257,13 +1257,11 @@ int acpi_processor_get_throttling_info(struct acpi_processor *pr)
 				  pr->throttling.state));
 		result = acpi_processor_set_throttling(pr, 0, false);
 		if (result)
-			goto end;
+			goto disable_throttling;
 	}
-
-      end:
-	if (result)
-		pr->flags.throttling = 0;
-
+	return 0;
+ disable_throttling:
+	pr->flags.throttling = 0;
 	return result;
 }
 
-- 
2.10.0

[toc] | [prev] | [next] | [standalone]


#1480595 — [PATCH 29/30] ACPI-processor: Delete an unnecessary initialisation in acpi_processor_get_platform_limit()

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2016-09-10 12:20 +0200
Subject[PATCH 29/30] ACPI-processor: Delete an unnecessary initialisation in acpi_processor_get_platform_limit()
Message-ID<sfNy9-7p4-9@gated-at.bofh.it>
In reply to#1480554
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 6 Sep 2016 22:00:07 +0200

The local variable "status" will be set to an appropriate value
a bit later. Thus omit the explicit initialisation at the beginning.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/acpi/processor_throttling.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/processor_throttling.c b/drivers/acpi/processor_throttling.c
index 7e54a83..79ba9b78 100644
--- a/drivers/acpi/processor_throttling.c
+++ b/drivers/acpi/processor_throttling.c
@@ -287,7 +287,7 @@ static int acpi_processor_throttling_notifier(unsigned long event, void *data)
  */
 static int acpi_processor_get_platform_limit(struct acpi_processor *pr)
 {
-	acpi_status status = 0;
+	acpi_status status;
 	unsigned long long tpc = 0;
 
 	if (!pr)
-- 
2.10.0

[toc] | [prev] | [next] | [standalone]


#1480597 — [PATCH 28/30] ACPI-processor: Rename a jump label in acpi_processor_get_platform_limit()

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2016-09-10 12:20 +0200
Subject[PATCH 28/30] ACPI-processor: Rename a jump label in acpi_processor_get_platform_limit()
Message-ID<sfNy9-7p4-5@gated-at.bofh.it>
In reply to#1480554
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 6 Sep 2016 21:50:04 +0200

Adjust a jump label according to the current Linux coding style convention.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/acpi/processor_throttling.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/acpi/processor_throttling.c b/drivers/acpi/processor_throttling.c
index d22bcfc..7e54a83 100644
--- a/drivers/acpi/processor_throttling.c
+++ b/drivers/acpi/processor_throttling.c
@@ -294,7 +294,7 @@ static int acpi_processor_get_platform_limit(struct acpi_processor *pr)
 		return -EINVAL;
 
 	if (ignore_tpc)
-		goto end;
+		goto limit_throttling;
 
 	status = acpi_evaluate_integer(pr->handle, "_TPC", NULL, &tpc);
 	if (ACPI_FAILURE(status)) {
@@ -303,8 +303,7 @@ static int acpi_processor_get_platform_limit(struct acpi_processor *pr)
 		}
 		return -ENODEV;
 	}
-
-end:
+ limit_throttling:
 	pr->throttling_platform_limit = (int)tpc;
 	return 0;
 }
-- 
2.10.0

[toc] | [prev] | [next] | [standalone]


#1480598 — [PATCH 30/30] ACPI-processor: Improve jump targets in acpi_processor_update_tsd_coord()

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2016-09-10 12:20 +0200
Subject[PATCH 30/30] ACPI-processor: Improve jump targets in acpi_processor_update_tsd_coord()
Message-ID<sfNy9-7p4-7@gated-at.bofh.it>
In reply to#1480554
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 6 Sep 2016 22:18:30 +0200

* Adjust jump targets according to the current Linux coding
  style convention.

* Delete a duplicate check then.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/acpi/processor_throttling.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/acpi/processor_throttling.c b/drivers/acpi/processor_throttling.c
index 79ba9b78..b45f6c3 100644
--- a/drivers/acpi/processor_throttling.c
+++ b/drivers/acpi/processor_throttling.c
@@ -97,11 +97,9 @@ static int acpi_processor_update_tsd_coord(void)
 		 */
 		if (!pthrottling->tsd_valid_flag) {
 			retval = -EINVAL;
-			break;
+			goto free_cpumask;
 		}
 	}
-	if (retval)
-		goto err_ret;
 
 	for_each_possible_cpu(i) {
 		pr = per_cpu(processors, i);
@@ -147,12 +145,12 @@ static int acpi_processor_update_tsd_coord(void)
 			 */
 			if (match_pdomain->num_processors != count_target) {
 				retval = -EINVAL;
-				goto err_ret;
+				goto free_cpumask;
 			}
 
 			if (pdomain->coord_type != match_pdomain->coord_type) {
 				retval = -EINVAL;
-				goto err_ret;
+				goto free_cpumask;
 			}
 
 			cpumask_set_cpu(j, covered_cpus);
@@ -180,8 +178,7 @@ static int acpi_processor_update_tsd_coord(void)
 				     pthrottling->shared_cpu_map);
 		}
 	}
-
-err_ret:
+ free_cpumask:
 	free_cpumask_var(covered_cpus);
 
 	for_each_possible_cpu(i) {
-- 
2.10.0

[toc] | [prev] | [standalone]


Page 2 of 2 — ← Prev page 1 [2]

Back to top | Article view | linux.kernel


csiph-web