[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2.6.2-rc1-mm3] drivers/usb/storage/dpcm.c


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.

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 _at_ megahappy.net
> 

-- 
Matthew Dharm                              Home: mdharm-usb _at_ one-eyed-alien.net 
Maintainer, Linux USB Mass Storage Driver

E:  You run this ship with Windows?!  YOU IDIOT!
L:  Give me a break, it came bundled with the computer!
					-- ESR and Lan Solaris
User Friendly, 12/8/1998

Attachment: pgp355223.pgp
Description: PGP signature


この情報があなたの探していたものかどうか選択してください。
yes/まさにこれだ!   no/違うなぁ   part/一部見つかった   try/これで試してみる

あなたが探していた情報はどのようなことか、ご自由に記入下さい。特に「まさにこれだ!」と言う場合は記入をお願いします。
例:「複数のマシンからCATV経由でipmasqueradeを利用してWebを参照したい場合の設定について」
Follow-Ups: References: