aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/block/dasd_devmap.c
diff options
context:
space:
mode:
authorHorst Hummel <horst.hummel@de.ibm.com>2006-06-29 08:58:12 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2006-06-29 08:58:12 -0400
commit138c014dcba74211dc4e835658f34a787c40cf17 (patch)
treebef8f3f5b4f088d5826553d5876c6d751e23bf33 /drivers/s390/block/dasd_devmap.c
parent63b122466484e44d09af12bba33b34019757a3c2 (diff)
[S390] dasd whitespace and other cosmetics.
Dasd code cleanup: 1) remove white space, 2) remove the emacs override sections, and 3) use kzalloc instead of kmalloc. Signed-off-by: Horst Hummel <horst.hummel@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/block/dasd_devmap.c')
-rw-r--r--drivers/s390/block/dasd_devmap.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/drivers/s390/block/dasd_devmap.c b/drivers/s390/block/dasd_devmap.c
index 216bc4fba199..672e50314b12 100644
--- a/drivers/s390/block/dasd_devmap.c
+++ b/drivers/s390/block/dasd_devmap.c
@@ -123,7 +123,7 @@ static inline int
123dasd_busid(char **str, int *id0, int *id1, int *devno) 123dasd_busid(char **str, int *id0, int *id1, int *devno)
124{ 124{
125 int val, old_style; 125 int val, old_style;
126 126
127 /* check for leading '0x' */ 127 /* check for leading '0x' */
128 old_style = 0; 128 old_style = 0;
129 if ((*str)[0] == '0' && (*str)[1] == 'x') { 129 if ((*str)[0] == '0' && (*str)[1] == 'x') {
@@ -179,7 +179,7 @@ dasd_feature_list(char *str, char **endp)
179 features = 0; 179 features = 0;
180 180
181 while (1) { 181 while (1) {
182 for (len = 0; 182 for (len = 0;
183 str[len] && str[len] != ':' && str[len] != ')'; len++); 183 str[len] && str[len] != ':' && str[len] != ')'; len++);
184 if (len == 2 && !strncmp(str, "ro", 2)) 184 if (len == 2 && !strncmp(str, "ro", 2))
185 features |= DASD_FEATURE_READONLY; 185 features |= DASD_FEATURE_READONLY;
@@ -359,7 +359,7 @@ dasd_parse(void)
359 * Add a devmap for the device specified by busid. It is possible that 359 * Add a devmap for the device specified by busid. It is possible that
360 * the devmap already exists (dasd= parameter). The order of the devices 360 * the devmap already exists (dasd= parameter). The order of the devices
361 * added through this function will define the kdevs for the individual 361 * added through this function will define the kdevs for the individual
362 * devices. 362 * devices.
363 */ 363 */
364static struct dasd_devmap * 364static struct dasd_devmap *
365dasd_add_busid(char *bus_id, int features) 365dasd_add_busid(char *bus_id, int features)
@@ -368,7 +368,7 @@ dasd_add_busid(char *bus_id, int features)
368 int hash; 368 int hash;
369 369
370 new = (struct dasd_devmap *) 370 new = (struct dasd_devmap *)
371 kmalloc(sizeof(struct dasd_devmap), GFP_KERNEL); 371 kzalloc(sizeof(struct dasd_devmap), GFP_KERNEL);
372 if (!new) 372 if (!new)
373 return ERR_PTR(-ENOMEM); 373 return ERR_PTR(-ENOMEM);
374 spin_lock(&dasd_devmap_lock); 374 spin_lock(&dasd_devmap_lock);
@@ -630,7 +630,8 @@ dasd_ro_show(struct device *dev, struct device_attribute *attr, char *buf)
630} 630}
631 631
632static ssize_t 632static ssize_t
633dasd_ro_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) 633dasd_ro_store(struct device *dev, struct device_attribute *attr,
634 const char *buf, size_t count)
634{ 635{
635 struct dasd_devmap *devmap; 636 struct dasd_devmap *devmap;
636 int ro_flag; 637 int ro_flag;
@@ -658,7 +659,7 @@ static DEVICE_ATTR(readonly, 0644, dasd_ro_show, dasd_ro_store);
658 * use_diag controls whether the driver should use diag rather than ssch 659 * use_diag controls whether the driver should use diag rather than ssch
659 * to talk to the device 660 * to talk to the device
660 */ 661 */
661static ssize_t 662static ssize_t
662dasd_use_diag_show(struct device *dev, struct device_attribute *attr, char *buf) 663dasd_use_diag_show(struct device *dev, struct device_attribute *attr, char *buf)
663{ 664{
664 struct dasd_devmap *devmap; 665 struct dasd_devmap *devmap;
@@ -673,7 +674,8 @@ dasd_use_diag_show(struct device *dev, struct device_attribute *attr, char *buf)
673} 674}
674 675
675static ssize_t 676static ssize_t
676dasd_use_diag_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) 677dasd_use_diag_store(struct device *dev, struct device_attribute *attr,
678 const char *buf, size_t count)
677{ 679{
678 struct dasd_devmap *devmap; 680 struct dasd_devmap *devmap;
679 ssize_t rc; 681 ssize_t rc;
@@ -697,11 +699,11 @@ dasd_use_diag_store(struct device *dev, struct device_attribute *attr, const cha
697 return rc; 699 return rc;
698} 700}
699 701
700static 702static DEVICE_ATTR(use_diag, 0644, dasd_use_diag_show, dasd_use_diag_store);
701DEVICE_ATTR(use_diag, 0644, dasd_use_diag_show, dasd_use_diag_store);
702 703
703static ssize_t 704static ssize_t
704dasd_discipline_show(struct device *dev, struct device_attribute *attr, char *buf) 705dasd_discipline_show(struct device *dev, struct device_attribute *attr,
706 char *buf)
705{ 707{
706 struct dasd_devmap *devmap; 708 struct dasd_devmap *devmap;
707 char *dname; 709 char *dname;