The patch below fixes more checkpatch warnings about lines that are over
authorvlnb <vlnb@d57e44dd-8a1f-0410-8b47-8ef2f437770f>
Fri, 24 Oct 2008 12:11:17 +0000 (12:11 +0000)
committervlnb <vlnb@d57e44dd-8a1f-0410-8b47-8ef2f437770f>
Fri, 24 Oct 2008 12:11:17 +0000 (12:11 +0000)
eighty columns, and more sparse warnings about missing declarations by
inserting the keyword static where appropriate. A sparse warning about a
shadowed variable (ucmd) is also fixed.

This patch has been verified by rereading the patch carefully, and by verifying
that SCST source code still compiles fine.

Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>
git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@538 d57e44dd-8a1f-0410-8b47-8ef2f437770f

scst/src/dev_handlers/scst_changer.c
scst/src/dev_handlers/scst_processor.c
scst/src/dev_handlers/scst_raid.c
scst/src/dev_handlers/scst_user.c
scst/src/dev_handlers/scst_vdisk.c

index 49d85e7..84e2bba 100644 (file)
@@ -57,7 +57,7 @@ static struct scst_dev_type changer_devtype = CHANGER_TYPE;
  *
  *  Description:
  *************************************************************/
-int changer_attach(struct scst_device *dev)
+static int changer_attach(struct scst_device *dev)
 {
        int res = 0;
        int retries;
@@ -142,7 +142,7 @@ void changer_detach(struct scst_device *dev)
  *
  *  Note:  Not all states are allowed on return
  ********************************************************************/
-int changer_parse(struct scst_cmd *cmd)
+static int changer_parse(struct scst_cmd *cmd)
 {
        int res = SCST_CMD_STATE_DEFAULT;
 
index 7b24e9c..ba70d33 100644 (file)
@@ -57,7 +57,7 @@ static struct scst_dev_type processor_devtype = PROCESSOR_TYPE;
  *
  *  Description:
  *************************************************************/
-int processor_attach(struct scst_device *dev)
+static int processor_attach(struct scst_device *dev)
 {
        int res = 0;
        int retries;
@@ -142,7 +142,7 @@ void processor_detach(struct scst_device *dev)
  *
  *  Note:  Not all states are allowed on return
  ********************************************************************/
-int processor_parse(struct scst_cmd *cmd)
+static int processor_parse(struct scst_cmd *cmd)
 {
        int res = SCST_CMD_STATE_DEFAULT;
 
index 38a38cb..020e28a 100644 (file)
@@ -57,7 +57,7 @@ static struct scst_dev_type raid_devtype = RAID_TYPE;
  *
  *  Description:
  *************************************************************/
-int raid_attach(struct scst_device *dev)
+static int raid_attach(struct scst_device *dev)
 {
        int res = 0;
        int retries;
index ce51be0..e1c9daa 100644 (file)
@@ -2817,12 +2817,12 @@ static int dev_user_process_cleanup(struct scst_user_dev *dev)
        int i;
        for (i = 0; i < (int)ARRAY_SIZE(dev->ucmd_hash); i++) {
                struct list_head *head = &dev->ucmd_hash[i];
-               struct scst_user_cmd *ucmd;
+               struct scst_user_cmd *ucmd2;
 again:
-               list_for_each_entry(ucmd, head, hash_list_entry) {
-                       PRINT_ERROR("Lost ucmd %p (state %x, ref %d)", ucmd,
-                               ucmd->state, atomic_read(&ucmd->ucmd_ref));
-                       ucmd_put(ucmd);
+               list_for_each_entry(ucmd2, head, hash_list_entry) {
+                       PRINT_ERROR("Lost ucmd %p (state %x, ref %d)", ucmd2,
+                               ucmd2->state, atomic_read(&ucmd2->ucmd_ref));
+                       ucmd_put(ucmd2);
                        goto again;
                }
        }
index 51806be..ebd31f6 100644 (file)
@@ -2202,7 +2202,8 @@ restart:
                PRINT_ERROR("lseek trouble %lld != %lld",
                            (long long unsigned int)err,
                            (long long unsigned int)loff);
-               scst_set_cmd_error(cmd, SCST_LOAD_SENSE(scst_sense_hardw_error));
+               scst_set_cmd_error(cmd,
+                                  SCST_LOAD_SENSE(scst_sense_hardw_error));
                goto out_set_fs;
        }