All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gpio: xgs-iproc: Fix section mismatch on device tree match table
@ 2019-11-05 12:49 ` Mark Brown
  0 siblings, 0 replies; 12+ messages in thread
From: Mark Brown @ 2019-11-05 12:49 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Chris Packham
  Cc: bcm-kernel-feedback-list, linux-gpio, linux-arm-kernel, Mark Brown

The table of devicetree identifiers is annotated as __initconst
indicating that it can be discarded after kernel boot but it is
referenced from the driver struct which has no init annotation leading
to a linker warning:

WARNING: vmlinux.o(.data+0x82d58): Section mismatch in reference from the variable bcm_iproc_gpio_driver to the variable .init.rodata:bcm_iproc_gpio_of_match
The variable bcm_iproc_gpio_driver references
the variable __initconst bcm_iproc_gpio_of_match

Since drivers can be probed after init the lack of annotation on the
driver struct is correct so remove the annotation from the match table.

Signed-off-by: Mark Brown <broonie@kernel.org>
---
 drivers/gpio/gpio-xgs-iproc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-xgs-iproc.c b/drivers/gpio/gpio-xgs-iproc.c
index a3fdd95cc9e6..bb183f584d92 100644
--- a/drivers/gpio/gpio-xgs-iproc.c
+++ b/drivers/gpio/gpio-xgs-iproc.c
@@ -299,7 +299,7 @@ static int __exit iproc_gpio_remove(struct platform_device *pdev)
 	return 0;
 }
 
-static const struct of_device_id bcm_iproc_gpio_of_match[] __initconst = {
+static const struct of_device_id bcm_iproc_gpio_of_match[] = {
 	{ .compatible = "brcm,iproc-gpio-cca" },
 	{}
 };
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2019-11-07  7:56 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-05 12:49 [PATCH] gpio: xgs-iproc: Fix section mismatch on device tree match table Mark Brown
2019-11-05 12:49 ` Mark Brown
2019-11-05 20:07 ` Chris Packham
2019-11-05 20:07   ` Chris Packham
2019-11-06  7:08 ` Yoshihiro Shimoda
2019-11-06  7:08   ` Yoshihiro Shimoda
2019-11-06 19:49   ` Chris Packham
2019-11-06 19:49     ` Chris Packham
2019-11-06 20:28     ` Guillaume Tucker
2019-11-06 20:28       ` Guillaume Tucker
2019-11-07  7:56 ` Linus Walleij
2019-11-07  7:56   ` Linus Walleij

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.