linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usb: musb: tweak musb_read_fifo() to avoid unused warnings
@ 2009-02-06 10:22 Bryan Wu
  2009-02-06 19:15 ` Felipe Balbi
  2009-02-07  0:01 ` Greg KH
  0 siblings, 2 replies; 10+ messages in thread
From: Bryan Wu @ 2009-02-06 10:22 UTC (permalink / raw)
  To: felipe.balbi; +Cc: linux-usb, linux-kernel, Mike Frysinger, Bryan Wu

From: Mike Frysinger <vapier.adi@gmail.com>

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
---
 drivers/usb/musb/blackfin.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/musb/blackfin.c b/drivers/usb/musb/blackfin.c
index 7861348..0ebb19d 100644
--- a/drivers/usb/musb/blackfin.c
+++ b/drivers/usb/musb/blackfin.c
@@ -54,13 +54,11 @@ void musb_write_fifo(struct musb_hw_ep *hw_ep, u16 len, const u8 *src)
 void musb_read_fifo(struct musb_hw_ep *hw_ep, u16 len, u8 *dst)
 {
 	void __iomem *fifo = hw_ep->fifo;
+
+#ifdef CONFIG_BF52x
 	u8 epnum = hw_ep->epnum;
 	u16 dma_reg = 0;
 
-	DBG(4, "%cX ep%d fifo %p count %d buf %p\n",
-			'R', hw_ep->epnum, fifo, len, dst);
-
-#ifdef CONFIG_BF52x
 	invalidate_dcache_range((unsigned int)dst,
 		(unsigned int)(dst + len));
 
@@ -103,6 +101,9 @@ void musb_read_fifo(struct musb_hw_ep *hw_ep, u16 len, u8 *dst)
 			len & 0x01 ? (len >> 1) + 1 : len >> 1);
 #endif
 
+	DBG(4, "%cX ep%d fifo %p count %d buf %p\n",
+			'R', hw_ep->epnum, fifo, len, dst);
+
 	dump_fifo_data(dst, len);
 }
 
-- 
1.5.6.3

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

* Re: [PATCH] usb: musb: tweak musb_read_fifo() to avoid unused warnings
  2009-02-06 10:22 [PATCH] usb: musb: tweak musb_read_fifo() to avoid unused warnings Bryan Wu
@ 2009-02-06 19:15 ` Felipe Balbi
  2009-02-06 19:24   ` Mike Frysinger
  2009-02-07  0:01 ` Greg KH
  1 sibling, 1 reply; 10+ messages in thread
From: Felipe Balbi @ 2009-02-06 19:15 UTC (permalink / raw)
  To: Bryan Wu; +Cc: felipe.balbi, linux-usb, linux-kernel, Mike Frysinger

On Fri, Feb 06, 2009 at 06:22:16PM +0800, Bryan Wu wrote:
> From: Mike Frysinger <vapier.adi@gmail.com>

I'd like to get a patch body here.

> Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
> Signed-off-by: Bryan Wu <cooloney@kernel.org>
> ---
>  drivers/usb/musb/blackfin.c |    9 +++++----
>  1 files changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/usb/musb/blackfin.c b/drivers/usb/musb/blackfin.c
> index 7861348..0ebb19d 100644
> --- a/drivers/usb/musb/blackfin.c
> +++ b/drivers/usb/musb/blackfin.c
> @@ -54,13 +54,11 @@ void musb_write_fifo(struct musb_hw_ep *hw_ep, u16 len, const u8 *src)
>  void musb_read_fifo(struct musb_hw_ep *hw_ep, u16 len, u8 *dst)
>  {
>  	void __iomem *fifo = hw_ep->fifo;
> +
> +#ifdef CONFIG_BF52x
>  	u8 epnum = hw_ep->epnum;
>  	u16 dma_reg = 0;

Is this patch avoiding a warning about these variables being unused ?

Would be nice to get this info to the patch body ;-)

otherwise, looks fine.

-- 
balbi

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

* Re: [PATCH] usb: musb: tweak musb_read_fifo() to avoid unused  warnings
  2009-02-06 19:15 ` Felipe Balbi
@ 2009-02-06 19:24   ` Mike Frysinger
  2009-02-06 19:26     ` Felipe Balbi
  2009-02-12  6:01     ` David Brownell
  0 siblings, 2 replies; 10+ messages in thread
From: Mike Frysinger @ 2009-02-06 19:24 UTC (permalink / raw)
  To: me; +Cc: Bryan Wu, felipe.balbi, linux-usb, linux-kernel

On Fri, Feb 6, 2009 at 14:15, Felipe Balbi wrote:
> On Fri, Feb 06, 2009 at 06:22:16PM +0800, Bryan Wu wrote:
>> From: Mike Frysinger <vapier.adi@gmail.com>
>
> I'd like to get a patch body here.
>
>> Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
>> Signed-off-by: Bryan Wu <cooloney@kernel.org>
>> ---
>>  drivers/usb/musb/blackfin.c |    9 +++++----
>>  1 files changed, 5 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/usb/musb/blackfin.c b/drivers/usb/musb/blackfin.c
>> index 7861348..0ebb19d 100644
>> --- a/drivers/usb/musb/blackfin.c
>> +++ b/drivers/usb/musb/blackfin.c
>> @@ -54,13 +54,11 @@ void musb_write_fifo(struct musb_hw_ep *hw_ep, u16 len, const u8 *src)
>>  void musb_read_fifo(struct musb_hw_ep *hw_ep, u16 len, u8 *dst)
>>  {
>>       void __iomem *fifo = hw_ep->fifo;
>> +
>> +#ifdef CONFIG_BF52x
>>       u8 epnum = hw_ep->epnum;
>>       u16 dma_reg = 0;
>
> Is this patch avoiding a warning about these variables being unused ?
>
> Would be nice to get this info to the patch body ;-)

the subject already says that
-mike

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

* Re: [PATCH] usb: musb: tweak musb_read_fifo() to avoid unused warnings
  2009-02-06 19:24   ` Mike Frysinger
@ 2009-02-06 19:26     ` Felipe Balbi
  2009-02-06 19:28       ` Mike Frysinger
  2009-02-12  6:01     ` David Brownell
  1 sibling, 1 reply; 10+ messages in thread
From: Felipe Balbi @ 2009-02-06 19:26 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: me, Bryan Wu, felipe.balbi, linux-usb, linux-kernel

On Fri, Feb 06, 2009 at 02:24:27PM -0500, Mike Frysinger wrote:
> On Fri, Feb 6, 2009 at 14:15, Felipe Balbi wrote:
> > On Fri, Feb 06, 2009 at 06:22:16PM +0800, Bryan Wu wrote:
> >> From: Mike Frysinger <vapier.adi@gmail.com>
> >
> > I'd like to get a patch body here.
> >
> >> Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
> >> Signed-off-by: Bryan Wu <cooloney@kernel.org>
> >> ---
> >>  drivers/usb/musb/blackfin.c |    9 +++++----
> >>  1 files changed, 5 insertions(+), 4 deletions(-)
> >>
> >> diff --git a/drivers/usb/musb/blackfin.c b/drivers/usb/musb/blackfin.c
> >> index 7861348..0ebb19d 100644
> >> --- a/drivers/usb/musb/blackfin.c
> >> +++ b/drivers/usb/musb/blackfin.c
> >> @@ -54,13 +54,11 @@ void musb_write_fifo(struct musb_hw_ep *hw_ep, u16 len, const u8 *src)
> >>  void musb_read_fifo(struct musb_hw_ep *hw_ep, u16 len, u8 *dst)
> >>  {
> >>       void __iomem *fifo = hw_ep->fifo;
> >> +
> >> +#ifdef CONFIG_BF52x
> >>       u8 epnum = hw_ep->epnum;
> >>       u16 dma_reg = 0;
> >
> > Is this patch avoiding a warning about these variables being unused ?
> >
> > Would be nice to get this info to the patch body ;-)
> 
> the subject already says that

the subject says:

"tweak musb_read_fifo() to avoid unused warnings"

it doesn't specify where are the warnings.

-- 
balbi

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

* Re: [PATCH] usb: musb: tweak musb_read_fifo() to avoid unused  warnings
  2009-02-06 19:26     ` Felipe Balbi
@ 2009-02-06 19:28       ` Mike Frysinger
  2009-02-06 19:30         ` Felipe Balbi
  0 siblings, 1 reply; 10+ messages in thread
From: Mike Frysinger @ 2009-02-06 19:28 UTC (permalink / raw)
  To: me; +Cc: Bryan Wu, felipe.balbi, linux-usb, linux-kernel

On Fri, Feb 6, 2009 at 14:26, Felipe Balbi wrote:
> On Fri, Feb 06, 2009 at 02:24:27PM -0500, Mike Frysinger wrote:
>> On Fri, Feb 6, 2009 at 14:15, Felipe Balbi wrote:
>> > On Fri, Feb 06, 2009 at 06:22:16PM +0800, Bryan Wu wrote:
>> >> From: Mike Frysinger <vapier.adi@gmail.com>
>> >
>> > I'd like to get a patch body here.
>> >
>> >> Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
>> >> Signed-off-by: Bryan Wu <cooloney@kernel.org>
>> >> ---
>> >>  drivers/usb/musb/blackfin.c |    9 +++++----
>> >>  1 files changed, 5 insertions(+), 4 deletions(-)
>> >>
>> >> diff --git a/drivers/usb/musb/blackfin.c b/drivers/usb/musb/blackfin.c
>> >> index 7861348..0ebb19d 100644
>> >> --- a/drivers/usb/musb/blackfin.c
>> >> +++ b/drivers/usb/musb/blackfin.c
>> >> @@ -54,13 +54,11 @@ void musb_write_fifo(struct musb_hw_ep *hw_ep, u16 len, const u8 *src)
>> >>  void musb_read_fifo(struct musb_hw_ep *hw_ep, u16 len, u8 *dst)
>> >>  {
>> >>       void __iomem *fifo = hw_ep->fifo;
>> >> +
>> >> +#ifdef CONFIG_BF52x
>> >>       u8 epnum = hw_ep->epnum;
>> >>       u16 dma_reg = 0;
>> >
>> > Is this patch avoiding a warning about these variables being unused ?
>> >
>> > Would be nice to get this info to the patch body ;-)
>>
>> the subject already says that
>
> the subject says:
>
> "tweak musb_read_fifo() to avoid unused warnings"
>
> it doesn't specify where are the warnings.

i dont think it really adds anything to explicitly mention every
variable that triggers an unused warning.  but if we look at the code
that changed, it's easy to see that it's epnum and dma_reg.
-mike

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

* Re: [PATCH] usb: musb: tweak musb_read_fifo() to avoid unused warnings
  2009-02-06 19:28       ` Mike Frysinger
@ 2009-02-06 19:30         ` Felipe Balbi
  0 siblings, 0 replies; 10+ messages in thread
From: Felipe Balbi @ 2009-02-06 19:30 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: me, Bryan Wu, felipe.balbi, linux-usb, linux-kernel

On Fri, Feb 06, 2009 at 02:28:46PM -0500, Mike Frysinger wrote:
> >> the subject already says that
> >
> > the subject says:
> >
> > "tweak musb_read_fifo() to avoid unused warnings"
> >
> > it doesn't specify where are the warnings.
> 
> i dont think it really adds anything to explicitly mention every
> variable that triggers an unused warning.  but if we look at the code
> that changed, it's easy to see that it's epnum and dma_reg.

Still I like to see patch bodies otherwise git log will look awkward.

-- 
balbi

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

* Re: [PATCH] usb: musb: tweak musb_read_fifo() to avoid unused warnings
  2009-02-06 10:22 [PATCH] usb: musb: tweak musb_read_fifo() to avoid unused warnings Bryan Wu
  2009-02-06 19:15 ` Felipe Balbi
@ 2009-02-07  0:01 ` Greg KH
  2009-02-07  4:29   ` Mike Frysinger
  1 sibling, 1 reply; 10+ messages in thread
From: Greg KH @ 2009-02-07  0:01 UTC (permalink / raw)
  To: Bryan Wu; +Cc: felipe.balbi, linux-usb, linux-kernel, Mike Frysinger

On Fri, Feb 06, 2009 at 06:22:16PM +0800, Bryan Wu wrote:
> From: Mike Frysinger <vapier.adi@gmail.com>
> 
> Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
> Signed-off-by: Bryan Wu <cooloney@kernel.org>
> ---
>  drivers/usb/musb/blackfin.c |    9 +++++----
>  1 files changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/usb/musb/blackfin.c b/drivers/usb/musb/blackfin.c
> index 7861348..0ebb19d 100644
> --- a/drivers/usb/musb/blackfin.c
> +++ b/drivers/usb/musb/blackfin.c
> @@ -54,13 +54,11 @@ void musb_write_fifo(struct musb_hw_ep *hw_ep, u16 len, const u8 *src)
>  void musb_read_fifo(struct musb_hw_ep *hw_ep, u16 len, u8 *dst)
>  {
>  	void __iomem *fifo = hw_ep->fifo;
> +
> +#ifdef CONFIG_BF52x

Any way we can just not have ifdefs in .c files alltogether?

thanks,

greg k-h

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

* Re: [PATCH] usb: musb: tweak musb_read_fifo() to avoid unused  warnings
  2009-02-07  0:01 ` Greg KH
@ 2009-02-07  4:29   ` Mike Frysinger
  2009-02-07  5:34     ` Greg KH
  0 siblings, 1 reply; 10+ messages in thread
From: Mike Frysinger @ 2009-02-07  4:29 UTC (permalink / raw)
  To: Greg KH; +Cc: Bryan Wu, felipe.balbi, linux-usb, linux-kernel

On Fri, Feb 6, 2009 at 19:01, Greg KH wrote:
> On Fri, Feb 06, 2009 at 06:22:16PM +0800, Bryan Wu wrote:
>> From: Mike Frysinger <vapier.adi@gmail.com>
>>
>> Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
>> Signed-off-by: Bryan Wu <cooloney@kernel.org>
>> ---
>>  drivers/usb/musb/blackfin.c |    9 +++++----
>>  1 files changed, 5 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/usb/musb/blackfin.c b/drivers/usb/musb/blackfin.c
>> index 7861348..0ebb19d 100644
>> --- a/drivers/usb/musb/blackfin.c
>> +++ b/drivers/usb/musb/blackfin.c
>> @@ -54,13 +54,11 @@ void musb_write_fifo(struct musb_hw_ep *hw_ep, u16 len, const u8 *src)
>>  void musb_read_fifo(struct musb_hw_ep *hw_ep, u16 len, u8 *dst)
>>  {
>>       void __iomem *fifo = hw_ep->fifo;
>> +
>> +#ifdef CONFIG_BF52x
>
> Any way we can just not have ifdefs in .c files alltogether?

the sub arch.c files for musb are pretty much header files.  the
alternative (splitting up the funcs into their own header files) would
be much more bothersome for us to maintain atm i think since there's
so very little different.
-mike

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

* Re: [PATCH] usb: musb: tweak musb_read_fifo() to avoid unused warnings
  2009-02-07  4:29   ` Mike Frysinger
@ 2009-02-07  5:34     ` Greg KH
  0 siblings, 0 replies; 10+ messages in thread
From: Greg KH @ 2009-02-07  5:34 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: Bryan Wu, felipe.balbi, linux-usb, linux-kernel

On Fri, Feb 06, 2009 at 11:29:54PM -0500, Mike Frysinger wrote:
> On Fri, Feb 6, 2009 at 19:01, Greg KH wrote:
> > On Fri, Feb 06, 2009 at 06:22:16PM +0800, Bryan Wu wrote:
> >> From: Mike Frysinger <vapier.adi@gmail.com>
> >>
> >> Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
> >> Signed-off-by: Bryan Wu <cooloney@kernel.org>
> >> ---
> >>  drivers/usb/musb/blackfin.c |    9 +++++----
> >>  1 files changed, 5 insertions(+), 4 deletions(-)
> >>
> >> diff --git a/drivers/usb/musb/blackfin.c b/drivers/usb/musb/blackfin.c
> >> index 7861348..0ebb19d 100644
> >> --- a/drivers/usb/musb/blackfin.c
> >> +++ b/drivers/usb/musb/blackfin.c
> >> @@ -54,13 +54,11 @@ void musb_write_fifo(struct musb_hw_ep *hw_ep, u16 len, const u8 *src)
> >>  void musb_read_fifo(struct musb_hw_ep *hw_ep, u16 len, u8 *dst)
> >>  {
> >>       void __iomem *fifo = hw_ep->fifo;
> >> +
> >> +#ifdef CONFIG_BF52x
> >
> > Any way we can just not have ifdefs in .c files alltogether?
> 
> the sub arch.c files for musb are pretty much header files.  the
> alternative (splitting up the funcs into their own header files) would
> be much more bothersome for us to maintain atm i think since there's
> so very little different.

Ick.  Oh well, any cleanup that people can think of would be good in
this area...

thanks,

greg k-h

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

* Re: [PATCH] usb: musb: tweak musb_read_fifo() to avoid unused  warnings
  2009-02-06 19:24   ` Mike Frysinger
  2009-02-06 19:26     ` Felipe Balbi
@ 2009-02-12  6:01     ` David Brownell
  1 sibling, 0 replies; 10+ messages in thread
From: David Brownell @ 2009-02-12  6:01 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: me, Bryan Wu, felipe.balbi, linux-usb, linux-kernel

On Friday 06 February 2009, Mike Frysinger wrote:
> > Is this patch avoiding a warning about these variables being unused ?
> >
> > Would be nice to get this info to the patch body ;-)
> 
> the subject already says that

Not enough.

Mike, why is it that patches from ADI generally don't include
patch descriptions?   It's not like folk haven't asked for them...

In the case of "avoid a warning" patches, the convention is to
have the patch summary include the warnings being avoided.
(Or at least a few, if they're too numerous.)




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

end of thread, other threads:[~2009-02-12  6:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-06 10:22 [PATCH] usb: musb: tweak musb_read_fifo() to avoid unused warnings Bryan Wu
2009-02-06 19:15 ` Felipe Balbi
2009-02-06 19:24   ` Mike Frysinger
2009-02-06 19:26     ` Felipe Balbi
2009-02-06 19:28       ` Mike Frysinger
2009-02-06 19:30         ` Felipe Balbi
2009-02-12  6:01     ` David Brownell
2009-02-07  0:01 ` Greg KH
2009-02-07  4:29   ` Mike Frysinger
2009-02-07  5:34     ` Greg KH

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).