[Linux-parport] [PATCH v2 7/7] sparc32: Fix section mismatch in leon_pci_grpci
Randy Dunlap
rdunlap at infradead.org
Sat Mar 2 15:54:01 PST 2024
On 2/24/24 09:42, Sam Ravnborg via B4 Relay wrote:
> From: Sam Ravnborg <sam at ravnborg.org>
>
> Passing a datastructre marked _initconst to platform_driver_register()
> is wrong. Drop the __initconst notation.
>
> This fixes the following warnings:
>
> WARNING: modpost: vmlinux: section mismatch in reference: grpci1_of_driver+0x30 (section: .data) -> grpci1_of_match (section: .init.rodata)
> WARNING: modpost: vmlinux: section mismatch in reference: grpci2_of_driver+0x30 (section: .data) -> grpci2_of_match (section: .init.rodata)
>
> Signed-off-by: Sam Ravnborg <sam at ravnborg.org>
> Cc: "David S. Miller" <davem at davemloft.net>
> Cc: Andreas Larsson <andreas at gaisler.com>
Tested-by: Randy Dunlap <rdunlap at infradead.org> # build-tested
Thanks.
> ---
> arch/sparc/kernel/leon_pci_grpci1.c | 2 +-
> arch/sparc/kernel/leon_pci_grpci2.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/sparc/kernel/leon_pci_grpci1.c b/arch/sparc/kernel/leon_pci_grpci1.c
> index 8700a0e3b0df..b2b639bee068 100644
> --- a/arch/sparc/kernel/leon_pci_grpci1.c
> +++ b/arch/sparc/kernel/leon_pci_grpci1.c
> @@ -697,7 +697,7 @@ static int grpci1_of_probe(struct platform_device *ofdev)
> return err;
> }
>
> -static const struct of_device_id grpci1_of_match[] __initconst = {
> +static const struct of_device_id grpci1_of_match[] = {
> {
> .name = "GAISLER_PCIFBRG",
> },
> diff --git a/arch/sparc/kernel/leon_pci_grpci2.c b/arch/sparc/kernel/leon_pci_grpci2.c
> index 282b49d496ea..9f662340b5b2 100644
> --- a/arch/sparc/kernel/leon_pci_grpci2.c
> +++ b/arch/sparc/kernel/leon_pci_grpci2.c
> @@ -889,7 +889,7 @@ static int grpci2_of_probe(struct platform_device *ofdev)
> return err;
> }
>
> -static const struct of_device_id grpci2_of_match[] __initconst = {
> +static const struct of_device_id grpci2_of_match[] = {
> {
> .name = "GAISLER_GRPCI2",
> },
>
--
#Randy
More information about the Linux-parport
mailing list