Re: [PATCH 1/4] scsi: move initialization of scmd->eh_entry

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

 



On Fri, May 24, 2013 at 12:57:40PM -0400, J??rn Engel wrote:
> >  	memset(cmd->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE);
> >  	if (cmd->cmd_len == 0)
> >  		cmd->cmd_len = scsi_command_size(cmd->cmnd);
> > +	INIT_LIST_HEAD(&cmd->eh_entry);
> > +	cmd->eh_eflags = 0;
> 
> I always suspect something subtle going on when a variable is
> initialized to 0 three lines below a memset.  Can line this go away?

The memset only zeroes the sense_buffer, not the whole scsi command
which would cause a major havoc for the callers.

--
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