diff mbox series

lib/fw_table: Remove acpi_parse_entries_array() export

Message ID 169896282222.70775.940454758280866379.stgit@dwillia2-xfh.jf.intel.com
State Accepted
Commit 4b92894064b3df472b2cf5741c7f080e16dcd1ec
Headers show
Series lib/fw_table: Remove acpi_parse_entries_array() export | expand

Commit Message

Dan Williams Nov. 2, 2023, 10:07 p.m. UTC
Stephen reports that the ACPI helper library rework,
CONFIG_FIRMWARE_TABLE, introduces a new compiler warning:

    WARNING: modpost: vmlinux: acpi_parse_entries_array: EXPORT_SYMBOL used
    for init symbol. Remove __init or EXPORT_SYMBOL.

Delete this export as it turns out it is unneeded, and future work wraps
this in another exported helper. Note that in general
EXPORT_SYMBOL_ACPI_LIB() is needed for exporting symbols that are marked
__init_or_acpilib, but in this case no export is required.

Fixes: a103f46633fd ("acpi: Move common tables helper functions to common lib")
Cc: Dave Jiang <dave.jiang@intel.com>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Closes: http://lore.kernel.org/r/20231030160523.670a7569@canb.auug.org.au
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
 lib/fw_table.c |    1 -
 1 file changed, 1 deletion(-)

Comments

Dave Jiang Nov. 2, 2023, 10:08 p.m. UTC | #1
On 11/2/23 15:07, Dan Williams wrote:
> Stephen reports that the ACPI helper library rework,
> CONFIG_FIRMWARE_TABLE, introduces a new compiler warning:
> 
>     WARNING: modpost: vmlinux: acpi_parse_entries_array: EXPORT_SYMBOL used
>     for init symbol. Remove __init or EXPORT_SYMBOL.
> 
> Delete this export as it turns out it is unneeded, and future work wraps
> this in another exported helper. Note that in general
> EXPORT_SYMBOL_ACPI_LIB() is needed for exporting symbols that are marked
> __init_or_acpilib, but in this case no export is required.
> 
> Fixes: a103f46633fd ("acpi: Move common tables helper functions to common lib")
> Cc: Dave Jiang <dave.jiang@intel.com>
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Closes: http://lore.kernel.org/r/20231030160523.670a7569@canb.auug.org.au
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>

Reviewed-by: Dave Jiang <dave.jiang@intel.com>
> ---
>  lib/fw_table.c |    1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/lib/fw_table.c b/lib/fw_table.c
> index e84bd0866e10..b51f30a28e47 100644
> --- a/lib/fw_table.c
> +++ b/lib/fw_table.c
> @@ -186,4 +186,3 @@ acpi_parse_entries_array(char *id, unsigned long table_size,
>  
>  	return errs ? -EINVAL : count;
>  }
> -EXPORT_SYMBOL_GPL(acpi_parse_entries_array);
>
diff mbox series

Patch

diff --git a/lib/fw_table.c b/lib/fw_table.c
index e84bd0866e10..b51f30a28e47 100644
--- a/lib/fw_table.c
+++ b/lib/fw_table.c
@@ -186,4 +186,3 @@  acpi_parse_entries_array(char *id, unsigned long table_size,
 
 	return errs ? -EINVAL : count;
 }
-EXPORT_SYMBOL_GPL(acpi_parse_entries_array);