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:
Vladislav Bolkhovitin
2009-03-20 12:36:01 +00:00
parent a20e32ad33
commit 27c5d8dcdf
9 changed files with 28 additions and 28 deletions

View File

@@ -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 */

View File

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

View File

@@ -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;
}

View File

@@ -238,7 +238,7 @@ int config_account_add(u32 tid, int dir, char *name, char *pass)
if (tid) {
/* check here */
/* return -ENOENT; */
/* return -ENOENT; */
}
/* Check for minimum RFC defined value */

View File

@@ -172,7 +172,7 @@ static void create_listen_socket(struct pollfd *array)
opt = 1;
if (res->ai_family == AF_INET6 &&
setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, &opt, sizeof(opt))) {
log_error("Unable to restrict IPv6 socket (%s)", strerror(errno));
log_error("Unable to restrict IPv6 socket (%s)", strerror(errno));
close(sock);
continue;
}

View File

@@ -604,8 +604,8 @@ static char *print_scn_pdu(struct isns_hdr *hdr)
name = (char *) tlv->value;
break;
case ISNS_ATTR_TIMESTAMP:
/* log_error("%u : %u : %" PRIx64, ntohl(tlv->tag), vlen, */
/* *((uint64_t *) tlv->value)); */
/* log_error("%u : %u : %" PRIx64, ntohl(tlv->tag), vlen, */
/* *((uint64_t *) tlv->value)); */
break;
case ISNS_ATTR_ISCSI_SCN_BITMAP:
log_error("scn bitmap : %x", *((uint32_t *) tlv->value));

View File

@@ -445,11 +445,11 @@ enum scst_exec_context {
#define SCST_SENSE_ASCQ_VALID 4
#define SCST_SENSE_ASCx_VALID (SCST_SENSE_ASC_VALID | \
SCST_SENSE_ASCQ_VALID)
SCST_SENSE_ASCQ_VALID)
#define SCST_SENSE_ALL_VALID (SCST_SENSE_KEY_VALID | \
SCST_SENSE_ASC_VALID | \
SCST_SENSE_ASCQ_VALID)
SCST_SENSE_ASC_VALID | \
SCST_SENSE_ASCQ_VALID)
/*************************************************************
* TYPES
@@ -675,7 +675,7 @@ struct scst_tgt_template {
void (*task_mgmt_affected_cmds_done) (struct scst_mgmt_cmd *mgmt_cmd);
/*
* This function informs the driver that the corresponding task
* This function informs the driver that the corresponding task
* management function has been completed, i.e. all the corresponding
* commands completed and freed. No return value expected.
*

View File

@@ -93,7 +93,7 @@ static struct scst_proc_log vdisk_proc_local_trace_tbl[] =
#define VDISK_NAME "vdisk"
#define VCDROM_NAME "vcdrom"
#define VDISK_NULLIO_SIZE 3LL*1024*1024*1024*1024/2
#define VDISK_NULLIO_SIZE (3LL*1024*1024*1024*1024/2)
#define DEF_TST SCST_CONTR_MODE_SEP_TASK_SETS
/*
@@ -3326,7 +3326,7 @@ static int vcdrom_change(char *p, char *name)
err = 0;
virt_dev->file_name = NULL;
}
if (virt_dev->nullio)
err = VDISK_NULLIO_SIZE;

View File

@@ -3115,8 +3115,8 @@ int scst_obtain_device_parameters(struct scst_device *dev)
#endif
SCST_SENSE_VALID(sense_buffer)) {
if (scst_analyze_sense(sense_buffer,
sizeof(sense_buffer),
SCST_SENSE_KEY_VALID,
sizeof(sense_buffer),
SCST_SENSE_KEY_VALID,
ILLEGAL_REQUEST, 0, 0)) {
TRACE(TRACE_SCSI|TRACE_MGMT_MINOR,
"Device %d:%d:%d:%d doesn't "
@@ -3136,8 +3136,8 @@ int scst_obtain_device_parameters(struct scst_device *dev)
res = 0;
goto out;
} else if (scst_analyze_sense(sense_buffer,
sizeof(sense_buffer),
SCST_SENSE_KEY_VALID,
sizeof(sense_buffer),
SCST_SENSE_KEY_VALID,
NOT_READY, 0, 0)) {
TRACE(TRACE_SCSI,
"Device %d:%d:%d:%d not ready",