Skip to content

Commit 24338a6

Browse files
sravnborgandreas-gaisler
authored andcommitted
sparc32: Fix section mismatch in leon_pci_grpci
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 <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Andreas Larsson <[email protected]> Fixes: 4154bb8 ("sparc: leon: grpci1: constify of_device_id") Fixes: 03949b1 ("sparc: leon: grpci2: constify of_device_id") Tested-by: Randy Dunlap <[email protected]> # build-tested Reviewed-by: Andreas Larsson <[email protected]> Tested-by: Andreas Larsson <[email protected]> Signed-off-by: Andreas Larsson <[email protected]> Link: https://lore.kernel.org/r/20240224-sam-fix-sparc32-all-builds-v2-7-1f186603c5c4@ravnborg.org
1 parent 91d3ff9 commit 24338a6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

arch/sparc/kernel/leon_pci_grpci1.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ static int grpci1_of_probe(struct platform_device *ofdev)
697697
return err;
698698
}
699699

700-
static const struct of_device_id grpci1_of_match[] __initconst = {
700+
static const struct of_device_id grpci1_of_match[] = {
701701
{
702702
.name = "GAISLER_PCIFBRG",
703703
},

arch/sparc/kernel/leon_pci_grpci2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -889,7 +889,7 @@ static int grpci2_of_probe(struct platform_device *ofdev)
889889
return err;
890890
}
891891

892-
static const struct of_device_id grpci2_of_match[] __initconst = {
892+
static const struct of_device_id grpci2_of_match[] = {
893893
{
894894
.name = "GAISLER_GRPCI2",
895895
},

0 commit comments

Comments
 (0)