mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-18 13:16:34 +00:00
Fixes for recently introduced minor checkpatch and sparse complaints.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2042 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -3724,7 +3724,7 @@ static ssize_t vcdrom_sysfs_filename_store(struct kobject *kobj,
|
||||
|
||||
i_buf = kmalloc(count+1, GFP_KERNEL);
|
||||
if (i_buf == NULL) {
|
||||
PRINT_ERROR("Unable to alloc intermediate buffer with size %d",
|
||||
PRINT_ERROR("Unable to alloc intermediate buffer with size %zd",
|
||||
count+1);
|
||||
res = -ENOMEM;
|
||||
goto out;
|
||||
@@ -3966,7 +3966,7 @@ out:
|
||||
return res;
|
||||
}
|
||||
|
||||
static ssize_t vdisk_sysfs_process_resync_size_store(
|
||||
static int vdisk_sysfs_process_resync_size_store(
|
||||
struct scst_sysfs_work_item *work)
|
||||
{
|
||||
int res;
|
||||
|
||||
@@ -187,7 +187,7 @@ int scst_alloc_sysfs_work(int (*sysfs_work_fn)(struct scst_sysfs_work_item *),
|
||||
|
||||
work = kzalloc(sizeof(*work), GFP_KERNEL);
|
||||
if (work == NULL) {
|
||||
PRINT_ERROR("Unable to alloc sysfs work (size %d)",
|
||||
PRINT_ERROR("Unable to alloc sysfs work (size %zd)",
|
||||
sizeof(*work));
|
||||
res = -ENOMEM;
|
||||
goto out;
|
||||
@@ -1353,7 +1353,7 @@ out:
|
||||
return res;
|
||||
}
|
||||
|
||||
static int scst_dev_sysfs_threads_num_show(struct kobject *kobj,
|
||||
static ssize_t scst_dev_sysfs_threads_num_show(struct kobject *kobj,
|
||||
struct kobj_attribute *attr, char *buf)
|
||||
{
|
||||
int pos = 0;
|
||||
|
||||
@@ -1024,14 +1024,14 @@ static int __init scst_local_init(void)
|
||||
* Allocate a pool of structures for tgt_specific structures
|
||||
*/
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 23)
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 25))
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 25))
|
||||
/*
|
||||
* We only need this for kernels where we can get non scatterlists
|
||||
*/
|
||||
tgt_specific_pool = kmem_cache_create("scst_tgt_specific",
|
||||
sizeof(struct scst_local_tgt_specific),
|
||||
0, SCST_SLAB_FLAGS, NULL);
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
tgt_specific_pool = kmem_cache_create("scst_tgt_specific",
|
||||
sizeof(struct scst_local_tgt_specific),
|
||||
@@ -1130,9 +1130,8 @@ static void __exit scst_local_exit(void)
|
||||
|
||||
TRACE_ENTRY();
|
||||
|
||||
for (; k; k--) {
|
||||
for (; k; k--)
|
||||
scst_local_remove_adapter();
|
||||
}
|
||||
|
||||
do_remove_driverfs_files();
|
||||
driver_unregister(&scst_local_driverfs_driver);
|
||||
|
||||
Reference in New Issue
Block a user