Fixed several compiler and checkpatch warnings.
authorbvassche <bvassche@d57e44dd-8a1f-0410-8b47-8ef2f437770f>
Sat, 27 Mar 2010 08:46:06 +0000 (08:46 +0000)
committerbvassche <bvassche@d57e44dd-8a1f-0410-8b47-8ef2f437770f>
Sat, 27 Mar 2010 08:46:06 +0000 (08:46 +0000)
git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@1568 d57e44dd-8a1f-0410-8b47-8ef2f437770f

iscsi-scst/kernel/config.c
iscsi-scst/kernel/session.c
iscsi-scst/kernel/target.c
scst/src/dev_handlers/scst_vdisk.c

index 09de558..c940174 100644 (file)
@@ -398,7 +398,7 @@ static int add_session(void __user *ptr)
 
        info = kzalloc(sizeof(*info), GFP_KERNEL);
        if (info == NULL) {
-               PRINT_ERROR("Can't alloc info (size %d)", sizeof(*info));
+               PRINT_ERROR("Can't alloc info (size %zd)", sizeof(*info));
                err = -ENOMEM;
                goto out;
        }
@@ -443,7 +443,7 @@ static int del_session(void __user *ptr)
 
        info = kzalloc(sizeof(*info), GFP_KERNEL);
        if (info == NULL) {
-               PRINT_ERROR("Can't alloc info (size %d)", sizeof(*info));
+               PRINT_ERROR("Can't alloc info (size %zd)", sizeof(*info));
                err = -ENOMEM;
                goto out;
        }
@@ -876,7 +876,7 @@ static int add_target(void __user *ptr)
 
        info = kzalloc(sizeof(*info), GFP_KERNEL);
        if (info == NULL) {
-               PRINT_ERROR("Can't alloc info (size %d)", sizeof(*info));
+               PRINT_ERROR("Can't alloc info (size %zd)", sizeof(*info));
                err = -ENOMEM;
                goto out;
        }
@@ -1093,7 +1093,7 @@ out:
        return err;
 }
 
-int open(struct inode *inode, struct file *file)
+static int open(struct inode *inode, struct file *file)
 {
        bool already;
 
index 9d26c7c..e3f1b26 100644 (file)
@@ -159,7 +159,7 @@ int __add_session(struct iscsi_target *target,
 
        params_info = kmalloc(sizeof(*params_info), GFP_KERNEL);
        if (params_info == NULL) {
-               PRINT_ERROR("Unable to allocate params info (size %d)",
+               PRINT_ERROR("Unable to allocate params info (size %zd)",
                        sizeof(*params_info));
                err = -ENOMEM;
                goto out_err_unlock;
index 807d834..520d96f 100644 (file)
@@ -151,7 +151,7 @@ int __add_target(struct iscsi_kern_target_info *info)
 
        add_info = kmalloc(sizeof(*add_info), GFP_KERNEL);
        if (add_info == NULL) {
-               PRINT_ERROR("Unable to allocate additional info (size %d)",
+               PRINT_ERROR("Unable to allocate additional info (size %zd)",
                        sizeof(*add_info));
                err = -ENOMEM;
                goto out;
index 18aaab6..81e04fe 100644 (file)
@@ -2962,7 +2962,7 @@ static int vdev_create(struct scst_dev_type *devt,
        virt_dev->block_shift = DEF_DISK_BLOCKSIZE_SHIFT;
 
        if (strlen(name) >= sizeof(virt_dev->name)) {
-               PRINT_ERROR("Name %s is too long (max allowed %d)", name,
+               PRINT_ERROR("Name %s is too long (max allowed %zd)", name,
                        sizeof(virt_dev->name)-1);
                res = -EINVAL;
                goto out_free;