mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-18 19:21:26 +00:00
qla2x00t-32gbit, target: Make sqa_xmit_response() easier to read
This patch does not change any functionality. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8126 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -1696,16 +1696,14 @@ static int sqa_xmit_response(struct scst_cmd *scst_cmd)
|
||||
EXTRACHECKS_BUG_ON(scst_cmd_atomic(scst_cmd));
|
||||
#endif
|
||||
if (is_send_status) {
|
||||
const u8* const sense_buf = scst_cmd_get_sense_buffer(scst_cmd);
|
||||
u16 len = scst_cmd_get_sense_buffer_len(scst_cmd);
|
||||
|
||||
xmit_type |= QLA_TGT_XMIT_STATUS;
|
||||
|
||||
if (QLA_TGT_SENSE_VALID(scst_cmd_get_sense_buffer(scst_cmd))) {
|
||||
if (len > TRANSPORT_SENSE_BUFFER ||
|
||||
len == 0)
|
||||
if (QLA_TGT_SENSE_VALID(sense_buf)) {
|
||||
if (len > TRANSPORT_SENSE_BUFFER || len == 0)
|
||||
len = TRANSPORT_SENSE_BUFFER;
|
||||
|
||||
memcpy(cmd->sense_buffer,
|
||||
scst_cmd_get_sense_buffer(scst_cmd), len);
|
||||
memcpy(cmd->sense_buffer, sense_buf, len);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user