All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drivers/acpi/utils.c: Fixed coding style issues
@ 2011-04-20 23:20 Karthigan Srinivasan
  2011-04-21  8:28 ` Nicolas Kaiser
  0 siblings, 1 reply; 6+ messages in thread
From: Karthigan Srinivasan @ 2011-04-20 23:20 UTC (permalink / raw)
  To: Len Brown, linux-acpi, linux-kernel; +Cc: Karthigan Srinivasan

>From e770496964bf749c30df8a19abbdfe0f79d64fb7 Mon Sep 17 00:00:00 2001
From: Karthigan Srinivasan <karthigan.srinivasan@hp.com>
Date: Wed, 20 Apr 2011 18:14:10 -0500
Subject: [PATCH] drivers/acpi/utils.c: Fixed coding style issues.

Fixed brace and comment coding style issues in code.

Signed-off-by: Karthigan Srinivasan <karthigan.srinivasan@hp.com>
---
 drivers/acpi/utils.c |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c
index b002a47..2cf81a1 100644
--- a/drivers/acpi/utils.c
+++ b/drivers/acpi/utils.c
@@ -99,9 +99,9 @@ acpi_extract_package(union acpi_object *package,
 
 		union acpi_object *element = &(package->package.elements[i]);
 
-		if (!element) {
+		if (!element) 
 			return AE_BAD_DATA;
-		}
+		
 
 		switch (element->type) {
 
@@ -185,9 +185,9 @@ acpi_extract_package(union acpi_object *package,
 		u8 **pointer = NULL;
 		union acpi_object *element = &(package->package.elements[i]);
 
-		if (!element) {
+		if (!element) 
 			return AE_BAD_DATA;
-		}
+		
 
 		switch (element->type) {
 
@@ -303,9 +303,9 @@ acpi_evaluate_reference(acpi_handle handle,
 	u32 i = 0;
 
 
-	if (!list) {
+	if (!list) 
 		return AE_BAD_PARAMETER;
-	}
+	
 
 	/* Evaluate object. */
 
@@ -337,9 +337,9 @@ acpi_evaluate_reference(acpi_handle handle,
 		goto end;
 	}
 
-	if (package->package.count > ACPI_MAX_HANDLES) {
+	if (package->package.count > ACPI_MAX_HANDLES) 
 		return AE_NO_MEMORY;
-	}
+	
 	list->count = package->package.count;
 
 	/* Extract package data. */
@@ -373,7 +373,7 @@ acpi_evaluate_reference(acpi_handle handle,
       end:
 	if (ACPI_FAILURE(status)) {
 		list->count = 0;
-		//kfree(list->handles);
+		/* kfree(list->handles);*/
 	}
 
 	kfree(buffer.pointer);
-- 
1.7.1




^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] drivers/acpi/utils.c: Fixed coding style issues
  2011-04-20 23:20 [PATCH] drivers/acpi/utils.c: Fixed coding style issues Karthigan Srinivasan
@ 2011-04-21  8:28 ` Nicolas Kaiser
  2011-04-21 16:08   ` Karthigan Srinivasan
  0 siblings, 1 reply; 6+ messages in thread
From: Nicolas Kaiser @ 2011-04-21  8:28 UTC (permalink / raw)
  To: Karthigan Srinivasan; +Cc: Len Brown, linux-acpi, linux-kernel

* Karthigan Srinivasan <karthigan.srinivasan@hp.com>:
> Fixed brace and comment coding style issues in code.
> 
> Signed-off-by: Karthigan Srinivasan <karthigan.srinivasan@hp.com>
> ---
>  drivers/acpi/utils.c |   18 +++++++++---------
>  1 files changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c
> index b002a47..2cf81a1 100644
> --- a/drivers/acpi/utils.c
> +++ b/drivers/acpi/utils.c
> @@ -99,9 +99,9 @@ acpi_extract_package(union acpi_object *package,
>  
>  		union acpi_object *element = &(package->package.elements[i]);
>  
> -		if (!element) {
> +		if (!element) 
                             ^
You are introducing trailing whitespace.

>  			return AE_BAD_DATA;
> -		}
> +		
   ^^^^^^^^^^^^^
For every pair of braces you clean away, you're adding
two new coding style issues.

Best regards,
Nicolas Kaiser

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drivers/acpi/utils.c: Fixed coding style issues
  2011-04-21  8:28 ` Nicolas Kaiser
@ 2011-04-21 16:08   ` Karthigan Srinivasan
  2011-05-02 22:16     ` Karthigan Srinivasan
  0 siblings, 1 reply; 6+ messages in thread
From: Karthigan Srinivasan @ 2011-04-21 16:08 UTC (permalink / raw)
  To: Nicolas Kaiser; +Cc: Len Brown, linux-acpi, linux-kernel

> You are introducing trailing whitespace.
> 
> >  			return AE_BAD_DATA;
> > -		}
> > +		
>    ^^^^^^^^^^^^^
> For every pair of braces you clean away, you're adding
> two new coding style issues.

Nicolas - appreciate your feedback and apologize for the error.  I have
corrected these issues. Re-submitting patch below with corrections.

Best Regards,
Karthigan Srinivasan.


Fixed brace and comment coding style issues is code.

Signed-off-by: Karthigan Srinivasan <karthigan.srinivasan@hp.com>
---
 drivers/acpi/utils.c |   15 ++++++---------
 1 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c
index b002a47..76eaac2 100644
--- a/drivers/acpi/utils.c
+++ b/drivers/acpi/utils.c
@@ -99,9 +99,8 @@ acpi_extract_package(union acpi_object *package,
 
 		union acpi_object *element = &(package->package.elements[i]);
 
-		if (!element) {
+		if (!element)
 			return AE_BAD_DATA;
-		}
 
 		switch (element->type) {
 
@@ -185,9 +184,8 @@ acpi_extract_package(union acpi_object *package,
 		u8 **pointer = NULL;
 		union acpi_object *element = &(package->package.elements[i]);
 
-		if (!element) {
+		if (!element)
 			return AE_BAD_DATA;
-		}
 
 		switch (element->type) {
 
@@ -303,9 +301,8 @@ acpi_evaluate_reference(acpi_handle handle,
 	u32 i = 0;
 
 
-	if (!list) {
+	if (!list)
 		return AE_BAD_PARAMETER;
-	}
 
 	/* Evaluate object. */
 
@@ -337,9 +334,9 @@ acpi_evaluate_reference(acpi_handle handle,
 		goto end;
 	}
 
-	if (package->package.count > ACPI_MAX_HANDLES) {
+	if (package->package.count > ACPI_MAX_HANDLES)
 		return AE_NO_MEMORY;
-	}
+
 	list->count = package->package.count;
 
 	/* Extract package data. */
@@ -373,7 +370,7 @@ acpi_evaluate_reference(acpi_handle handle,
       end:
 	if (ACPI_FAILURE(status)) {
 		list->count = 0;
-		//kfree(list->handles);
+		/* kfree(list->handles); */
 	}
 
 	kfree(buffer.pointer);
-- 
1.7.1




^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] drivers/acpi/utils.c: Fixed coding style issues
  2011-04-21 16:08   ` Karthigan Srinivasan
@ 2011-05-02 22:16     ` Karthigan Srinivasan
  2011-05-03  0:26       ` Joe Perches
  0 siblings, 1 reply; 6+ messages in thread
From: Karthigan Srinivasan @ 2011-05-02 22:16 UTC (permalink / raw)
  To: Len Brown, Nicolas Kaiser; +Cc: linux-acpi, linux-kernel

> On Thu, 2011-04-21 at 11:08 -0500, Karthigan Srinivasan wrote:

Len - I submitted this patch on 4/21 and have not received any
acknowledgement. I am re-submitting it again. Please review and approve.

Best Regards,
Karthigan Srinivasan.

====

Fixed brace and comment coding style issues is code.

Signed-off-by: Karthigan Srinivasan <karthigan.srinivasan@hp.com>
---
 drivers/acpi/utils.c |   15 ++++++---------
 1 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c
index b002a47..76eaac2 100644
--- a/drivers/acpi/utils.c
+++ b/drivers/acpi/utils.c
@@ -99,9 +99,8 @@ acpi_extract_package(union acpi_object *package,
 
 		union acpi_object *element = &(package->package.elements[i]);
 
-		if (!element) {
+		if (!element)
 			return AE_BAD_DATA;
-		}
 
 		switch (element->type) {
 
@@ -185,9 +184,8 @@ acpi_extract_package(union acpi_object *package,
 		u8 **pointer = NULL;
 		union acpi_object *element = &(package->package.elements[i]);
 
-		if (!element) {
+		if (!element)
 			return AE_BAD_DATA;
-		}
 
 		switch (element->type) {
 
@@ -303,9 +301,8 @@ acpi_evaluate_reference(acpi_handle handle,
 	u32 i = 0;
 
 
-	if (!list) {
+	if (!list)
 		return AE_BAD_PARAMETER;
-	}
 
 	/* Evaluate object. */
 
@@ -337,9 +334,9 @@ acpi_evaluate_reference(acpi_handle handle,
 		goto end;
 	}
 
-	if (package->package.count > ACPI_MAX_HANDLES) {
+	if (package->package.count > ACPI_MAX_HANDLES)
 		return AE_NO_MEMORY;
-	}
+
 	list->count = package->package.count;
 
 	/* Extract package data. */
@@ -373,7 +370,7 @@ acpi_evaluate_reference(acpi_handle handle,
       end:
 	if (ACPI_FAILURE(status)) {
 		list->count = 0;
-		//kfree(list->handles);
+		/* kfree(list->handles); */
 	}
 
 	kfree(buffer.pointer);
-- 
1.7.1






^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] drivers/acpi/utils.c: Fixed coding style issues
  2011-05-02 22:16     ` Karthigan Srinivasan
@ 2011-05-03  0:26       ` Joe Perches
  2011-05-03 15:09         ` Karthigan Srinivasan
  0 siblings, 1 reply; 6+ messages in thread
From: Joe Perches @ 2011-05-03  0:26 UTC (permalink / raw)
  To: Karthigan Srinivasan; +Cc: Len Brown, Nicolas Kaiser, linux-acpi, linux-kernel

On Mon, 2011-05-02 at 17:16 -0500, Karthigan Srinivasan wrote:
>  drivers/acpi/utils.c |   15 ++++++---------
> @@ -373,7 +370,7 @@ acpi_evaluate_reference(acpi_handle handle,
>        end:
>  	if (ACPI_FAILURE(status)) {
>  		list->count = 0;
> -		//kfree(list->handles);
> +		/* kfree(list->handles); */

Just delete the line instead.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drivers/acpi/utils.c: Fixed coding style issues
  2011-05-03  0:26       ` Joe Perches
@ 2011-05-03 15:09         ` Karthigan Srinivasan
  0 siblings, 0 replies; 6+ messages in thread
From: Karthigan Srinivasan @ 2011-05-03 15:09 UTC (permalink / raw)
  To: Joe Perches, Len Brown, Nicolas Kaiser; +Cc: linux-acpi, linux-kernel

> > -		//kfree(list->handles);
> > +		/* kfree(list->handles); */

> Just delete the line instead.

Len, Joe, Nicolas - re-submitting patch with above recommended change. 

Best Regards,
Karthigan.

=========

Fixed brace, comment, and label coding style issues.

Signed-off-by: Karthigan Srinivasan <karthigan.srinivasan@hp.com>
---
 drivers/acpi/utils.c |   19 +++++++------------
 1 files changed, 7 insertions(+), 12 deletions(-)

diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c
index b002a47..91289d4 100644
--- a/drivers/acpi/utils.c
+++ b/drivers/acpi/utils.c
@@ -99,9 +99,8 @@ acpi_extract_package(union acpi_object *package,
 
 		union acpi_object *element = &(package->package.elements[i]);
 
-		if (!element) {
+		if (!element)
 			return AE_BAD_DATA;
-		}
 
 		switch (element->type) {
 
@@ -185,9 +184,8 @@ acpi_extract_package(union acpi_object *package,
 		u8 **pointer = NULL;
 		union acpi_object *element = &(package->package.elements[i]);
 
-		if (!element) {
+		if (!element)
 			return AE_BAD_DATA;
-		}
 
 		switch (element->type) {
 
@@ -303,9 +301,8 @@ acpi_evaluate_reference(acpi_handle handle,
 	u32 i = 0;
 
 
-	if (!list) {
+	if (!list)
 		return AE_BAD_PARAMETER;
-	}
 
 	/* Evaluate object. */
 
@@ -337,9 +334,9 @@ acpi_evaluate_reference(acpi_handle handle,
 		goto end;
 	}
 
-	if (package->package.count > ACPI_MAX_HANDLES) {
+	if (package->package.count > ACPI_MAX_HANDLES)
 		return AE_NO_MEMORY;
-	}
+
 	list->count = package->package.count;
 
 	/* Extract package data. */
@@ -370,11 +367,9 @@ acpi_evaluate_reference(acpi_handle handle,
 				  list->handles[i]));
 	}
 
-      end:
-	if (ACPI_FAILURE(status)) {
+end:
+	if (ACPI_FAILURE(status))
 		list->count = 0;
-		//kfree(list->handles);
-	}
 
 	kfree(buffer.pointer);
 
-- 
1.7.1






^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-05-03 15:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-20 23:20 [PATCH] drivers/acpi/utils.c: Fixed coding style issues Karthigan Srinivasan
2011-04-21  8:28 ` Nicolas Kaiser
2011-04-21 16:08   ` Karthigan Srinivasan
2011-05-02 22:16     ` Karthigan Srinivasan
2011-05-03  0:26       ` Joe Perches
2011-05-03 15:09         ` Karthigan Srinivasan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.