diff options
author | Stefan Haberland <stefan.haberland@de.ibm.com> | 2009-03-26 14:23:49 (GMT) |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2009-03-26 14:24:05 (GMT) |
commit | fc19f381b3828aa4f8a3417dbefc3418ec6bbe10 (patch) | |
tree | 521d7537e5929de141ba4b616ccc2ab191d4b9fe /drivers/s390/block/dasd_ioctl.c | |
parent | f3eb5384cf0325c02e306b1d81e70f81a03d7432 (diff) | |
download | linux-fc19f381b3828aa4f8a3417dbefc3418ec6bbe10.tar.xz |
[S390] dasd: message cleanup
Moved some Messages into s390 debug feature and changed remaining
messages to use the dev_xxx and pr_xxx macros.
Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/block/dasd_ioctl.c')
-rw-r--r-- | drivers/s390/block/dasd_ioctl.c | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/drivers/s390/block/dasd_ioctl.c b/drivers/s390/block/dasd_ioctl.c index a3bbdb8..4ce3f72 100644 --- a/drivers/s390/block/dasd_ioctl.c +++ b/drivers/s390/block/dasd_ioctl.c @@ -9,6 +9,9 @@ * * i/o controls for the dasd driver. */ + +#define KMSG_COMPONENT "dasd" + #include <linux/interrupt.h> #include <linux/major.h> #include <linux/fs.h> @@ -94,7 +97,8 @@ static int dasd_ioctl_quiesce(struct dasd_block *block) if (!capable (CAP_SYS_ADMIN)) return -EACCES; - DEV_MESSAGE(KERN_DEBUG, base, "%s", "Quiesce IO on device"); + dev_info(&base->cdev->dev, "The DASD has been put in the quiesce " + "state\n"); spin_lock_irqsave(get_ccwdev_lock(base->cdev), flags); base->stopped |= DASD_STOPPED_QUIESCE; spin_unlock_irqrestore(get_ccwdev_lock(base->cdev), flags); @@ -103,7 +107,7 @@ static int dasd_ioctl_quiesce(struct dasd_block *block) /* - * Quiesce device. + * Resume device. */ static int dasd_ioctl_resume(struct dasd_block *block) { @@ -114,7 +118,8 @@ static int dasd_ioctl_resume(struct dasd_block *block) if (!capable (CAP_SYS_ADMIN)) return -EACCES; - DEV_MESSAGE(KERN_DEBUG, base, "%s", "resume IO on device"); + dev_info(&base->cdev->dev, "I/O operations have been resumed " + "on the DASD\n"); spin_lock_irqsave(get_ccwdev_lock(base->cdev), flags); base->stopped &= ~DASD_STOPPED_QUIESCE; spin_unlock_irqrestore(get_ccwdev_lock(base->cdev), flags); @@ -140,8 +145,8 @@ static int dasd_format(struct dasd_block *block, struct format_data_t *fdata) return -EPERM; if (base->state != DASD_STATE_BASIC) { - DEV_MESSAGE(KERN_WARNING, base, "%s", - "dasd_format: device is not disabled! "); + dev_warn(&base->cdev->dev, + "The DASD cannot be formatted while it is enabled\n"); return -EBUSY; } @@ -169,10 +174,9 @@ static int dasd_format(struct dasd_block *block, struct format_data_t *fdata) dasd_sfree_request(cqr, cqr->memdev); if (rc) { if (rc != -ERESTARTSYS) - DEV_MESSAGE(KERN_ERR, base, - " Formatting of unit %u failed " - "with rc = %d", - fdata->start_unit, rc); + dev_err(&base->cdev->dev, + "Formatting unit %d failed with " + "rc=%d\n", fdata->start_unit, rc); return rc; } fdata->start_unit++; @@ -199,8 +203,9 @@ dasd_ioctl_format(struct block_device *bdev, void __user *argp) if (copy_from_user(&fdata, argp, sizeof(struct format_data_t))) return -EFAULT; if (bdev != bdev->bd_contains) { - DEV_MESSAGE(KERN_WARNING, block->base, "%s", - "Cannot low-level format a partition"); + dev_warn(&block->base->cdev->dev, + "The specified DASD is a partition and cannot be " + "formatted\n"); return -EINVAL; } return dasd_format(block, &fdata); |