Boaz Harrosh wrote: > --- a/drivers/ieee1394/sbp2.c > +++ b/drivers/ieee1394/sbp2.c > @@ -1672,8 +1673,11 @@ static int sbp2_send_command(struct sbp2_lu *lu, struct scsi_cmnd *SCpnt, > * Translates SBP-2 status into SCSI sense data for check conditions > */ > static unsigned int sbp2_status_to_sense_data(unchar *sbp2_status, > - unchar *sense_data) > + struct scsi_cmnd *SCpnt) > { > + u8 sense_data[16]; > + > + memset(sense_data, 0, sizeof(sense_data)); > /* OK, it's pretty ugly... ;-) */ > sense_data[0] = 0x70; > sense_data[1] = 0x0; > @@ -1691,6 +1695,7 @@ static unsigned int sbp2_status_to_sense_data(unchar *sbp2_status, > sense_data[13] = sbp2_status[11]; > sense_data[14] = sbp2_status[20]; > sense_data[15] = sbp2_status[21]; > + scsi_eh_cpy_sense(SCpnt, sense_data, sizeof(sense_data)); > > return sbp2_status[8] & 0x3f; > } You don't need the memset. Also, here and in drivers/firewire/fw-sbp2.c, the SCSI sense data could AFAICS be rewritten in-place in sbp2_status. But I don't know if this is a worthwhile optimization; it would reduce readability. -- Stefan Richter -=====-==--- --=- --=-- http://arcgraph.de/sr/ - 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