public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [RESEND PATCH 0/6] Fix some coding style and comment problems.
@ 2013-03-06  8:30 Tang Chen
  2013-03-06  8:30 ` [RESEND PATCH 1/6] acpi: Remove the leading space of "unlock" label in acpi_memory_device_notify() Tang Chen
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Tang Chen @ 2013-03-06  8:30 UTC (permalink / raw)
  To: lenb, rjw, robert.moore, lv.zheng, ming.m.lin, mpm, herbert, rob
  Cc: linux-acpi, linux-kernel, linux-doc

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(-)


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

* [RESEND PATCH 1/6] acpi: Remove the leading space of "unlock" label in acpi_memory_device_notify().
  2013-03-06  8:30 [RESEND PATCH 0/6] Fix some coding style and comment problems Tang Chen
@ 2013-03-06  8:30 ` Tang Chen
  2013-03-26 13:17   ` Rafael J. Wysocki
  2013-03-06  8:30 ` [RESEND PATCH 2/6] acpi: Add missing parameter comment for acpi_get_table_with_size() Tang Chen
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 11+ messages in thread
From: Tang Chen @ 2013-03-06  8:30 UTC (permalink / raw)
  To: lenb, rjw, robert.moore, lv.zheng, ming.m.lin, mpm, herbert, rob
  Cc: linux-acpi, linux-kernel, linux-doc

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

Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
---
 drivers/acpi/acpi_memhotplug.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c
index da1f82b..8a10c23 100644
--- a/drivers/acpi/acpi_memhotplug.c
+++ b/drivers/acpi/acpi_memhotplug.c
@@ -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;
-- 
1.7.1


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

* [RESEND PATCH 2/6] acpi: Add missing parameter comment for acpi_get_table_with_size().
  2013-03-06  8:30 [RESEND PATCH 0/6] Fix some coding style and comment problems Tang Chen
  2013-03-06  8:30 ` [RESEND PATCH 1/6] acpi: Remove the leading space of "unlock" label in acpi_memory_device_notify() Tang Chen
@ 2013-03-06  8:30 ` Tang Chen
  2013-03-06  8:30 ` [RESEND PATCH 3/6] acpi: Remove the leading spaces of "finish_override" label in acpi_tb_table_override() Tang Chen
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: Tang Chen @ 2013-03-06  8:30 UTC (permalink / raw)
  To: lenb, rjw, robert.moore, lv.zheng, ming.m.lin, mpm, herbert, rob
  Cc: linux-acpi, linux-kernel, linux-doc

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.

Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
---
 drivers/acpi/acpica/tbxface.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/acpi/acpica/tbxface.c b/drivers/acpi/acpica/tbxface.c
index b35a5e6..93d1432 100644
--- a/drivers/acpi/acpica/tbxface.c
+++ b/drivers/acpi/acpica/tbxface.c
@@ -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 */
-- 
1.7.1


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

* [RESEND PATCH 3/6] acpi: Remove the leading spaces of "finish_override" label in acpi_tb_table_override().
  2013-03-06  8:30 [RESEND PATCH 0/6] Fix some coding style and comment problems Tang Chen
  2013-03-06  8:30 ` [RESEND PATCH 1/6] acpi: Remove the leading space of "unlock" label in acpi_memory_device_notify() Tang Chen
  2013-03-06  8:30 ` [RESEND PATCH 2/6] acpi: Add missing parameter comment for acpi_get_table_with_size() Tang Chen
@ 2013-03-06  8:30 ` Tang Chen
  2013-03-06  8:30 ` [RESEND PATCH 4/6] acpi: Remove the leading spaces of "unmap_and_exit" label in acpi_tb_install_table() Tang Chen
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: Tang Chen @ 2013-03-06  8:30 UTC (permalink / raw)
  To: lenb, rjw, robert.moore, lv.zheng, ming.m.lin, mpm, herbert, rob
  Cc: linux-acpi, linux-kernel, linux-doc

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

Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
---
 drivers/acpi/acpica/tbinstal.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/acpi/acpica/tbinstal.c b/drivers/acpi/acpica/tbinstal.c
index e57cd38..b1e098d 100644
--- a/drivers/acpi/acpica/tbinstal.c
+++ b/drivers/acpi/acpica/tbinstal.c
@@ -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

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

* [RESEND PATCH 4/6] acpi: Remove the leading spaces of "unmap_and_exit" label in acpi_tb_install_table().
  2013-03-06  8:30 [RESEND PATCH 0/6] Fix some coding style and comment problems Tang Chen
                   ` (2 preceding siblings ...)
  2013-03-06  8:30 ` [RESEND PATCH 3/6] acpi: Remove the leading spaces of "finish_override" label in acpi_tb_table_override() Tang Chen
@ 2013-03-06  8:30 ` Tang Chen
  2013-03-06  8:30 ` [RESEND PATCH 5/6] acpi: Add the missing parameter comment for acpi_initialize_tables() Tang Chen
  2013-03-06  8:30 ` [RESEND PATCH 6/6] doc: Fix a wrong comment in Documentation/hw_random.txt Tang Chen
  5 siblings, 0 replies; 11+ messages in thread
