Skip to contentSkip to conversation

ACPCIA: Remove unused acpi_ns_one_complete_parse

PATCH In review [email protected] 2 participants 3 messages Sep 14, 2024 – Oct 4, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ACPCIA: Remove unused acpi_ns_one_complete_parse

From: "Dr. David Alan Gilbert" <[email protected]>

The last use of 'acpi_ns_one_complete_parse' was removed by commit aa342261bde5 ("ACPICA: Remove legacy module-level code support")

Remove it.

---
 drivers/acpi/acpica/acnamesp.h |   5 --
 drivers/acpi/acpica/nsparse.c  | 102 ---------------------------------
 2 files changed, 107 deletions(-)
drivers/acpi/acpica/acnamesp.h +0 -5
index 9448bc026b9b..c3dd202e247f 100644
@@ -104,11 +104,6 @@ acpi_ns_parse_table(u32 table_index, struct acpi_namespace_node *start_node);
 acpi_status
 acpi_ns_execute_table(u32 table_index, struct acpi_namespace_node *start_node);
 
-acpi_status
-acpi_ns_one_complete_parse(u32 pass_number,
-			   u32 table_index,
-			   struct acpi_namespace_node *start_node);
-
 /*
  * nsaccess - Top-level namespace access
  */
drivers/acpi/acpica/nsparse.c +0 -102

108 lines not on this page · raw message

Signature · 1 line
2.46.0
#1 lore raw
Quoted 9 lines · On Sat, Sep 14, 2024 at 4:00 PM <[email protected]> wrote:

From: "Dr. David Alan Gilbert" <[email protected]>

The last use of 'acpi_ns_one_complete_parse' was removed by commit aa342261bde5 ("ACPICA: Remove legacy module-level code support")

Remove it.

In order to make changes in the ACPICA code, please submit them to the upstream ACPICA project on GitHub from where they will be automatically ported to the Linux kernel when the next upstream ACPICA release is made.

If you want an ACPICA code change that has already been merged into upstream ACPICA to be ported to Linux before the next ACPICA release, please send a Linux patch corresponding to it with a Link tag pointing to the original ACPICA commit or pull request through which it was submitted.

Thanks!

Quoted 138 lines
---
 drivers/acpi/acpica/acnamesp.h |   5 --
 drivers/acpi/acpica/nsparse.c  | 102 ---------------------------------
 2 files changed, 107 deletions(-)
drivers/acpi/acpica/acnamesp.h +0 -5
index 9448bc026b9b..c3dd202e247f 100644
@@ -104,11 +104,6 @@ acpi_ns_parse_table(u32 table_index, struct acpi_namespace_node *start_node);
 acpi_status
 acpi_ns_execute_table(u32 table_index, struct acpi_namespace_node *start_node);
 
-acpi_status
-acpi_ns_one_complete_parse(u32 pass_number,
-                          u32 table_index,
-                          struct acpi_namespace_node *start_node);
-
 /*
  * nsaccess - Top-level namespace access
  */
drivers/acpi/acpica/nsparse.c +0 -103
index 31e551cf4ea6..549dc16aed3c 100644
@@ -131,108 +131,6 @@ acpi_ns_execute_table(u32 table_index, struct acpi_namespace_node *start_node)
        return_ACPI_STATUS(status);
 }
 
