From: David Woodhouse <david.woodhouse@intel.com>
To: "akpm@linux-foundation.org" <akpm@linux-foundation.org>
Cc: "davem@davemloft.net" <davem@davemloft.net>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"chas@cmf.nrl.navy.mil" <chas@cmf.nrl.navy.mil>,
"nathan@traverse.com.au" <nathan@traverse.com.au>
Subject: Re: [patch 1/1] drivers/atm/solos-pci.c: fix warning/bug, clean up code
Date: Tue, 17 Nov 2009 22:55:55 +0000 [thread overview]
Message-ID: <1258498555.6132.71.camel@macbook.infradead.org> (raw)
In-Reply-To: <200911172246.nAHMkiK2004221@imap1.linux-foundation.org>
On Tue, 2009-11-17 at 14:46 -0800, akpm@linux-foundation.org wrote:
> From: Andrew Morton <akpm@linux-foundation.org>
>
> drivers/atm/solos-pci.c: In function 'flash_upgrade':
> drivers/atm/solos-pci.c:528: warning: 'fw_name' may be used uninitialized in this function
>
> Cc: Chas Williams <chas@cmf.nrl.navy.mil>
> Cc: Nathan Williams <nathan@traverse.com.au>
> Cc: David S. Miller <davem@davemloft.net>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-By: David Woodhouse <David.Woodhouse@intel.com>
> ---
>
> drivers/atm/solos-pci.c | 29 ++++++++++++++++-------------
> 1 file changed, 16 insertions(+), 13 deletions(-)
>
> diff -puN drivers/atm/solos-pci.c~drivers-atm-solos-pcic-fix-warning-bug-clean-up-code drivers/atm/solos-pci.c
> --- a/drivers/atm/solos-pci.c~drivers-atm-solos-pcic-fix-warning-bug-clean-up-code
> +++ a/drivers/atm/solos-pci.c
> @@ -531,34 +531,37 @@ static int flash_upgrade(struct solos_ca
> int numblocks = 0;
> int offset;
>
> - if (chip == 0) {
> + switch (chip) {
> + case 0:
> fw_name = "solos-FPGA.bin";
> blocksize = FPGA_BLOCK;
> - }
> -
> - if (chip == 1) {
> + break;
> + case 1:
> fw_name = "solos-Firmware.bin";
> blocksize = SOLOS_BLOCK;
> - }
> -
> - if (chip == 2){
> + break;
> + case 2:
> if (card->fpga_version > LEGACY_BUFFERS){
> fw_name = "solos-db-FPGA.bin";
> blocksize = FPGA_BLOCK;
> } else {
> - dev_info(&card->dev->dev, "FPGA version doesn't support daughter board upgrades\n");
> + dev_info(&card->dev->dev, "FPGA version doesn't support"
> + " daughter board upgrades\n");
> return -EPERM;
> }
> - }
> -
> - if (chip == 3){
> + break;
> + case 3:
> if (card->fpga_version > LEGACY_BUFFERS){
> fw_name = "solos-Firmware.bin";
> blocksize = SOLOS_BLOCK;
> } else {
> - dev_info(&card->dev->dev, "FPGA version doesn't support daughter board upgrades\n");
> - return -EPERM;
> + dev_info(&card->dev->dev, "FPGA version doesn't support"
> + " daughter board upgrades\n");
> + return -EPERM;
> }
> + break;
> + default:
> + return -ENODEV;
> }
>
> if (request_firmware(&fw, fw_name, &card->dev->dev))
> _
--
David Woodhouse Open Source Technology Centre
David.Woodhouse@intel.com Intel Corporation
next prev parent reply other threads:[~2009-11-17 22:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-17 22:46 [patch 1/1] drivers/atm/solos-pci.c: fix warning/bug, clean up code akpm
2009-11-17 22:55 ` David Woodhouse [this message]
2009-11-18 13:07 ` David Miller
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=1258498555.6132.71.camel@macbook.infradead.org \
--to=david.woodhouse@intel.com \
--cc=akpm@linux-foundation.org \
--cc=chas@cmf.nrl.navy.mil \
--cc=davem@davemloft.net \
--cc=nathan@traverse.com.au \
--cc=netdev@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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox