Patch from Bart Van Assche <bart.vanassche@gmail.com>:
authorvlnb <vlnb@d57e44dd-8a1f-0410-8b47-8ef2f437770f>
Tue, 27 May 2008 14:26:15 +0000 (14:26 +0000)
committervlnb <vlnb@d57e44dd-8a1f-0410-8b47-8ef2f437770f>
Tue, 27 May 2008 14:26:15 +0000 (14:26 +0000)
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

iscsi-scst/kernel/config.c
iscsi-scst/kernel/event.c
scst/src/dev_handlers/scst_vdisk.c
scst/src/scst_lib.c
scst/src/scst_main.c
scst/src/scst_targ.c
srpt/src/ib_srpt.c

index 3629d4d..610d691 100644 (file)
@@ -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) {
index 4dbd6d4..7d8f8cb 100644 (file)
@@ -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;
index 2712a63..b5085dc 100644 (file)
@@ -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;
        }
 }
 
index 07890c9..bff1360 100644 (file)
@@ -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);
                }
index 289c3b2..bdf29b2 100644 (file)
@@ -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();
 
index 785a18f..6ef94df 100644 (file)
@@ -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;
        }
 }
 
index 6666389..925baaf 100644 (file)
@@ -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;