-/*******************************************************************************
- *
- * FUNCTION:    ns_one_complete_parse
- *
- * PARAMETERS:  pass_number             - 1 or 2
- *              table_desc              - The table to be parsed.
- *
- * RETURN:      Status
- *
- * DESCRIPTION: Perform one complete parse of an ACPI/AML table.
- *
- ******************************************************************************/
-
-acpi_status
-acpi_ns_one_complete_parse(u32 pass_number,
-                          u32 table_index,
-                          struct acpi_namespace_node *start_node)
-{
-       union acpi_parse_object *parse_root;
-       acpi_status status;
-       u32 aml_length;
-       u8 *aml_start;
-       struct acpi_walk_state *walk_state;
-       struct acpi_table_header *table;
-       acpi_owner_id owner_id;
-
-       ACPI_FUNCTION_TRACE(ns_one_complete_parse);
-
-       status = acpi_get_table_by_index(table_index, &table);
-       if (ACPI_FAILURE(status)) {
-               return_ACPI_STATUS(status);
-       }
-
-       /* Table must consist of at least a complete header */
-
-       if (table->length < sizeof(struct acpi_table_header)) {
-               return_ACPI_STATUS(AE_BAD_HEADER);
-       }
-
-       aml_start = (u8 *)table + sizeof(struct acpi_table_header);
-       aml_length = table->length - sizeof(struct acpi_table_header);
-
-       status = acpi_tb_get_owner_id(table_index, &owner_id);
-       if (ACPI_FAILURE(status)) {
-               return_ACPI_STATUS(status);
-       }
-
-       /* Create and init a Root Node */
-
-       parse_root = acpi_ps_create_scope_op(aml_start);
-       if (!parse_root) {
-               return_ACPI_STATUS(AE_NO_MEMORY);
-       }
-
-       /* Create and initialize a new walk state */
-
-       walk_state = acpi_ds_create_walk_state(owner_id, NULL, NULL, NULL);
-       if (!walk_state) {
-               acpi_ps_free_op(parse_root);
-               return_ACPI_STATUS(AE_NO_MEMORY);
-       }
-
-       status = acpi_ds_init_aml_walk(walk_state, parse_root, NULL,
-                                      aml_start, aml_length, NULL,
-                                      (u8)pass_number);
-       if (ACPI_FAILURE(status)) {
-               acpi_ds_delete_walk_state(walk_state);
-               goto cleanup;
-       }
-
-       /* Found OSDT table, enable the namespace override feature */
-
-       if (ACPI_COMPARE_NAMESEG(table->signature, ACPI_SIG_OSDT) &&
-           pass_number == ACPI_IMODE_LOAD_PASS1) {
-               walk_state->namespace_override = TRUE;
-       }
-
-       /* start_node is the default location to load the table */
-
-       if (start_node && start_node != acpi_gbl_root_node) {
-               status =
-                   acpi_ds_scope_stack_push(start_node, ACPI_TYPE_METHOD,
-                                            walk_state);
-               if (ACPI_FAILURE(status)) {
-                       acpi_ds_delete_walk_state(walk_state);
-                       goto cleanup;
-               }
-       }
-
-       /* Parse the AML */
-
-       ACPI_DEBUG_PRINT((ACPI_DB_PARSE,
-                         "*PARSE* pass %u parse\n", pass_number));
-       acpi_ex_enter_interpreter();
-       status = acpi_ps_parse_aml(walk_state);
-       acpi_ex_exit_interpreter();
-
-cleanup:
-       acpi_ps_delete_parse_tree(parse_root);
-       return_ACPI_STATUS(status);
-}
-
 /*******************************************************************************
  *
  * FUNCTION:    acpi_ns_parse_table
--

2.46.0

#2 lore raw
Quoted 7 lines · * Rafael J. Wysocki ([email protected]) wrote:
Quoted 6 lines · On Sat, Sep 14, 2024 at 4:00 PM <[email protected]> wrote:

From: "Dr. David Alan Gilbert" <[email protected]>

The last use of 'acpi_ns_one_complete_parse' was removed by commit aa342261bde5 ("ACPICA: Remove legacy module-level code support")

Quoted 8 lines
Quoted 3 lines

Remove it.

In order to make changes in the ACPICA code, please submit them to the upstream ACPICA project on GitHub from where they will be automatically ported to the Linux kernel when the next upstream ACPICA release is made.

OK, I'll go and have a dig in there for this and other related patches.

Dave

Quoted 147 lines

If you want an ACPICA code change that has already been merged into upstream ACPICA to be ported to Linux before the next ACPICA release, please send a Linux patch corresponding to it with a Link tag pointing to the original ACPICA commit or pull request through which it was submitted.

Thanks!

Quoted 138 lines
---
 drivers/acpi/acpica/acnamesp.h |   5 --
 drivers/acpi/acpica/nsparse.c  | 102 ---------------------------------
 2 files changed, 107 deletions(-)
drivers/acpi/acpica/acnamesp.h +0 -5
index 9448bc026b9b..c3dd202e247f 100644
@@ -104,11 +104,6 @@ acpi_ns_parse_table(u32 table_index, struct acpi_namespace_node *start_node);
 acpi_status
 acpi_ns_execute_table(u32 table_index, struct acpi_namespace_node *start_node);
 
-acpi_status
-acpi_ns_one_complete_parse(u32 pass_number,
-                          u32 table_index,
-                          struct acpi_namespace_node *start_node);
-
 /*
  * nsaccess - Top-level namespace access
  */
