Commit ded77fb4 authored by Hongjie Yang's avatar Hongjie Yang Committed by Heiko Carstens

[S390] Cleanup dcssblk printk messages.

Signed-off-by: default avatarHongjie Yang <hongjie@us.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
parent 2a062ab4
...@@ -167,10 +167,8 @@ dcssblk_shared_store(struct device *dev, struct device_attribute *attr, const ch ...@@ -167,10 +167,8 @@ dcssblk_shared_store(struct device *dev, struct device_attribute *attr, const ch
struct dcssblk_dev_info *dev_info; struct dcssblk_dev_info *dev_info;
int rc; int rc;
if ((count > 1) && (inbuf[1] != '\n') && (inbuf[1] != '\0')) { if ((count > 1) && (inbuf[1] != '\n') && (inbuf[1] != '\0'))
PRINT_WARN("Invalid value, must be 0 or 1\n");
return -EINVAL; return -EINVAL;
}
down_write(&dcssblk_devices_sem); down_write(&dcssblk_devices_sem);
dev_info = container_of(dev, struct dcssblk_dev_info, dev); dev_info = container_of(dev, struct dcssblk_dev_info, dev);
if (atomic_read(&dev_info->use_count)) { if (atomic_read(&dev_info->use_count)) {
...@@ -215,7 +213,6 @@ dcssblk_shared_store(struct device *dev, struct device_attribute *attr, const ch ...@@ -215,7 +213,6 @@ dcssblk_shared_store(struct device *dev, struct device_attribute *attr, const ch
set_disk_ro(dev_info->gd, 0); set_disk_ro(dev_info->gd, 0);
} }
} else { } else {
PRINT_WARN("Invalid value, must be 0 or 1\n");
rc = -EINVAL; rc = -EINVAL;
goto out; goto out;
} }
...@@ -258,10 +255,8 @@ dcssblk_save_store(struct device *dev, struct device_attribute *attr, const char ...@@ -258,10 +255,8 @@ dcssblk_save_store(struct device *dev, struct device_attribute *attr, const char
{ {
struct dcssblk_dev_info *dev_info; struct dcssblk_dev_info *dev_info;
if ((count > 1) && (inbuf[1] != '\n') && (inbuf[1] != '\0')) { if ((count > 1) && (inbuf[1] != '\n') && (inbuf[1] != '\0'))
PRINT_WARN("Invalid value, must be 0 or 1\n");
return -EINVAL; return -EINVAL;
}
dev_info = container_of(dev, struct dcssblk_dev_info, dev); dev_info = container_of(dev, struct dcssblk_dev_info, dev);
down_write(&dcssblk_devices_sem); down_write(&dcssblk_devices_sem);
...@@ -289,7 +284,6 @@ dcssblk_save_store(struct device *dev, struct device_attribute *attr, const char ...@@ -289,7 +284,6 @@ dcssblk_save_store(struct device *dev, struct device_attribute *attr, const char
} }
} else { } else {
up_write(&dcssblk_devices_sem); up_write(&dcssblk_devices_sem);
PRINT_WARN("Invalid value, must be 0 or 1\n");
return -EINVAL; return -EINVAL;
} }
up_write(&dcssblk_devices_sem); up_write(&dcssblk_devices_sem);
...@@ -441,7 +435,6 @@ dcssblk_add_store(struct device *dev, struct device_attribute *attr, const char ...@@ -441,7 +435,6 @@ dcssblk_add_store(struct device *dev, struct device_attribute *attr, const char
goto out; goto out;
unregister_dev: unregister_dev:
PRINT_ERR("device_create_file() failed!\n");
list_del(&dev_info->lh); list_del(&dev_info->lh);
blk_cleanup_queue(dev_info->dcssblk_queue); blk_cleanup_queue(dev_info->dcssblk_queue);
dev_info->gd->queue = NULL; dev_info->gd->queue = NULL;
...@@ -702,10 +695,8 @@ dcssblk_check_params(void) ...@@ -702,10 +695,8 @@ dcssblk_check_params(void)
static void __exit static void __exit
dcssblk_exit(void) dcssblk_exit(void)
{ {
PRINT_DEBUG("DCSSBLOCK EXIT...\n");
s390_root_dev_unregister(dcssblk_root_dev); s390_root_dev_unregister(dcssblk_root_dev);
unregister_blkdev(dcssblk_major, DCSSBLK_NAME); unregister_blkdev(dcssblk_major, DCSSBLK_NAME);
PRINT_DEBUG("...finished!\n");
} }
static int __init static int __init
...@@ -713,27 +704,21 @@ dcssblk_init(void) ...@@ -713,27 +704,21 @@ dcssblk_init(void)
{ {
int rc; int rc;
PRINT_DEBUG("DCSSBLOCK INIT...\n");
dcssblk_root_dev = s390_root_dev_register("dcssblk"); dcssblk_root_dev = s390_root_dev_register("dcssblk");
if (IS_ERR(dcssblk_root_dev)) { if (IS_ERR(dcssblk_root_dev))
PRINT_ERR("device_register() failed!\n");
return PTR_ERR(dcssblk_root_dev); return PTR_ERR(dcssblk_root_dev);
}
rc = device_create_file(dcssblk_root_dev, &dev_attr_add); rc = device_create_file(dcssblk_root_dev, &dev_attr_add);
if (rc) { if (rc) {
PRINT_ERR("device_create_file(add) failed!\n");
s390_root_dev_unregister(dcssblk_root_dev); s390_root_dev_unregister(dcssblk_root_dev);
return rc; return rc;
} }
rc = device_create_file(dcssblk_root_dev, &dev_attr_remove); rc = device_create_file(dcssblk_root_dev, &dev_attr_remove);
if (rc) { if (rc) {
PRINT_ERR("device_create_file(remove) failed!\n");
s390_root_dev_unregister(dcssblk_root_dev); s390_root_dev_unregister(dcssblk_root_dev);
return rc; return rc;
} }
rc = register_blkdev(0, DCSSBLK_NAME); rc = register_blkdev(0, DCSSBLK_NAME);
if (rc < 0) { if (rc < 0) {
PRINT_ERR("Can't get dynamic major!\n");
s390_root_dev_unregister(dcssblk_root_dev); s390_root_dev_unregister(dcssblk_root_dev);
return rc; return rc;
} }
...@@ -742,7 +727,6 @@ dcssblk_init(void) ...@@ -742,7 +727,6 @@ dcssblk_init(void)
dcssblk_check_params(); dcssblk_check_params();
PRINT_DEBUG("...finished!\n");
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment