Skip to contentSkip to conversation

Fix some coding style and comment problems.

PATCH Superseded Tang Chen 1 participant 7 messages Mar 5, 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):
In acpi_memory_device_notify()
In acpi_get_table_with_size()
In acpi_tb_table_override()
In acpi_tb_install_table()
In acpi_initialize_tables()
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 1/6 In acpi_memory_device_notify()

---
 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 2/6 In 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 3/6 In acpi_tb_table_override()

In reply to Tang Chen
---
 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
author
#4 lore raw

PATCH 4/6 In acpi_tb_install_table()

In reply to Tang Chen
---
 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
#5 lore raw

PATCH 5/6 In 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
#6 lore raw

PATCH 6/6 In Documentation/hw_random.txt

In reply to Tang Chen

Seeing from the comment, there are three reasons for removing request_mem_region.

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