From 73ea36593d307d12684b5649dedcc36d0c70375b Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Tue, 27 May 2008 14:26:15 +0000 Subject: [PATCH] Patch from Bart Van Assche : 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 git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@398 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/kernel/config.c | 2 +- iscsi-scst/kernel/event.c | 2 +- scst/src/dev_handlers/scst_vdisk.c | 10 +++++----- scst/src/scst_lib.c | 4 ++-- scst/src/scst_main.c | 2 +- scst/src/scst_targ.c | 12 ++++++------ srpt/src/ib_srpt.c | 2 +- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/iscsi-scst/kernel/config.c b/iscsi-scst/kernel/config.c index 3629d4dea..610d691d2 100644 --- a/iscsi-scst/kernel/config.c +++ b/iscsi-scst/kernel/config.c @@ -526,7 +526,7 @@ void iscsi_dump_iov(struct msghdr *msg) 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) { diff --git a/iscsi-scst/kernel/event.c b/iscsi-scst/kernel/event.c index 4dbd6d466..7d8f8cb99 100644 --- a/iscsi-scst/kernel/event.c +++ b/iscsi-scst/kernel/event.c @@ -89,7 +89,7 @@ static int notify(void *data, int len, int gfp_mask) { 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; diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index 2712a636b..b5085dcdd 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -648,11 +648,11 @@ static void vdisk_detach_tgt(struct scst_tgt_dev *tgt_dev) 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; } } diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index 07890c927..bff136094 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -2443,8 +2443,8 @@ void scst_process_reset(struct scst_device *dev, 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); } diff --git a/scst/src/scst_main.c b/scst/src/scst_main.c index 289c3b232..bdf29b277 100644 --- a/scst/src/scst_main.c +++ b/scst/src/scst_main.c @@ -1217,7 +1217,7 @@ void __scst_del_cmd_threads(int num) int __scst_add_cmd_threads(int num) { int res = 0, i; - static int scst_thread_num = 0; + static int scst_thread_num; TRACE_ENTRY(); diff --git a/scst/src/scst_targ.c b/scst/src/scst_targ.c index 785a18fef..6ef94df21 100644 --- a/scst/src/scst_targ.c +++ b/scst/src/scst_targ.c @@ -3494,15 +3494,15 @@ static inline int scst_is_strict_mgmt_fn(int mgmt_fn) { 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; } } diff --git a/srpt/src/ib_srpt.c b/srpt/src/ib_srpt.c index 666638935..925baaf6d 100644 --- a/srpt/src/ib_srpt.c +++ b/srpt/src/ib_srpt.c @@ -60,7 +60,7 @@ struct srpt_thread { 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;