From: Chris Packham <Chris.Packham@alliedtelesis.co.nz> To: "broonie@kernel.org" <broonie@kernel.org>, "linus.walleij@linaro.org" <linus.walleij@linaro.org>, "bgolaszewski@baylibre.com" <bgolaszewski@baylibre.com> Cc: "linux-arm-kernel@lists.infradead.org" <linux-arm-kernel@lists.infradead.org>, "bcm-kernel-feedback-list@broadcom.com" <bcm-kernel-feedback-list@broadcom.com>, "linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org> Subject: Re: [PATCH] gpio: xgs-iproc: Fix section mismatch on device tree match table Date: Tue, 5 Nov 2019 20:07:47 +0000 [thread overview] Message-ID: <b8563b7fde5bf3fa7ac255e8d3149dcd6d773f7f.camel@alliedtelesis.co.nz> (raw) In-Reply-To: <20191105124915.34100-1-broonie@kernel.org> Hi Mark, On Tue, 2019-11-05 at 12:49 +0000, Mark Brown wrote: > 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> Thanks for picking this up Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz> Is it worth including 'Fixes: 6a41b6c5fc20 ("gpio: Add xgs-iproc driver")'? > --- > 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" }, > {} > };
WARNING: multiple messages have this Message-ID (diff)
From: Chris Packham <Chris.Packham@alliedtelesis.co.nz> To: "broonie@kernel.org" <broonie@kernel.org>, "linus.walleij@linaro.org" <linus.walleij@linaro.org>, "bgolaszewski@baylibre.com" <bgolaszewski@baylibre.com> Cc: "linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>, "bcm-kernel-feedback-list@broadcom.com" <bcm-kernel-feedback-list@broadcom.com>, "linux-arm-kernel@lists.infradead.org" <linux-arm-kernel@lists.infradead.org> Subject: Re: [PATCH] gpio: xgs-iproc: Fix section mismatch on device tree match table Date: Tue, 5 Nov 2019 20:07:47 +0000 [thread overview] Message-ID: <b8563b7fde5bf3fa7ac255e8d3149dcd6d773f7f.camel@alliedtelesis.co.nz> (raw) In-Reply-To: <20191105124915.34100-1-broonie@kernel.org> Hi Mark, On Tue, 2019-11-05 at 12:49 +0000, Mark Brown wrote: > 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> Thanks for picking this up Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz> Is it worth including 'Fixes: 6a41b6c5fc20 ("gpio: Add xgs-iproc driver")'? > --- > 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" }, > {} > }; _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-11-05 20:07 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 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 [this message] 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
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=b8563b7fde5bf3fa7ac255e8d3149dcd6d773f7f.camel@alliedtelesis.co.nz \ --to=chris.packham@alliedtelesis.co.nz \ --cc=bcm-kernel-feedback-list@broadcom.com \ --cc=bgolaszewski@baylibre.com \ --cc=broonie@kernel.org \ --cc=linus.walleij@linaro.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-gpio@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.