RE: [PATCH 1/2] replace sizeof sense_buffer with SCSI_SENSE_BUFFERSIZE

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

 



On Thu, 3 Jan 2008 11:10:04 -0500
"Salyzyn, Mark" <mark_salyzyn@xxxxxxxxxxx> wrote:

> ACK on aacraid/ips/dpt_i2o bits. Inspected others, this patch IS inert.

Thanks!


> NitMeBeingStupidAndAddingARiderToTheBill: I know it was a grep/replace.
> If you need to respin because of Boaz and do not mind, do not hesitate
> to optimize (?) and instead do:
> 
> diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c
> index 70f48a1..c6380c0 100644
> --- a/drivers/scsi/dpt_i2o.c
> +++ b/drivers/scsi/dpt_i2o.c
> @@ -2298,7 +2298,6 @@ static s32 adpt_i2o_to_scsi(void __iomem *reply,
> struct scsi_cmnd* cmd)
>  		// copy over the request sense data if it was a check
>  		// condition status
> -		if(dev_status == 0x02 /*CHECK_CONDITION*/) {
> -			u32 len = sizeof(cmd->sense_buffer);
> -			len = (len > 40) ?  40 : len;
> +		if (dev_status == 0x02 /*CHECK_CONDITION*/) {
> +			u32 len = (SCSI_SENSE_BUFFERSIZE > 40) ?  40 :
> SCSI_SENSE_BUFFERSIZE;
>  			// Copy over the sense data
>  			memcpy_fromio(cmd->sense_buffer, (reply+28) ,
> len);

I see. I'll do if I need to send an updated patch.
-
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