Re: [PATCH] scsi: ch.c fix sparse shadowed variable warnings

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

 



On Mon, 2008-03-31 at 22:05 -0700, Harvey Harrison wrote:
> Replace the global err array with ch_err.
> drivers/scsi/ch.c:271:6: warning: symbol 'err' shadows an earlier one
> drivers/scsi/ch.c:116:3: originally declared here
> 
> Replace the temporary cmd buffer with ch_err to avoid shadowing the cmd
> function parameter.
> drivers/scsi/ch.c:724:11: warning: symbol 'cmd' shadows an earlier one
> drivers/scsi/ch.c:596:20: originally declared here
> 
> Signed-off-by: Harvey Harrison <harvey.harrison@xxxxxxxxx>
> ---
> James, incorporated your comments.

Yes, that looks fine, thanks.

I have a challenge for you:  It looks like this driver has three
incorrect unconditional uses of GFP_DMA.  It gets a 512 byte bufer and
then only uses 256 bytes of it on several occasions and the routine with
the shadowed cmd variable looks like it should be calling
ch_read_element_status() rather than duplicating it.

James


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux