Fix some coding style and comment problems.
Subsystems (3)
PATCH RESEND 2/6 acpi: Add missing parameter comment for acpi_get_table_with_size().
In reply to Tang ChenIn 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
@@ -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
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(-)
PATCH RESEND 6/6 doc: Fix a wrong comment in Documentation/hw_random.txt
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
@@ -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
PATCH RESEND 4/6 acpi: Remove the leading spaces of "unmap_and_exit" label in acpi_tb_install_table().
In reply to Tang ChenThere 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
@@ -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
PATCH RESEND 5/6 acpi: Add the missing parameter comment for acpi_initialize_tables().
In reply to Tang ChenIn 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
@@ -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
PATCH RESEND 3/6 acpi: Remove the leading spaces of "finish_override" label in acpi_tb_table_override().
In reply to Tang ChenThere 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
@@ -313,7 +313,7 @@ struct acpi_table_header *acpi_tb_table_override(struct acpi_table_headerreturn (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
PATCH RESEND 1/6 acpi: Remove the leading space of "unlock" label in acpi_memory_device_notify().
In reply to Tang ChenThere 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
@@ -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
Re: [RESEND PATCH 1/6] acpi: Remove the leading space of "unlock" label in acpi_memory_device_notify().
Quoted 12 lines · Tang Chen
There is a leading space in front of "unlock" label in
acpi_memory_device_notify(). Remove it.Signed-off-by Tang Chen <[email protected]>--- drivers/acpi/acpi_memhotplug.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/acpi/acpi_memhotplug.c +0
-0
drivers/acpi/acpi_memhotplug.c static void acpi_memory_device_notify(acpi_handle handle, u32 event, void *data) · line 375
Quoted 8 lines
drivers/acpi/acpi_memhotplug.c +1
-1@@ -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 ;
The leading space is actually in agreement with the kernel coding style (and there's a reason why it's there).
Thanks,
Rafael
Signature · 2 lines
I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center.
Re: [RESEND PATCH 1/6] acpi: Remove the leading space of "unlock" label in acpi_memory_device_notify().
2013/3/26 Rafael J. Wysocki <[email protected]>:
Quoted 16 lines · Tang Chen
Quoted 15 lines
There is a leading space in front of "unlock" label in
acpi_memory_device_notify(). Remove it.Signed-off-by Tang Chen <[email protected]>--- drivers/acpi/acpi_memhotplug.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/acpi/acpi_memhotplug.c +0
-0@@ -369,7 +369,7 @@ static void acpi_memory_device_notify(acpi_handle handle, u32 event, void *data)kfree (ej_event); }
Quoted 8 lines
drivers/acpi/acpi_memhotplug.c static void acpi_memory_device_notify(acpi_handle handle, u32 event, void *data) · line 375
Quoted 5 lines
drivers/acpi/acpi_memhotplug.c +1
-1- unlock: +unlock:acpi_scan_lock_release ();if (ACPI_SUCCESS (status))return ;The leading space is actually in agreement with the kernel coding style (and there's a reason why it's there).
Well, I'm curious. What's the reason ?
I didn't see anything in Documentation/CodingStyle about that.
Regards,
Richard.
Re: [RESEND PATCH 1/6] acpi: Remove the leading space of "unlock" label in acpi_memory_device_notify().
Quoted 26 lines · Richard Genoud
2013/3/26 Rafael J. Wysocki <[email protected]>:
Quoted 16 lines · Tang Chen
Quoted 15 lines
There is a leading space in front of "unlock" label in
acpi_memory_device_notify(). Remove it.Signed-off-by Tang Chen <[email protected]>--- drivers/acpi/acpi_memhotplug.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/acpi/acpi_memhotplug.c +0
-0@@ -369,7 +369,7 @@ static void acpi_memory_device_notify(acpi_handle handle, u32 event, void *data)kfree (ej_event); }Quoted 8 lines
drivers/acpi/acpi_memhotplug.c static void acpi_memory_device_notify(acpi_handle handle, u32 event, void *data) · line 375
Quoted 5 lines
drivers/acpi/acpi_memhotplug.c +1
-1- unlock: +unlock:acpi_scan_lock_release ();if (ACPI_SUCCESS (status))return ;The leading space is actually in agreement with the kernel coding style (and there's a reason why it's there).
Quoted 2 lines
Well, I'm curious. What's the reason ?
I didn't see anything inDocumentation/CodingStyleabout that.
Some tools had problems with labels starting right at the start of the line. patch or diff or something similar IIRC. That's not the case any more, but there's a leading space before many labels in the kernel and that is part of the coding style, actually, even if it is not documented.
Certainly, it's not something to fix.
Thanks,
Rafael
Signature · 2 lines
I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center.