Skip to contentSkip to conversation

Fix some coding style and comment problems.

PATCH RESEND In review Tang Chen 4 participants 12 messages Mar 7, 2013 – Mar 10, 2013

Subsystems (3)
lore
Share & tools
lore

Tang Chen

author
#0 lore raw

cover Fix some coding style and comment problems.

Fix some coding style and comment problems I saw when I was reading the code.

Tang Chen (6):
acpi: Remove the leading space of "unlock" label in
acpi_memory_device_notify().
acpi: Add missing parameter comment for acpi_get_table_with_size().
acpi: Remove the leading spaces of "finish_override" label in
acpi_tb_table_override().
acpi: Remove the leading spaces of "unmap_and_exit" label in
acpi_tb_install_table().
acpi: Add the missing parameter comment for acpi_initialize_tables().
doc: Fix a wrong comment in Documentation/hw_random.txt

 Documentation/hw_random.txt    |    2 +-
 drivers/acpi/acpi_memhotplug.c |    2 +-
 drivers/acpi/acpica/tbinstal.c |    2 +-
 drivers/acpi/acpica/tbutils.c  |    2 +-
 drivers/acpi/acpica/tbxface.c  |    6 +++---
 5 files changed, 7 insertions(+), 7 deletions(-)
author
#1 lore raw

PATCH RESEND 1/6 acpi: Remove the leading space of "unlock" label in acpi_memory_device_notify().

There is a leading space in front of "unlock" label in acpi_memory_device_notify(). Remove it.

---
 drivers/acpi/acpi_memhotplug.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/acpi/acpi_memhotplug.c +1 -1
index da1f82b..8a10c23 100644
@@ -369,7 +369,7 @@ static void acpi_memory_device_notify(acpi_handle handle, u32 event, void *data)
 			kfree(ej_event);
 		}
 
- unlock:
+unlock:
 		acpi_scan_lock_release();
 		if (ACPI_SUCCESS(status))
 			return;
Signature · 1 line
1.7.1
author
#2 lore raw

PATCH RESEND 2/6 acpi: Add missing parameter comment for acpi_get_table_with_size().

In reply to Tang Chen

In the comment of acpi_get_table_with_size(), one parameter tbl_size is missing. And the definitions of i and j begin with space, not tab.

---
 drivers/acpi/acpica/tbxface.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/acpi/acpica/tbxface.c +2 -2
index b35a5e6..93d1432 100644
@@ -304,6 +304,7 @@ ACPI_EXPORT_SYMBOL(acpi_unload_table_id)
  * PARAMETERS:  signature           - ACPI signature of needed table
  *              instance            - Which instance (for SSDTs)
  *              out_table           - Where the pointer to the table is returned
+ *              tbl_size            - Size of the table
  *
  * RETURN:      Status and pointer to table
  *
@@ -315,8 +316,7 @@ acpi_get_table_with_size(char *signature,
 	       u32 instance, struct acpi_table_header **out_table,
 	       acpi_size *tbl_size)
 {
-       u32 i;
-       u32 j;
+	u32 i, j;
 	acpi_status status;
 
 	/* Parameter validation */
Signature · 1 line
1.7.1
author
#3 lore raw

PATCH RESEND 3/6 acpi: Remove the leading spaces of "finish_override" label in acpi_tb_table_override().

In reply to Tang Chen

There is 7 leading spaces in front of "finish_override" label in acpi_tb_table_override(). Remove them.

---
 drivers/acpi/acpica/tbinstal.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/acpi/acpica/tbinstal.c +1 -1
index e57cd38..b1e098d 100644
@@ -313,7 +313,7 @@ struct acpi_table_header *acpi_tb_table_override(struct acpi_table_header
 
 	return (NULL);		/* There was no override */
 
-      finish_override:
+finish_override:
 
 	ACPI_INFO((AE_INFO,
 		   "%4.4s %p %s table override, new table: %p",
Signature · 1 line
1.7.1
#4 lore raw

RE: [RESEND PATCH 3/6] acpi: Remove the leading spaces of "finish_override" label in acpi_tb_table_override().

Please do not try to fix ACPICA indentation problems in Linux side.
This will introduce source code divergences between ACPICA and Linux, which will add difficulties to ACPICA release work. Please find real issues in ACPICA release scripts at:

https://github.com/acpica/acpica/tree/master/generate/linux

Thanks
-Lv

Quoted 35 lines

-----Original Message-----
From: Tang Chen [mailto:[email protected]]
Sent: Thursday, March 07, 2013 6:38 PM
To: [email protected]; [email protected]; Moore, Robert; Zheng, Lv; [email protected]; [email protected]; [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]
Subject: [RESEND PATCH 3/6] acpi: Remove the leading spaces of "finish_override" label in acpi_tb_table_override().

There is 7 leading spaces in front of "finish_override" label in acpi_tb_table_override(). Remove them.

---
 drivers/acpi/acpica/tbinstal.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/acpi/acpica/tbinstal.c index renamed from drivers/acpi/acpica/tbinstal.c +0 -0

e57cd38..b1e098d 100644

drivers/acpi/acpica/tbinstal.c +1 -1
@@ -313,7 +313,7 @@ struct acpi_table_header
 *acpi_tb_table_override(struct acpi_table_header
 
 	return (NULL);		/* There was no override */
 
-      finish_override:
+finish_override:
 
 	ACPI_INFO((AE_INFO,

"%4.4s %p %s table override, new table: %p",
--
1.7.1

author
#5 lore raw

Re: [RESEND PATCH 3/6] acpi: Remove the leading spaces of "finish_override" label in acpi_tb_table_override().

Quoted 5 lines · Lv

Please do not try to fix ACPICA indentation problems in Linux side.
This will introduce source code divergences between ACPICA and Linux, which will add difficulties to ACPICA release work. Please find real issues in ACPICA release scripts at:

https://github.com/acpica/acpica/tree/master/generate/linux

Hi Lv,

Thanks for telling me this. :)

One more thing, if I want to fix something in acpica, such as this patch set, who and which mail list should I send patches to ?

Thanks. :)

Quoted 45 lines

Thanks
-Lv

Quoted 32 lines

-----Original Message-----
From: Tang Chen [mailto:[email protected]]
Sent: Thursday, March 07, 2013 6:38 PM
To: [email protected]; [email protected]; Moore, Robert; Zheng, Lv; [email protected]; [email protected]; [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]
Subject: [RESEND PATCH 3/6] acpi: Remove the leading spaces of "finish_override" label in acpi_tb_table_override().

There is 7 leading spaces in front of "finish_override" label in acpi_tb_table_override(). Remove them.

---
  drivers/acpi/acpica/tbinstal.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
drivers/acpi/acpica/tbinstal.c index renamed from drivers/acpi/acpica/tbinstal.c +0 -0

e57cd38..b1e098d 100644

drivers/acpi/acpica/tbinstal.c +1 -1
@@ -313,7 +313,7 @@ struct acpi_table_header
 *acpi_tb_table_override(struct acpi_table_header
 
  	return (NULL);		/* There was no override */
 
-      finish_override:
+finish_override:
 
  	ACPI_INFO((AE_INFO,
Quoted 3 lines

"%4.4s %p %s table override, new table: %p",
--
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#6 lore raw

Re: [RESEND PATCH 3/6] acpi: Remove the leading spaces of "finish_override" label in acpi_tb_table_override().

Quoted 7 lines · Tang Chen
Quoted 5 lines · Lv

Please do not try to fix ACPICA indentation problems in Linux side.
This will introduce source code divergences between ACPICA and Linux, which will add difficulties to ACPICA release work. Please find real issues in ACPICA release scripts at:

https://github.com/acpica/acpica/tree/master/generate/linux

Quoted 7 lines

Hi Lv,

Thanks for telling me this. :)

One more thing, if I want to fix something in acpica, such as this patch set,
who and which mail list should I send patches to ?

Please post them to [email protected] with CCs to me and Bob Moore.

Thanks,
Rafael

Quoted 41 lines
Quoted 41 lines
Quoted 32 lines

-----Original Message-----
From: Tang Chen [mailto:[email protected]]
Sent: Thursday, March 07, 2013 6:38 PM
To: [email protected]; [email protected]; Moore, Robert; Zheng, Lv; [email protected]; [email protected]; [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]
Subject: [RESEND PATCH 3/6] acpi: Remove the leading spaces of "finish_override" label in acpi_tb_table_override().

There is 7 leading spaces in front of "finish_override" label in acpi_tb_table_override(). Remove them.

---
  drivers/acpi/acpica/tbinstal.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
drivers/acpi/acpica/tbinstal.c index renamed from drivers/acpi/acpica/tbinstal.c +0 -0

e57cd38..b1e098d 100644

drivers/acpi/acpica/tbinstal.c +1 -1
@@ -313,7 +313,7 @@ struct acpi_table_header
 *acpi_tb_table_override(struct acpi_table_header
 
  	return (NULL);		/* There was no override */
 
-      finish_override:
+finish_override:
 
  	ACPI_INFO((AE_INFO,
Quoted 3 lines

"%4.4s %p %s table override, new table: %p",
--
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 2 lines
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
#7 lore raw

RE: [RESEND PATCH 3/6] acpi: Remove the leading spaces of "finish_override" label in acpi_tb_table_override().

Quoted 10 lines
Quoted 7 lines
Quoted 1 line

https://github.com/acpica/acpica/tree/master/generate/linux

Hi Lv,

Thanks for telling me this. :)

One more thing, if I want to fix something in acpica, such as this patch set, who and which mail list should I send patches to ?

Please post them to [email protected] with CCs to me and Bob Moore.

Yes. More information can be found at https://acpica.org/.
You can also just blame me if you find issues caused by the ACPICA release process. :-) I have the duty to make the ACPICA release process better.
Thanks for your contribution.

Best regards
-Lv

author
#8 lore raw

PATCH RESEND 4/6 acpi: Remove the leading spaces of "unmap_and_exit" label in acpi_tb_install_table().

In reply to Tang Chen

There are 6 leading spaces in front of "unmap_and_exit" label in acpi_tb_install_table(). Remove them.

---
 drivers/acpi/acpica/tbutils.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/acpi/acpica/tbutils.c +1 -1
index ce3d5db..27e7715 100644
@@ -539,7 +539,7 @@ acpi_tb_install_table(acpi_physical_address address,
 		acpi_tb_delete_table(table_desc);
 	}
 
-      unmap_and_exit:
+unmap_and_exit:
 
 	/* Always unmap the table header that we mapped above */
 
Signature · 1 line
1.7.1
author
#9 lore raw

PATCH RESEND 5/6 acpi: Add the missing parameter comment for acpi_initialize_tables().

In reply to Tang Chen

In the comment of acpi_initialize_tables(), it mistakes allow_resize with allow_realloc.

---
 drivers/acpi/acpica/tbxface.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/acpi/acpica/tbxface.c +1 -1
index 93d1432..659e0f6 100644
@@ -80,7 +80,7 @@ acpi_status acpi_allocate_root_table(u32 initial_table_count)
  *                                    array is dynamically allocated.
  *              initial_table_count - Size of initial_table_array, in number of
  *                                    struct acpi_table_desc structures
- *              allow_realloc       - Flag to tell Table Manager if resize of
+ *              allow_resize        - Flag to tell Table Manager if resize of
  *                                    pre-allocated array is allowed. Ignored
  *                                    if initial_table_array is NULL.
  *
Signature · 1 line
1.7.1
author
#10 lore raw

PATCH RESEND 6/6 doc: Fix a wrong comment in Documentation/hw_random.txt

In reply to Tang Chen

Seeing from the comment, there should be three reasons for removing request_mem_region. Change the comment "two" to "three".

---
 Documentation/hw_random.txt |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Documentation/hw_random.txt +1 -1
index 690f525..026e237 100644
@@ -63,7 +63,7 @@ Intel RNG Driver notes:
 
 	* FIXME: support poll(2)
 
-	NOTE: request_mem_region was removed, for two reasons:
+	NOTE: request_mem_region was removed, for three reasons:
 	1) Only one RNG is supported by this driver, 2) The location
 	used by the RNG is a fixed location in MMIO-addressable memory,
 	3) users with properly working BIOS e820 handling will always
Signature · 1 line
1.7.1
#11 lore raw

Re: [RESEND PATCH 6/6] doc: Fix a wrong comment in Documentation/hw_random.txt

Quoted 5 lines · Tang Chen

Seeing from the comment, there should be three reasons for removing request_mem_region. Change the comment "two" to "three".

Patch applied.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt