All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Gupta, Ajay Kumar" <ajay.gupta-l0cyMroinI0@public.gmane.org>
To: Sergei Shtylyov <sshtylyov-Igf4POYTYCDQT0dZR+AlfA@public.gmane.org>
Cc: "linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"felipe.balbi-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org"
	<felipe.balbi-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>,
	"gregkh-l3A5Bk7waGM@public.gmane.org"
	<gregkh-l3A5Bk7waGM@public.gmane.org>
Subject: RE: [PATCH 3/8] musb: fix compilation warning in host only mode
Date: Thu, 17 Jun 2010 19:39:24 +0530	[thread overview]
Message-ID: <19F8576C6E063C45BE387C64729E7394044E91B88E@dbde02.ent.ti.com> (raw)
In-Reply-To: <4C1A2220.7070502-Igf4POYTYCDQT0dZR+AlfA@public.gmane.org>

> >>     AFAIR, it was intentionally removed from the function top and
> declared
> >> in the multiple plcase instead by the former Felipe's patch [1] to fix
> >> exactly the same issue, if I don't mistake. So, it hasn't worked out?
> 
> > Yes, it was removed by Felipe's below patch but it introduced
> > compilation warning issue as reported.
> 
> > ---------------
> > commit aa4714560b4ea359bb7830188ebd06bce71bcdea
> > usb: musb: core: declare mbase only where it's used
> 
> > ... and avoid a compilation if we disable host side
> > of musb.
> > --------------
> 
> >>> Signed-off-by: Ajay Kumar Gupta <ajay.gupta-l0cyMroinI0@public.gmane.org>
> >> [...]
> >>> diff --git a/drivers/usb/musb/musb_core.c
> b/drivers/usb/musb/musb_core.c
> >>> index f0ff893..7cc8398 100644
> >>> --- a/drivers/usb/musb/musb_core.c
> >>> +++ b/drivers/usb/musb/musb_core.c
> >>> @@ -455,6 +455,9 @@ static irqreturn_t musb_stage0_irq(struct musb
> *musb, u8 int_usb,
> >>>  				u8 devctl, u8 power)
> >>>  {
> >>>  	irqreturn_t handled = IRQ_NONE;
> >>> +#ifdef CONFIG_USB_MUSB_HDRC_HCD
> >>> +	void __iomem	*mbase = musb->mregs;
> >>> +#endif
> 
> >>     I'd rather see it declared multiple times...
> 
> > I was thinking it's better to have it at one place and avoid multiple
> > #ifdefs.
> 
>     You'd only need one #ifdef: in the placae where the warning was
> reported. And you can open a block under #ifdef CONFIG_USB_MUSB_OTG to
> declare it in. Other declarations are already covered by #ifdef's,
> aren't they?

Here is the version-2 of this patch.

--------------- cut here -------------------
Fixes below compilation warning when host only configuration is
selected.
drivers/usb/musb/musb_core.c: In function 'musb_stage0_irq':
drivers/usb/musb/musb_core.c:711: warning: unused variable 'mbase'

Signed-off-by: Ajay Kumar Gupta <ajay.gupta-l0cyMroinI0@public.gmane.org>
---
 drivers/usb/musb/musb_core.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index a8b0440..cfae447 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -704,7 +704,9 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb,
 #ifdef CONFIG_USB_MUSB_HDRC_HCD
 	if (int_usb & MUSB_INTR_CONNECT) {
 		struct usb_hcd *hcd = musb_to_hcd(musb);
+#ifdef CONFIG_USB_MUSB_OTG
 		void __iomem *mbase = musb->mregs;
+#endif
 
 		handled = IRQ_HANDLED;
 		musb->is_active = 1;
-- 
1.6.2.4
--------------------------------------------


Thanks,
Ajay
> 
> > -Ajay
> >>> @@ -703,7 +700,6 @@ static irqreturn_t musb_stage0_irq(struct musb
> >> *musb, u8 int_usb,
> >>>  	if (int_usb & MUSB_INTR_CONNECT) {
> >>>  		struct usb_hcd *hcd = musb_to_hcd(musb);
> >>> -		void __iomem *mbase = musb->mregs;
> 
> >>     We could also move this into the #ifdef CONFIG_USB_MUSB_OTG block.
> 
>     Yeah, the block where 'mbase' is actually used.
> 
>     BTW, your patch didn't cover the declaration in #if 0'ed out SOF
> handler.
> 
> WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2010-06-17 14:09 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-17 10:40 [patch-2.6.35-rc3+ 0/8] musb patches Ajay Kumar Gupta
2010-06-17 10:40 ` [PATCH 1/8] musb_core: make disconnect and suspend interrupts work again Ajay Kumar Gupta
     [not found]   ` <1276771242-5201-2-git-send-email-ajay.gupta-l0cyMroinI0@public.gmane.org>
2010-06-17 10:40     ` [PATCH 2/8] MUSB: make non-OMAP platforms build with CONFIG_PM=y Ajay Kumar Gupta
2010-06-17 10:40       ` [PATCH 3/8] musb: fix compilation warning in host only mode Ajay Kumar Gupta
     [not found]         ` <1276771242-5201-4-git-send-email-ajay.gupta-l0cyMroinI0@public.gmane.org>
2010-06-17 10:40           ` [PATCH 4/8] USB: musb: suppress warning about unused flags Ajay Kumar Gupta
     [not found]             ` <1276771242-5201-5-git-send-email-ajay.gupta-l0cyMroinI0@public.gmane.org>
2010-06-17 10:40               ` [PATCH 5/8] usb: musb: fix Blackfin ulpi stubs Ajay Kumar Gupta
2010-06-17 10:40                 ` [PATCH 6/8] usb: musb: Enable the maximum supported burst mode for DMA Ajay Kumar Gupta
     [not found]                   ` <1276771242-5201-7-git-send-email-ajay.gupta-l0cyMroinI0@public.gmane.org>
2010-06-17 10:40                     ` [PATCH 7/8] musb: Kill board specific pinmux from driver file Ajay Kumar Gupta
2010-06-17 10:40                       ` [PATCH 8/8] usb: musb: Fix suspend interrupt issue in device mode Ajay Kumar Gupta
     [not found]                         ` <1276771242-5201-9-git-send-email-ajay.gupta-l0cyMroinI0@public.gmane.org>
2010-06-17 10:40                           ` Ajay Kumar Gupta
2010-06-17 11:27                           ` Sergei Shtylyov
     [not found]                             ` <4C1A0687.4080002-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
2010-06-17 12:15                               ` Maulik
2010-06-17 13:33                                 ` Sergei Shtylyov
     [not found]                                 ` <006501cb0e16$c08bae00$808918ac-wD+IZp/g4/2mHdYHvhjUOg@public.gmane.org>
2010-06-17 14:18                                   ` Greg KH
2010-06-18  5:21                         ` David Brownell
     [not found]                       ` <1276771242-5201-8-git-send-email-ajay.gupta-l0cyMroinI0@public.gmane.org>
2010-06-24  6:11                         ` [PATCH 7/8] musb: Kill board specific pinmux from driver file Felipe Balbi
2010-06-24  6:16                           ` Gadiyar, Anand
2010-06-24  6:11                     ` [PATCH 6/8] usb: musb: Enable the maximum supported burst mode for DMA Felipe Balbi
2010-06-24  6:10                 ` [PATCH 5/8] usb: musb: fix Blackfin ulpi stubs Felipe Balbi
2010-06-24  6:08             ` [PATCH 4/8] USB: musb: suppress warning about unused flags Felipe Balbi
     [not found]               ` <20100624060857.GG8078-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
2010-06-24  9:50                 ` Sergei Shtylyov
     [not found]                   ` <4C232A4C.6040102-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
2010-06-28 14:24                     ` Felipe Balbi
2010-06-28 17:27                       ` Sergei Shtylyov
2010-06-17 11:18           ` [PATCH 3/8] musb: fix compilation warning in host only mode Sergei Shtylyov
2010-06-17 12:09             ` Gupta, Ajay Kumar
     [not found]               ` <19F8576C6E063C45BE387C64729E7394044E91B843-/tLxBxkBPtCIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
2010-06-17 13:24                 ` Sergei Shtylyov
     [not found]                   ` <4C1A2220.7070502-Igf4POYTYCDQT0dZR+AlfA@public.gmane.org>
2010-06-17 14:09                     ` Gupta, Ajay Kumar [this message]
2010-06-24  6:03           ` Felipe Balbi
2010-06-24 11:17             ` Gupta, Ajay Kumar
2010-06-24 13:10               ` Sergei Shtylyov
     [not found]                 ` <4C235929.9030605-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
2010-06-24 14:36                   ` Gupta, Ajay Kumar
2010-07-06  9:12                 ` Felipe Balbi
2010-07-06  9:13               ` Felipe Balbi
2010-07-07 22:01                 ` Greg KH
2010-07-08  1:53                   ` Gupta, Ajay Kumar
     [not found]                     ` <19F8576C6E063C45BE387C64729E7394044EB95AE0-/tLxBxkBPtCIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
2010-07-08  3:35                       ` Greg KH
2010-06-24  6:02       ` [PATCH 2/8] MUSB: make non-OMAP platforms build with CONFIG_PM=y Felipe Balbi
2010-06-24  6:01     ` [PATCH 1/8] musb_core: make disconnect and suspend interrupts work again Felipe Balbi
     [not found]       ` <20100624060151.GD8078-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
2010-06-24 17:01         ` Greg KH
     [not found] ` <1276771242-5201-1-git-send-email-ajay.gupta-l0cyMroinI0@public.gmane.org>
2010-06-17 14:17   ` [patch-2.6.35-rc3+ 0/8] musb patches Greg KH
2010-06-17 14:26     ` Gupta, Ajay Kumar

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=19F8576C6E063C45BE387C64729E7394044E91B88E@dbde02.ent.ti.com \
    --to=ajay.gupta-l0cymroini0@public.gmane.org \
    --cc=felipe.balbi-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org \
    --cc=gregkh-l3A5Bk7waGM@public.gmane.org \
    --cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=sshtylyov-Igf4POYTYCDQT0dZR+AlfA@public.gmane.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: link
Be 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.