drivers/acpi/acpica/nsparse.c +0 -103
index 31e551cf4ea6..549dc16aed3c 100644
@@ -131,108 +131,6 @@ acpi_ns_execute_table(u32 table_index, struct acpi_namespace_node *start_node)
        return_ACPI_STATUS(status);
 }
 
-/*******************************************************************************
- *
- * FUNCTION:    ns_one_complete_parse
- *
- * PARAMETERS:  pass_number             - 1 or 2
- *              table_desc              - The table to be parsed.
- *
- * RETURN:      Status
- *
- * DESCRIPTION: Perform one complete parse of an ACPI/AML table.
- *
- ******************************************************************************/
-
-acpi_status
-acpi_ns_one_complete_parse(u32 pass_number,
-                          u32 table_index,
-                          struct acpi_namespace_node *start_node)
-{
-       union acpi_parse_object *parse_root;
-       acpi_status status;
-       u32 aml_length;
-       u8 *aml_start;
-       struct acpi_walk_state *walk_state;
-       struct acpi_table_header *table;
-       acpi_owner_id owner_id;
-
-       ACPI_FUNCTION_TRACE(ns_one_complete_parse);
-
-       status = acpi_get_table_by_index(table_index, &table);
-       if (ACPI_FAILURE(status)) {
-               return_ACPI_STATUS(status);
-       }
-
-       /* Table must consist of at least a complete header */
-
-       if (table->length < sizeof(struct acpi_table_header)) {
-               return_ACPI_STATUS(AE_BAD_HEADER);
-       }
-
-       aml_start = (u8 *)table + sizeof(struct acpi_table_header);
-       aml_length = table->length - sizeof(struct acpi_table_header);
-
-       status = acpi_tb_get_owner_id(table_index, &owner_id);
-       if (ACPI_FAILURE(status)) {
-               return_ACPI_STATUS(status);
-       }
-
-       /* Create and init a Root Node */
-
-       parse_root = acpi_ps_create_scope_op(aml_start);
-       if (!parse_root) {
-               return_ACPI_STATUS(AE_NO_MEMORY);
-       }
-
-       /* Create and initialize a new walk state */
-
-       walk_state = acpi_ds_create_walk_state(owner_id, NULL, NULL, NULL);
-       if (!walk_state) {
-               acpi_ps_free_op(parse_root);
-               return_ACPI_STATUS(AE_NO_MEMORY);
-       }
-
-       status = acpi_ds_init_aml_walk(walk_state, parse_root, NULL,
-                                      aml_start, aml_length, NULL,
-                                      (u8)pass_number);
-       if (ACPI_FAILURE(status)) {
-               acpi_ds_delete_walk_state(walk_state);
-               goto cleanup;
-       }
-
-       /* Found OSDT table, enable the namespace override feature */
-
-       if (ACPI_COMPARE_NAMESEG(table->signature, ACPI_SIG_OSDT) &&
-           pass_number == ACPI_IMODE_LOAD_PASS1) {
-               walk_state->namespace_override = TRUE;
-       }
-
-       /* start_node is the default location to load the table */
-
-       if (start_node && start_node != acpi_gbl_root_node) {
-               status =
-                   acpi_ds_scope_stack_push(start_node, ACPI_TYPE_METHOD,
-                                            walk_state);
-               if (ACPI_FAILURE(status)) {
-                       acpi_ds_delete_walk_state(walk_state);
-                       goto cleanup;
-               }
-       }
-
-       /* Parse the AML */
-
-       ACPI_DEBUG_PRINT((ACPI_DB_PARSE,
-                         "*PARSE* pass %u parse\n", pass_number));
-       acpi_ex_enter_interpreter();
-       status = acpi_ps_parse_aml(walk_state);
-       acpi_ex_exit_interpreter();
-
-cleanup:
-       acpi_ps_delete_parse_tree(parse_root);
-       return_ACPI_STATUS(status);
-}
-
 /*******************************************************************************
  *
  * FUNCTION:    acpi_ns_parse_table
--

2.46.0

Signature · 4 lines
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
\        dave @ treblig.org |                               | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/