From: Tang Chen @ 2013-03-06  8:30 UTC (permalink / raw)
  To: lenb, rjw, robert.moore, lv.zheng, ming.m.lin, mpm, herbert, rob
  Cc: linux-acpi, linux-kernel, linux-doc

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

Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
---
 drivers/acpi/acpica/tbutils.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/acpi/acpica/tbutils.c b/drivers/acpi/acpica/tbutils.c
index ce3d5db..27e7715 100644
--- a/drivers/acpi/acpica/tbutils.c
+++ b/drivers/acpi/acpica/tbutils.c
@@ -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 */
 
-- 
1.7.1

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

* [RESEND PATCH 5/6] acpi: Add the missing parameter comment for acpi_initialize_tables().
  2013-03-06  8:30 [RESEND PATCH 0/6] Fix some coding style and comment problems Tang Chen
                   ` (3 preceding siblings ...)
  2013-03-06  8:30 ` [RESEND PATCH 4/6] acpi: Remove the leading spaces of "unmap_and_exit" label in acpi_tb_install_table() Tang Chen
@ 2013-03-06  8:30 ` Tang Chen
  2013-03-06  8:30 ` [RESEND PATCH 6/6] doc: Fix a wrong comment in Documentation/hw_random.txt Tang Chen
  5 siblings, 0 replies; 11+ messages in thread
From: Tang Chen @ 2013-03-06  8:30 UTC (permalink / raw)
  To: lenb, rjw, robert.moore, lv.zheng, ming.m.lin, mpm, herbert, rob
  Cc: linux-acpi, linux-kernel, linux-doc

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

Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
---
 drivers/acpi/acpica/tbxface.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/acpi/acpica/tbxface.c b/drivers/acpi/acpica/tbxface.c
index 93d1432..659e0f6 100644
--- a/drivers/acpi/acpica/tbxface.c
+++ b/drivers/acpi/acpica/tbxface.c
@@ -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.
  *
-- 
1.7.1


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

* [RESEND PATCH 6/6] doc: Fix a wrong comment in Documentation/hw_random.txt
  2013-03-06  8:30 [RESEND PATCH 0/6] Fix some coding style and comment problems Tang Chen
                   ` (4 preceding siblings ...)
  2013-03-06  8:30 ` [RESEND PATCH 5/6] acpi: Add the missing parameter comment for acpi_initialize_tables() Tang Chen
@ 2013-03-06  8:30 ` Tang Chen
  5 siblings, 0 replies; 11+ messages in thread
From: Tang Chen @ 2013-03-06  8:30 UTC (permalink / raw)
  To: lenb, rjw, robert.moore, lv.zheng, ming.m.lin, mpm, herbert, rob
  Cc: linux-acpi, linux-kernel, linux-doc

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

Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
---
 Documentation/hw_random.txt |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Documentation/hw_random.txt b/Documentation/hw_random.txt
index 690f525..026e237 100644
--- a/Documentation/hw_random.txt
+++ b/Documentation/hw_random.txt
@@ -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
-- 
1.7.1


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

* [RESEND PATCH 1/6] acpi: Remove the leading space of "unlock" label in acpi_memory_device_notify().
  2013-03-07 10:38 [RESEND PATCH 0/6] Fix some coding style and comment problems Tang Chen
@ 2013-03-07 10:38 ` Tang Chen
  0 siblings, 0 replies; 11+ messages in thread
From: Tang Chen @ 2013-03-07 10:38 UTC (permalink / raw)
  To: lenb, rjw, robert.moore, lv.zheng, ming.m.lin, mpm, herbert, rob
  Cc: linux-acpi, linux-kernel, linux-doc, trivial

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

Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
---
 drivers/acpi/acpi_memhotplug.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c
index da1f82b..8a10c23 100644
--- a/drivers/acpi/acpi_memhotplug.c
+++ b/drivers/acpi/acpi_memhotplug.c
@@ -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;
-- 
1.7.1

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

* Re: [RESEND PATCH 1/6] acpi: Remove the leading space of "unlock" label in acpi_memory_device_notify().
  2013-03-06  8:30 ` [RESEND PATCH 1/6] acpi: Remove the leading space of "unlock" label in acpi_memory_device_notify() Tang Chen
@ 2013-03-26 13:17   ` Rafael J. Wysocki
  2013-03-26 13:23     ` Richard Genoud
  0 siblings, 1 reply; 11+ messages in thread
From: Rafael J. Wysocki @ 2013-03-26 13:17 UTC (permalink / raw)
  To: Tang Chen
  Cc: lenb, robert.moore, lv.zheng, ming.m.lin, mpm, herbert, rob,
	linux-acpi, linux-kernel, linux-doc

On Wednesday, March 06, 2013 04:30:06 PM Tang Chen wrote:
> There is a leading space in front of "unlock" label in acpi_memory_device_notify(). Remove it.
> 
> Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
> ---
>  drivers/acpi/acpi_memhotplug.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c
> index da1f82b..8a10c23 100644
> --- a/drivers/acpi/acpi_memhotplug.c
> +++ b/drivers/acpi/acpi_memhotplug.c
> @@ -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


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

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

* Re: [RESEND PATCH 1/6] acpi: Remove the leading space of "unlock" label in acpi_memory_device_notify().
  2013-03-26 13:17   ` Rafael J. Wysocki
