[PATCH v2] USB: musb: suppress warning about unused flags

2010-05-07 Thread Jon Povey

Wrap flags with uninitialized_var() to suppress unhelpful warning.
---

Patch take 2.. Fixes this warning:

  CC  drivers/usb/musb/cppi_dma.o
drivers/usb/musb/cppi_dma.c: In function 'cppi_interrupt':
drivers/usb/musb/cppi_dma.c:1158: warning: 'flags' may be used uninitialized in 
this function

Feedback welcome again.. Also I'm not subscribed to linux-usb, is it 
appropriate to cross-post there without being subscribed?

And is it OK to ramble away in this part of the patch mail?

Thanks..

 drivers/usb/musb/cppi_dma.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/musb/cppi_dma.c b/drivers/usb/musb/cppi_dma.c
index 59dc3d3..e3753ba 100644
--- a/drivers/usb/musb/cppi_dma.c
+++ b/drivers/usb/musb/cppi_dma.c
@@ -1155,7 +1155,7 @@ irqreturn_t cppi_interrupt(int irq, void *dev_id)
struct musb_hw_ep   *hw_ep = NULL;
u32 rx, tx;
int i, index;
-   unsigned long   flags;
+   unsigned long   uninitialized_var(flags);

cppi = container_of(musb-dma_controller, struct cppi, controller);
if (cppi-irq)
--
1.6.3.3


--
Jon Povey
jon.po...@racelogic.co.uk

Racelogic is a limited company registered in England. Registered number 2743719 
.
Registered Office Unit 10, Swan Business Centre, Osier Way, Buckingham, Bucks, 
MK18 1TB .

The information contained in this electronic mail transmission is intended by 
Racelogic Ltd for the use of the named individual or entity to which it is 
directed and may contain information that is confidential or privileged. If you 
have received this electronic mail transmission in error, please delete it from 
your system without copying or forwarding it, and notify the sender of the 
error by reply email so that the sender's address records can be corrected. The 
views expressed by the sender of this communication do not necessarily 
represent those of Racelogic Ltd. Please note that Racelogic reserves the right 
to monitor e-mail communications passing through its network


___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


Re: [PATCH v2] USB: musb: suppress warning about unused flags

2010-05-07 Thread Sergei Shtylyov

Hello.

Jon Povey wrote:


Wrap flags with uninitialized_var() to suppress unhelpful warning.
---

Patch take 2.. Fixes this warning:

  CC  drivers/usb/musb/cppi_dma.o
drivers/usb/musb/cppi_dma.c: In function 'cppi_interrupt':
drivers/usb/musb/cppi_dma.c:1158: warning: 'flags' may be used uninitialized in 
this function
  


  The warning should probably have been cited before the --- tearline.


Feedback welcome again..


  The patch looks OK


 Also I'm not subscribed to linux-usb, is it appropriate to cross-post there 
without being subscribed?
  


  AFAIK, yes.


And is it OK to ramble away in this part of the patch mail?
  


  Yes.


Thanks..

 drivers/usb/musb/cppi_dma.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/musb/cppi_dma.c b/drivers/usb/musb/cppi_dma.c
index 59dc3d3..e3753ba 100644
--- a/drivers/usb/musb/cppi_dma.c
+++ b/drivers/usb/musb/cppi_dma.c
@@ -1155,7 +1155,7 @@ irqreturn_t cppi_interrupt(int irq, void *dev_id)
struct musb_hw_ep   *hw_ep = NULL;
u32 rx, tx;
int i, index;
-   unsigned long   flags;
+   unsigned long   uninitialized_var(flags);

cppi = container_of(musb-dma_controller, struct cppi, controller);
if (cppi-irq)
--
1.6.3.3


--
Jon Povey
jon.po...@racelogic.co.uk

Racelogic is a limited company registered in England. Registered number 2743719 
.
Registered Office Unit 10, Swan Business Centre, Osier Way, Buckingham, Bucks, 
MK18 1TB .

The information contained in this electronic mail transmission is intended by 
Racelogic Ltd for the use of the named individual or entity to which it is 
directed and may contain information that is confidential or privileged. If you 
have received this electronic mail transmission in error, please delete it from 
your system without copying or forwarding it, and notify the sender of the 
error by reply email so that the sender's address records can be corrected. The 
views expressed by the sender of this communication do not necessarily 
represent those of Racelogic Ltd. Please note that Racelogic reserves the right 
to monitor e-mail communications passing through its network
  


  What's not OK is this text. However, you probably don't have control 
over its appearance in your mails?


WBR, Sergei

___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


RE: [PATCH v2] USB: musb: suppress warning about unused flags

2010-05-07 Thread Jon Povey
Sergei Shtylyov wrote:
The warning should probably have been cited before the ---
 tearline.

OK.

[disclaimer]
What's not OK is this text. However, you probably don't have
 control over its appearance in your mails?

Nope :(

Thanks for the feedback. I suppose I'll wait a while for any more comments then 
repost to both lists.

Lots of drama for a one-line patch, but.. Have to learn somehow. :)

--
Jon Povey
jon.po...@racelogic.co.uk

Racelogic is a limited company registered in England. Registered number 2743719 
.
Registered Office Unit 10, Swan Business Centre, Osier Way, Buckingham, Bucks, 
MK18 1TB .

The information contained in this electronic mail transmission is intended by 
Racelogic Ltd for the use of the named individual or entity to which it is 
directed and may contain information that is confidential or privileged. If you 
have received this electronic mail transmission in error, please delete it from 
your system without copying or forwarding it, and notify the sender of the 
error by reply email so that the sender's address records can be corrected. The 
views expressed by the sender of this communication do not necessarily 
represent those of Racelogic Ltd. Please note that Racelogic reserves the right 
to monitor e-mail communications passing through its network


___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


Re: [PATCH v2] USB: musb: suppress warning about unused flags

2010-05-07 Thread Kevin Hilman
Jon Povey jon.po...@racelogic.co.uk writes:

 Wrap flags with uninitialized_var() to suppress unhelpful warning.

missing signoff

 ---

 Patch take 2.. Fixes this warning:

After the '---' , it's common to summarize what changed since the
previous version as well, although for one-liners like this, it's not
entirely necessary.

   CC  drivers/usb/musb/cppi_dma.o
 drivers/usb/musb/cppi_dma.c: In function 'cppi_interrupt':
 drivers/usb/musb/cppi_dma.c:1158: warning: 'flags' may be used uninitialized 
 in this function

 Feedback welcome again.. Also I'm not subscribed to linux-usb, is it 
 appropriate to cross-post there without being subscribed?

 And is it OK to ramble away in this part of the patch mail?

Yes, this is the ramble-away zone of the patch. :)

Here's a simple 5-step working model for submitting patches in the
future using git each step of the way:

1) create/checkout a branch in your local git, based at davinci git master

  $ git checkout -b my_fix master

2) make your changes and commit your fix to your branch

  $ git add files/that/changed.c
  $ git commit --signoff

  Here, in the commit log, create a descriptive changelog of what is
  being done.  Typically a summary of what is changing, but should
  also answer the question why?

  The '--signoff' option will add a Signed-off-by line with 
  your name/email.  To tune the values it uses for name and
  email, create a ~/.gitconfig file (see mine below[1])

3) export/format your changes for sending to the mailing list

  $ git format-patch -o tmp master..my_fix

4) visually inspect the patches created in the 'tmp' dir 
   and add some additional comments as needed after the '---' line.

5) send the patches

  $ git-send-email --dry-run --to 
davinci-linux-open-source@linux.davincidsp.com tmp

  Using '--dry-run' won't actually send the mails, but will give a
  test run so you see what it would do.  When you're ready to send them,
  just remove the --dry-run.
 
For more details on all of the git commands, start with the Git User's
Manual:

   http://www.kernel.org/pub/software/scm/git/docs/user-manual.html

And, thanks for contributing!

Kevin


[1] name/email excerpt from ~/.gitconfig

[user]
name = Kevin Hilman
email = khil...@deeprootsystems.com


  




 Thanks..

  drivers/usb/musb/cppi_dma.c |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

 diff --git a/drivers/usb/musb/cppi_dma.c b/drivers/usb/musb/cppi_dma.c
 index 59dc3d3..e3753ba 100644
 --- a/drivers/usb/musb/cppi_dma.c
 +++ b/drivers/usb/musb/cppi_dma.c
 @@ -1155,7 +1155,7 @@ irqreturn_t cppi_interrupt(int irq, void *dev_id)
 struct musb_hw_ep   *hw_ep = NULL;
 u32 rx, tx;
 int i, index;
 -   unsigned long   flags;
 +   unsigned long   uninitialized_var(flags);

 cppi = container_of(musb-dma_controller, struct cppi, controller);
 if (cppi-irq)
 --
 1.6.3.3


 --
 Jon Povey
 jon.po...@racelogic.co.uk

 Racelogic is a limited company registered in England. Registered number 
 2743719 .
 Registered Office Unit 10, Swan Business Centre, Osier Way, Buckingham, 
 Bucks, MK18 1TB .

 The information contained in this electronic mail transmission is intended by 
 Racelogic Ltd for the use of the named individual or entity to which it is 
 directed and may contain information that is confidential or privileged. If 
 you have received this electronic mail transmission in error, please delete 
 it from your system without copying or forwarding it, and notify the sender 
 of the error by reply email so that the sender's address records can be 
 corrected. The views expressed by the sender of this communication do not 
 necessarily represent those of Racelogic Ltd. Please note that Racelogic 
 reserves the right to monitor e-mail communications passing through its 
 network


 ___
 Davinci-linux-open-source mailing list
 Davinci-linux-open-source@linux.davincidsp.com
 http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source