* [PATCH] usb: gadget: udc: pxa27x: fix build warning when !OF
@ 2014-11-06 4:55 Felipe Balbi
2014-11-06 6:47 ` Daniel Mack
0 siblings, 1 reply; 6+ messages in thread
From: Felipe Balbi @ 2014-11-06 4:55 UTC (permalink / raw)
To: linux-arm-kernel
in case kernel is built without CONFIG_OF there
will be a build warning (see below) due to of_match_ptr()
being defined to NULL.
Because of_match_ptr() is pretty pointless anyway,
let's just remove it and fix the warning.
drivers/usb/gadget/udc/pxa27x_udc.c:2403:28: warning: ?udc_pxa_dt_ids? defined but not used [-Wunused-variable]
static struct of_device_id udc_pxa_dt_ids[] = {
^
Signed-off-by: Felipe Balbi <balbi@ti.com>
---
drivers/usb/gadget/udc/pxa27x_udc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/gadget/udc/pxa27x_udc.c b/drivers/usb/gadget/udc/pxa27x_udc.c
index 69e7b816..d1d8a9f 100644
--- a/drivers/usb/gadget/udc/pxa27x_udc.c
+++ b/drivers/usb/gadget/udc/pxa27x_udc.c
@@ -2590,7 +2590,7 @@ static struct platform_driver udc_driver = {
.driver = {
.name = "pxa27x-udc",
.owner = THIS_MODULE,
- .of_match_table = of_match_ptr(udc_pxa_dt_ids),
+ .of_match_table = udc_pxa_dt_ids,
},
.probe = pxa_udc_probe,
.remove = pxa_udc_remove,
--
2.1.0.GIT
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] usb: gadget: udc: pxa27x: fix build warning when !OF
2014-11-06 4:55 [PATCH] usb: gadget: udc: pxa27x: fix build warning when !OF Felipe Balbi
@ 2014-11-06 6:47 ` Daniel Mack
2014-11-06 19:55 ` Robert Jarzmik
0 siblings, 1 reply; 6+ messages in thread
From: Daniel Mack @ 2014-11-06 6:47 UTC (permalink / raw)
To: linux-arm-kernel
On 11/06/2014 05:55 AM, Felipe Balbi wrote:
> in case kernel is built without CONFIG_OF there
> will be a build warning (see below) due to of_match_ptr()
> being defined to NULL.
>
> Because of_match_ptr() is pretty pointless anyway,
> let's just remove it and fix the warning.
The alternative, of course, would be to wrap the udc_pxa_dt_ids
declaration in IS_ENABLED(CONFIG_OF), but I'm not sure whether it's
worth it.
Daniel
> drivers/usb/gadget/udc/pxa27x_udc.c:2403:28: warning: ?udc_pxa_dt_ids? defined but not used [-Wunused-variable]
> static struct of_device_id udc_pxa_dt_ids[] = {
> ^
> Signed-off-by: Felipe Balbi <balbi@ti.com>
> ---
> drivers/usb/gadget/udc/pxa27x_udc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/gadget/udc/pxa27x_udc.c b/drivers/usb/gadget/udc/pxa27x_udc.c
> index 69e7b816..d1d8a9f 100644
> --- a/drivers/usb/gadget/udc/pxa27x_udc.c
> +++ b/drivers/usb/gadget/udc/pxa27x_udc.c
> @@ -2590,7 +2590,7 @@ static struct platform_driver udc_driver = {
> .driver = {
> .name = "pxa27x-udc",
> .owner = THIS_MODULE,
> - .of_match_table = of_match_ptr(udc_pxa_dt_ids),
> + .of_match_table = udc_pxa_dt_ids,
> },
> .probe = pxa_udc_probe,
> .remove = pxa_udc_remove,
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] usb: gadget: udc: pxa27x: fix build warning when !OF
2014-11-06 6:47 ` Daniel Mack
@ 2014-11-06 19:55 ` Robert Jarzmik
2014-11-06 22:17 ` Felipe Balbi
0 siblings, 1 reply; 6+ messages in thread
From: Robert Jarzmik @ 2014-11-06 19:55 UTC (permalink / raw)
To: linux-arm-kernel
Daniel Mack <daniel@zonque.org> writes:
> On 11/06/2014 05:55 AM, Felipe Balbi wrote:
>> in case kernel is built without CONFIG_OF there
>> will be a build warning (see below) due to of_match_ptr()
>> being defined to NULL.
>>
>> Because of_match_ptr() is pretty pointless anyway,
>> let's just remove it and fix the warning.
>
> The alternative, of course, would be to wrap the udc_pxa_dt_ids
> declaration in IS_ENABLED(CONFIG_OF), but I'm not sure whether it's
> worth it.
Ah, wasn't the patch named "[PATCH v1] usb: gadget: pxa27x_udc: fix warning in
non device-tree build" sent October the 29th fixing this issue (in [1]) ?
Cheers.
--
Robert
[1] Patch
From: Robert Jarzmik <robert.jarzmik@free.fr>
Subject: [PATCH v1] usb: gadget: pxa27x_udc: fix warning in non device-tree build
To: Felipe Balbi <balbi@ti.com>
Cc: linux-usb at vger.kernel.org, Robert Jarzmik <robert.jarzmik@free.fr>
Date: Wed, 29 Oct 2014 21:58:33 +0100 (1 week, 22 hours, 56 minutes ago)
Message-Id: <1414616313-8212-1-git-send-email-robert.jarzmik@free.fr>
X-Mailer: git-send-email 2.1.0
The recent change bringing device-tree support triggers a warning in a
non device-tree build :
drivers/usb/gadget/udc/pxa27x_udc.c:2405:28: warning: 'udc_pxa_dt_ids'
defined but not used [-Wunused-variable]
Fix the warning with a preprocessor condition.
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
---
drivers/usb/gadget/udc/pxa27x_udc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/usb/gadget/udc/pxa27x_udc.c b/drivers/usb/gadget/udc/pxa27x_udc.c
index 69e7b816..9b03fab 100644
--- a/drivers/usb/gadget/udc/pxa27x_udc.c
+++ b/drivers/usb/gadget/udc/pxa27x_udc.c
@@ -2400,11 +2400,13 @@ static struct pxa_udc memory = {
}
};
+#if defined(CONFIG_OF)
static struct of_device_id udc_pxa_dt_ids[] = {
{ .compatible = "marvell,pxa270-udc" },
{}
};
MODULE_DEVICE_TABLE(of, udc_pxa_dt_ids);
+#endif
/**
* pxa_udc_probe - probes the udc device
--
2.1.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] usb: gadget: udc: pxa27x: fix build warning when !OF
2014-11-06 19:55 ` Robert Jarzmik
@ 2014-11-06 22:17 ` Felipe Balbi
2014-11-06 22:25 ` Felipe Balbi
0 siblings, 1 reply; 6+ messages in thread
From: Felipe Balbi @ 2014-11-06 22:17 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On Thu, Nov 06, 2014 at 08:55:35PM +0100, Robert Jarzmik wrote:
> Daniel Mack <daniel@zonque.org> writes:
>
> > On 11/06/2014 05:55 AM, Felipe Balbi wrote:
> >> in case kernel is built without CONFIG_OF there
> >> will be a build warning (see below) due to of_match_ptr()
> >> being defined to NULL.
> >>
> >> Because of_match_ptr() is pretty pointless anyway,
> >> let's just remove it and fix the warning.
> >
> > The alternative, of course, would be to wrap the udc_pxa_dt_ids
> > declaration in IS_ENABLED(CONFIG_OF), but I'm not sure whether it's
> > worth it.
>
> Ah, wasn't the patch named "[PATCH v1] usb: gadget: pxa27x_udc: fix
> warning in non device-tree build" sent October the 29th fixing this
> issue (in [1]) ?
I seem to have missed that, let me replace the patches and use yours.
--
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20141106/64c867f2/attachment.sig>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] usb: gadget: udc: pxa27x: fix build warning when !OF
2014-11-06 22:17 ` Felipe Balbi
@ 2014-11-06 22:25 ` Felipe Balbi
2014-11-07 7:26 ` Robert Jarzmik
0 siblings, 1 reply; 6+ messages in thread
From: Felipe Balbi @ 2014-11-06 22:25 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Nov 06, 2014 at 04:17:48PM -0600, Felipe Balbi wrote:
> Hi,
>
> On Thu, Nov 06, 2014 at 08:55:35PM +0100, Robert Jarzmik wrote:
> > Daniel Mack <daniel@zonque.org> writes:
> >
> > > On 11/06/2014 05:55 AM, Felipe Balbi wrote:
> > >> in case kernel is built without CONFIG_OF there
> > >> will be a build warning (see below) due to of_match_ptr()
> > >> being defined to NULL.
> > >>
> > >> Because of_match_ptr() is pretty pointless anyway,
> > >> let's just remove it and fix the warning.
> > >
> > > The alternative, of course, would be to wrap the udc_pxa_dt_ids
> > > declaration in IS_ENABLED(CONFIG_OF), but I'm not sure whether it's
> > > worth it.
> >
> > Ah, wasn't the patch named "[PATCH v1] usb: gadget: pxa27x_udc: fix
> > warning in non device-tree build" sent October the 29th fixing this
> > issue (in [1]) ?
>
> I seem to have missed that, let me replace the patches and use yours.
now done.
--
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20141106/3ff76046/attachment.sig>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] usb: gadget: udc: pxa27x: fix build warning when !OF
2014-11-06 22:25 ` Felipe Balbi
@ 2014-11-07 7:26 ` Robert Jarzmik
0 siblings, 0 replies; 6+ messages in thread
From: Robert Jarzmik @ 2014-11-07 7:26 UTC (permalink / raw)
To: linux-arm-kernel
Felipe Balbi <balbi@ti.com> writes:
> On Thu, Nov 06, 2014 at 04:17:48PM -0600, Felipe Balbi wrote:
>> I seem to have missed that, let me replace the patches and use yours.
>
> now done.
Thanks.
--
Robert
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-11-07 7:26 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-06 4:55 [PATCH] usb: gadget: udc: pxa27x: fix build warning when !OF Felipe Balbi
2014-11-06 6:47 ` Daniel Mack
2014-11-06 19:55 ` Robert Jarzmik
2014-11-06 22:17 ` Felipe Balbi
2014-11-06 22:25 ` Felipe Balbi
2014-11-07 7:26 ` Robert Jarzmik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).