The patch below fixes the following categories of checkpatch complaints:
- ERROR: switch and case should be at the same indent
- ERROR: do not initialise statics to 0 or NULL
- ERROR: use tabs not spaces
I have verified that the SCST source code still compiles.
Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>
git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@398
d57e44dd-8a1f-0410-8b47-
8ef2f437770f
static void iscsi_dump_char(int ch)
{
static unsigned char text[16];
- static int i = 0;
+ static int i;
if (ch < 0) {
while ((i % 16) != 0) {
{
struct sk_buff *skb;
struct nlmsghdr *nlh;
- static u32 seq = 0;
+ static u32 seq;
if (!(skb = alloc_skb(NLMSG_SPACE(len), gfp_mask)))
return -ENOMEM;
static inline int vdisk_sync_queue_type(enum scst_cmd_queue_type qt)
{
switch (qt) {
- case SCST_CMD_QUEUE_ORDERED:
- case SCST_CMD_QUEUE_HEAD_OF_QUEUE:
- return 1;
- default:
- return 0;
+ case SCST_CMD_QUEUE_ORDERED:
+ case SCST_CMD_QUEUE_HEAD_OF_QUEUE:
+ return 1;
+ default:
+ return 0;
}
}
list_for_each_entry(tgt_dev, &dev->dev_tgt_dev_list,
dev_tgt_dev_list_entry) {
TRACE(TRACE_MGMT, "Clearing RESERVE'ation for tgt_dev "
- "lun %Ld",
- (long long unsigned int)tgt_dev->lun);
+ "lun %Ld",
+ (long long unsigned int)tgt_dev->lun);
clear_bit(SCST_TGT_DEV_RESERVED,
&tgt_dev->tgt_dev_flags);
}
int __scst_add_cmd_threads(int num)
{
int res = 0, i;
- static int scst_thread_num = 0;
+ static int scst_thread_num;
TRACE_ENTRY();
{
switch (mgmt_fn) {
#ifdef ABORT_CONSIDER_FINISHED_TASKS_AS_NOT_EXISTING
- case SCST_ABORT_TASK:
+ case SCST_ABORT_TASK:
#endif
#if 0
- case SCST_ABORT_TASK_SET:
- case SCST_CLEAR_TASK_SET:
+ case SCST_ABORT_TASK_SET:
+ case SCST_CLEAR_TASK_SET:
#endif
- return 1;
- default:
- return 0;
+ return 1;
+ default:
+ return 0;
}
}
struct task_struct *thread;
};
-static u64 mellanox_ioc_guid = 0;
+static u64 mellanox_ioc_guid;
static struct list_head srpt_devices;
static int thread = 1;
static struct srpt_thread srpt_thread;