From: Bryan Whitehead <driver@jpl.nasa.gov>
To: Matthew Dharm <mdharm-kernel@one-eyed-alien.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2.6.2-rc1-mm3] drivers/usb/storage/dpcm.c
Date: Sun, 25 Jan 2004 01:00:09 -0800 [thread overview]
Message-ID: <40138599.1030406@jpl.nasa.gov> (raw)
In-Reply-To: <20040125084141.GA14215@one-eyed-alien.net>
Matthew Dharm wrote:
> One message a day to report a particular bug is really enough.... :)
>
> That said, I think it would be better to add the ifdef's instead of more
> substantial code changes.
No problemo, I was just getting my feet wet on small compiler warning
fixes and the SubmitingPatches doc said ifdefs were from the devil. ;)
I'll sent a patch later sunday...
>
> Matt
>
> On Sat, Jan 24, 2004 at 09:03:42PM -0800, Bryan Whitehead wrote:
>
>>In function dpcm_transport the compiler complains about ret not being used:
>>drivers/usb/storage/dpcm.c: In function `dpcm_transport':
>>drivers/usb/storage/dpcm.c:46: warning: unused variable `ret'
>>
>>ret is not used if CONFIG_USB_STORAGE_SDDR09 is not set. Instead of adding
>>more ifdef's to the code this patch puts ret to use for the other 2 cases in
>>the switch statement (case 0 and default).
>>
>>--- drivers/usb/storage/dpcm.c.orig 2004-01-24 20:51:40.631038904 -0800
>>+++ drivers/usb/storage/dpcm.c 2004-01-24 20:50:05.155553384 -0800
>>@@ -56,7 +56,8 @@ int dpcm_transport(Scsi_Cmnd *srb, struc
>> /*
>> * LUN 0 corresponds to the CompactFlash card reader.
>> */
>>- return usb_stor_CB_transport(srb, us);
>>+ ret = usb_stor_CB_transport(srb, us);
>>+ break;
>>
>> #ifdef CONFIG_USB_STORAGE_SDDR09
>> case 1:
>>@@ -72,11 +73,12 @@ int dpcm_transport(Scsi_Cmnd *srb, struc
>> ret = sddr09_transport(srb, us);
>> srb->device->lun = 1; us->srb->device->lun = 1;
>>
>>- return ret;
>>+ break;
>> #endif
>>
>> default:
>> US_DEBUGP("dpcm_transport: Invalid LUN %d\n", srb->device->lun);
>>- return USB_STOR_TRANSPORT_ERROR;
>>+ ret = USB_STOR_TRANSPORT_ERROR;
>> }
>>+ return ret;
>> }
>>
>>--
>>Bryan Whitehead
>>driver@megahappy.net
>>
>
>
--
Bryan Whitehead
Email:driver@megahappy.net
WorkE:driver@jpl.nasa.gov
next prev parent reply other threads:[~2004-01-25 9:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-25 5:03 [PATCH 2.6.2-rc1-mm3] drivers/usb/storage/dpcm.c Bryan Whitehead
2004-01-25 8:41 ` Matthew Dharm
2004-01-25 9:00 ` Bryan Whitehead [this message]
2004-01-26 18:12 ` Randy.Dunlap
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=40138599.1030406@jpl.nasa.gov \
--to=driver@jpl.nasa.gov \
--cc=linux-kernel@vger.kernel.org \
--cc=mdharm-kernel@one-eyed-alien.net \
/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