mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-17 18:51:27 +00:00
Fixed several compiler and checkpatch warnings.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1568 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user