mirror of
https://github.com/SCST-project/scst.git
synced 2026-09-20 06:54:38 +00:00
The patch below fixes the following recently introduced checkpatch complaints:
* use tabs not spaces * Macros with complex values should be enclosed in parenthesis. * printk() should include KERN_ facility level. The patch below has been verified by reviewing it carefully and by verifying the output of the following command: scripts/run-regression-tests -k 2.6.28.8 Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com> git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@707 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -490,26 +490,26 @@ static void iscsi_dump_char(int ch)
|
||||
|
||||
if (ch < 0) {
|
||||
while ((i % 16) != 0) {
|
||||
printk(" ");
|
||||
printk(KERN_CONT " ");
|
||||
text[i] = ' ';
|
||||
i++;
|
||||
if ((i % 16) == 0)
|
||||
printk(" | %.16s |\n", text);
|
||||
printk(KERN_CONT " | %.16s |\n", text);
|
||||
else if ((i % 4) == 0)
|
||||
printk(" |");
|
||||
printk(KERN_CONT " |");
|
||||
}
|
||||
i = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
text[i] = (ch < 0x20 || (ch >= 0x80 && ch <= 0xa0)) ? ' ' : ch;
|
||||
printk(" %02x", ch);
|
||||
printk(KERN_CONT " %02x", ch);
|
||||
i++;
|
||||
if ((i % 16) == 0) {
|
||||
printk(" | %.16s |\n", text);
|
||||
printk(KERN_CONT " | %.16s |\n", text);
|
||||
i = 0;
|
||||
} else if ((i % 4) == 0)
|
||||
printk(" |");
|
||||
printk(KERN_CONT " |");
|
||||
}
|
||||
|
||||
void iscsi_dump_pdu(struct iscsi_pdu *pdu)
|
||||
@@ -519,18 +519,18 @@ void iscsi_dump_pdu(struct iscsi_pdu *pdu)
|
||||
int i;
|
||||
|
||||
buf = (void *)&pdu->bhs;
|
||||
printk("BHS: (%p,%zd)\n", buf, sizeof(pdu->bhs));
|
||||
printk(KERN_DEBUG "BHS: (%p,%zd)\n", buf, sizeof(pdu->bhs));
|
||||
for (i = 0; i < sizeof(pdu->bhs); i++)
|
||||
iscsi_dump_char(*buf++);
|
||||
iscsi_dump_char(-1);
|
||||
|
||||
buf = (void *)pdu->ahs;
|
||||
printk("AHS: (%p,%d)\n", buf, pdu->ahssize);
|
||||
printk(KERN_DEBUG "AHS: (%p,%d)\n", buf, pdu->ahssize);
|
||||
for (i = 0; i < pdu->ahssize; i++)
|
||||
iscsi_dump_char(*buf++);
|
||||
iscsi_dump_char(-1);
|
||||
|
||||
printk("Data: (%d)\n", pdu->datasize);
|
||||
printk(KERN_DEBUG "Data: (%d)\n", pdu->datasize);
|
||||
}
|
||||
}
|
||||
#endif /* CONFIG_SCST_DEBUG */
|
||||
|
||||
@@ -100,7 +100,7 @@ static inline u32 cmnd_read_size(struct iscsi_cmnd *cmnd)
|
||||
ahdr = (struct iscsi_ahs_hdr *)p;
|
||||
|
||||
if (ahdr->ahstype == ISCSI_AHSTYPE_RLENGTH) {
|
||||
struct iscsi_rlength_ahdr *rh =
|
||||
struct iscsi_rlength_ahdr *rh =
|
||||
(struct iscsi_rlength_ahdr *)ahdr;
|
||||
return be32_to_cpu(rh->read_length);
|
||||
}
|
||||
@@ -1374,7 +1374,7 @@ static int scsi_cmnd_start(struct iscsi_cmnd *req)
|
||||
ahdr = (struct iscsi_ahs_hdr *)p;
|
||||
|
||||
if (ahdr->ahstype == ISCSI_AHSTYPE_CDB) {
|
||||
struct iscsi_cdb_ahdr *eca =
|
||||
struct iscsi_cdb_ahdr *eca =
|
||||
(struct iscsi_cdb_ahdr *)ahdr;
|
||||
scst_cmd_set_ext_cdb(scst_cmd, eca->cdb,
|
||||
be16_to_cpu(ahdr->ahslength) - 1);
|
||||
@@ -2972,7 +2972,7 @@ static int iscsi_scsi_aen(struct scst_aen *aen)
|
||||
sg_init_table(sg, 2);
|
||||
sg_set_buf(&sg[0], &rsp->sense_hdr, sizeof(rsp->sense_hdr));
|
||||
sg_set_buf(&sg[1], sense, sense_len);
|
||||
|
||||
|
||||
rsp->sense_hdr.length = cpu_to_be16(sense_len);
|
||||
rsp->pdu.datasize = sizeof(rsp->sense_hdr) + sense_len;
|
||||
rsp->bufflen = rsp->pdu.datasize;
|
||||
|
||||
@@ -165,7 +165,7 @@ int session_add(struct iscsi_target *target,
|
||||
info->sid);
|
||||
err = -EEXIST;
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
sid = (union iscsi_sid)info->sid;
|
||||
sid.id.tsih = 0;
|
||||
@@ -181,7 +181,7 @@ int session_add(struct iscsi_target *target,
|
||||
i.id.tsih = 0;
|
||||
if ((sid.id64 == i.id64) &&
|
||||
(strcmp(info->initiator_name, session->initiator_name) == 0)) {
|
||||
if (!session->sess_shutting_down) {
|
||||
if (!session->sess_shutting_down) {
|
||||
/* session reinstatement */
|
||||
old_sess = session;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user