@ 2013-03-26 13:23     ` Richard Genoud
  2013-03-26 13:50       ` Rafael J. Wysocki
  0 siblings, 1 reply; 11+ messages in thread
From: Richard Genoud @ 2013-03-26 13:23 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Tang Chen, lenb, robert.moore, lv.zheng, ming.m.lin, mpm, herbert,
	rob, linux-acpi, linux-kernel, linux-doc

2013/3/26 Rafael J. Wysocki <rjw@sisk.pl>:
> On Wednesday, March 06, 2013 04:30:06 PM Tang Chen wrote:
>> There is a leading space in front of "unlock" label in acpi_memory_device_notify(). Remove it.
>>
>> Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
>> ---
>>  drivers/acpi/acpi_memhotplug.c |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c
>> index da1f82b..8a10c23 100644
>> --- a/drivers/acpi/acpi_memhotplug.c
>> +++ b/drivers/acpi/acpi_memhotplug.c
>> @@ -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).

Well, I'm curious. What's the reason ?
I didn't see anything in Documentation/CodingStyle about that.

Regards,
Richard.

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

* Re: [RESEND PATCH 1/6] acpi: Remove the leading space of "unlock" label in acpi_memory_device_notify().
  2013-03-26 13:23     ` Richard Genoud
@ 2013-03-26 13:50       ` Rafael J. Wysocki
  0 siblings, 0 replies; 11+ messages in thread
From: Rafael J. Wysocki @ 2013-03-26 13:50 UTC (permalink / raw)
  To: Richard Genoud
  Cc: Tang Chen, lenb, robert.moore, lv.zheng, ming.m.lin, mpm, herbert,
	rob, linux-acpi, linux-kernel, linux-doc

On Tuesday, March 26, 2013 02:23:49 PM Richard Genoud wrote:
> 2013/3/26 Rafael J. Wysocki <rjw@sisk.pl>:
> > On Wednesday, March 06, 2013 04:30:06 PM Tang Chen wrote:
> >> There is a leading space in front of "unlock" label in acpi_memory_device_notify(). Remove it.
> >>
> >> Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
> >> ---
> >>  drivers/acpi/acpi_memhotplug.c |    2 +-
> >>  1 files changed, 1 insertions(+), 1 deletions(-)
> >>
> >> diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c
> >> index da1f82b..8a10c23 100644
> >> --- a/drivers/acpi/acpi_memhotplug.c
> >> +++ b/drivers/acpi/acpi_memhotplug.c
> >> @@ -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).
> 
> Well, I'm curious. What's the reason ?
> I didn't see anything in Documentation/CodingStyle about 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


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

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

end of thread, other threads:[~2013-03-26 13:42 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-06  8:30 [RESEND PATCH 0/6] Fix some coding style and comment problems Tang Chen
2013-03-06  8:30 ` [RESEND PATCH 1/6] acpi: Remove the leading space of "unlock" label in acpi_memory_device_notify() Tang Chen
2013-03-26 13:17   ` Rafael J. Wysocki
2013-03-26 13:23     ` Richard Genoud
2013-03-26 13:50       ` Rafael J. Wysocki
2013-03-06  8:30 ` [RESEND PATCH 2/6] acpi: Add missing parameter comment for acpi_get_table_with_size() Tang Chen
2013-03-06  8:30 ` [RESEND PATCH 3/6] acpi: Remove the leading spaces of "finish_override" label in acpi_tb_table_override() Tang Chen
2013-03-06  8:30 ` [RESEND PATCH 4/6] acpi: Remove the leading spaces of "unmap_and_exit" label in acpi_tb_install_table() Tang Chen
2013-03-06  8:30 ` [RESEND PATCH 5/6] acpi: Add the missing parameter comment for acpi_initialize_tables() Tang Chen
2013-03-06  8:30 ` [RESEND PATCH 6/6] doc: Fix a wrong comment in Documentation/hw_random.txt Tang Chen
  -- strict thread matches above, loose matches on Subject: below --
2013-03-07 10:38 [RESEND PATCH 0/6] Fix some coding style and comment problems Tang Chen
2013-03-07 10:38 ` [RESEND PATCH 1/6] acpi: Remove the leading space of "unlock" label in acpi_memory_device_notify() Tang Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox