diff options
author | Paul Mackerras <paulus@samba.org> | 2006-07-31 20:37:25 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-07-31 20:37:25 -0400 |
commit | 57cad8084e0837e0f2c97da789ec9b3f36809be9 (patch) | |
tree | e9c790afb4286f78cb08d9664f58baa7e876fe55 /drivers/s390/block | |
parent | cb18bd40030c879cd93fef02fd579f74dbab473d (diff) | |
parent | 49b1e3ea19b1c95c2f012b8331ffb3b169e4c042 (diff) |
Merge branch 'merge'
Diffstat (limited to 'drivers/s390/block')
-rw-r--r-- | drivers/s390/block/dasd_devmap.c | 8 | ||||
-rw-r--r-- | drivers/s390/block/dasd_eckd.c | 20 | ||||
-rw-r--r-- | drivers/s390/block/dasd_fba.c | 4 | ||||
-rw-r--r-- | drivers/s390/block/dasd_genhd.c | 8 | ||||
-rw-r--r-- | drivers/s390/block/dasd_ioctl.c | 2 | ||||
-rw-r--r-- | drivers/s390/block/xpram.c | 74 |
6 files changed, 38 insertions, 78 deletions
diff --git a/drivers/s390/block/dasd_devmap.c b/drivers/s390/block/dasd_devmap.c index d7295386821c..7f6fdac74706 100644 --- a/drivers/s390/block/dasd_devmap.c +++ b/drivers/s390/block/dasd_devmap.c | |||
@@ -394,7 +394,7 @@ dasd_add_busid(char *bus_id, int features) | |||
394 | if (!new) | 394 | if (!new) |
395 | return ERR_PTR(-ENOMEM); | 395 | return ERR_PTR(-ENOMEM); |
396 | spin_lock(&dasd_devmap_lock); | 396 | spin_lock(&dasd_devmap_lock); |
397 | devmap = 0; | 397 | devmap = NULL; |
398 | hash = dasd_hash_busid(bus_id); | 398 | hash = dasd_hash_busid(bus_id); |
399 | list_for_each_entry(tmp, &dasd_hashlists[hash], list) | 399 | list_for_each_entry(tmp, &dasd_hashlists[hash], list) |
400 | if (strncmp(tmp->bus_id, bus_id, BUS_ID_SIZE) == 0) { | 400 | if (strncmp(tmp->bus_id, bus_id, BUS_ID_SIZE) == 0) { |
@@ -406,10 +406,10 @@ dasd_add_busid(char *bus_id, int features) | |||
406 | new->devindex = dasd_max_devindex++; | 406 | new->devindex = dasd_max_devindex++; |
407 | strncpy(new->bus_id, bus_id, BUS_ID_SIZE); | 407 | strncpy(new->bus_id, bus_id, BUS_ID_SIZE); |
408 | new->features = features; | 408 | new->features = features; |
409 | new->device = 0; | 409 | new->device = NULL; |
410 | list_add(&new->list, &dasd_hashlists[hash]); | 410 | list_add(&new->list, &dasd_hashlists[hash]); |
411 | devmap = new; | 411 | devmap = new; |
412 | new = 0; | 412 | new = NULL; |
413 | } | 413 | } |
414 | spin_unlock(&dasd_devmap_lock); | 414 | spin_unlock(&dasd_devmap_lock); |
415 | kfree(new); | 415 | kfree(new); |
@@ -479,7 +479,7 @@ dasd_device_from_devindex(int devindex) | |||
479 | int i; | 479 | int i; |
480 | 480 | ||
481 | spin_lock(&dasd_devmap_lock); | 481 | spin_lock(&dasd_devmap_lock); |
482 | devmap = 0; | 482 | devmap = NULL; |
483 | for (i = 0; (i < 256) && !devmap; i++) | 483 | for (i = 0; (i < 256) && !devmap; i++) |
484 | list_for_each_entry(tmp, &dasd_hashlists[i], list) | 484 | list_for_each_entry(tmp, &dasd_hashlists[i], list) |
485 | if (tmp->devindex == devindex) { | 485 | if (tmp->devindex == devindex) { |
diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c index 2e655f466743..39c2281371b5 100644 --- a/drivers/s390/block/dasd_eckd.c +++ b/drivers/s390/block/dasd_eckd.c | |||
@@ -65,16 +65,16 @@ struct dasd_eckd_private { | |||
65 | /* The ccw bus type uses this table to find devices that it sends to | 65 | /* The ccw bus type uses this table to find devices that it sends to |
66 | * dasd_eckd_probe */ | 66 | * dasd_eckd_probe */ |
67 | static struct ccw_device_id dasd_eckd_ids[] = { | 67 | static struct ccw_device_id dasd_eckd_ids[] = { |
68 | { CCW_DEVICE_DEVTYPE (0x3990, 0, 0x3390, 0), driver_info: 0x1}, | 68 | { CCW_DEVICE_DEVTYPE (0x3990, 0, 0x3390, 0), .driver_info = 0x1}, |
69 | { CCW_DEVICE_DEVTYPE (0x2105, 0, 0x3390, 0), driver_info: 0x2}, | 69 | { CCW_DEVICE_DEVTYPE (0x2105, 0, 0x3390, 0), .driver_info = 0x2}, |
70 | { CCW_DEVICE_DEVTYPE (0x3880, 0, 0x3390, 0), driver_info: 0x3}, | 70 | { CCW_DEVICE_DEVTYPE (0x3880, 0, 0x3390, 0), .driver_info = 0x3}, |
71 | { CCW_DEVICE_DEVTYPE (0x3990, 0, 0x3380, 0), driver_info: 0x4}, | 71 | { CCW_DEVICE_DEVTYPE (0x3990, 0, 0x3380, 0), .driver_info = 0x4}, |
72 | { CCW_DEVICE_DEVTYPE (0x2105, 0, 0x3380, 0), driver_info: 0x5}, | 72 | { CCW_DEVICE_DEVTYPE (0x2105, 0, 0x3380, 0), .driver_info = 0x5}, |
73 | { CCW_DEVICE_DEVTYPE (0x9343, 0, 0x9345, 0), driver_info: 0x6}, | 73 | { CCW_DEVICE_DEVTYPE (0x9343, 0, 0x9345, 0), .driver_info = 0x6}, |
74 | { CCW_DEVICE_DEVTYPE (0x2107, 0, 0x3390, 0), driver_info: 0x7}, | 74 | { CCW_DEVICE_DEVTYPE (0x2107, 0, 0x3390, 0), .driver_info = 0x7}, |
75 | { CCW_DEVICE_DEVTYPE (0x2107, 0, 0x3380, 0), driver_info: 0x8}, | 75 | { CCW_DEVICE_DEVTYPE (0x2107, 0, 0x3380, 0), .driver_info = 0x8}, |
76 | { CCW_DEVICE_DEVTYPE (0x1750, 0, 0x3390, 0), driver_info: 0x9}, | 76 | { CCW_DEVICE_DEVTYPE (0x1750, 0, 0x3390, 0), .driver_info = 0x9}, |
77 | { CCW_DEVICE_DEVTYPE (0x1750, 0, 0x3380, 0), driver_info: 0xa}, | 77 | { CCW_DEVICE_DEVTYPE (0x1750, 0, 0x3380, 0), .driver_info = 0xa}, |
78 | { /* end of list */ }, | 78 | { /* end of list */ }, |
79 | }; | 79 | }; |
80 | 80 | ||
diff --git a/drivers/s390/block/dasd_fba.c b/drivers/s390/block/dasd_fba.c index 808434d38526..e85015be109b 100644 --- a/drivers/s390/block/dasd_fba.c +++ b/drivers/s390/block/dasd_fba.c | |||
@@ -44,8 +44,8 @@ struct dasd_fba_private { | |||
44 | }; | 44 | }; |
45 | 45 | ||
46 | static struct ccw_device_id dasd_fba_ids[] = { | 46 | static struct ccw_device_id dasd_fba_ids[] = { |
47 | { CCW_DEVICE_DEVTYPE (0x6310, 0, 0x9336, 0), driver_info: 0x1}, | 47 | { CCW_DEVICE_DEVTYPE (0x6310, 0, 0x9336, 0), .driver_info = 0x1}, |
48 | { CCW_DEVICE_DEVTYPE (0x3880, 0, 0x3370, 0), driver_info: 0x2}, | 48 | { CCW_DEVICE_DEVTYPE (0x3880, 0, 0x3370, 0), .driver_info = 0x2}, |
49 | { /* end of list */ }, | 49 | { /* end of list */ }, |
50 | }; | 50 | }; |
51 | 51 | ||
diff --git a/drivers/s390/block/dasd_genhd.c b/drivers/s390/block/dasd_genhd.c index 12c7d296eaa8..4c272b70f41a 100644 --- a/drivers/s390/block/dasd_genhd.c +++ b/drivers/s390/block/dasd_genhd.c | |||
@@ -84,9 +84,9 @@ void | |||
84 | dasd_gendisk_free(struct dasd_device *device) | 84 | dasd_gendisk_free(struct dasd_device *device) |
85 | { | 85 | { |
86 | del_gendisk(device->gdp); | 86 | del_gendisk(device->gdp); |
87 | device->gdp->queue = 0; | 87 | device->gdp->queue = NULL; |
88 | put_disk(device->gdp); | 88 | put_disk(device->gdp); |
89 | device->gdp = 0; | 89 | device->gdp = NULL; |
90 | } | 90 | } |
91 | 91 | ||
92 | /* | 92 | /* |
@@ -136,7 +136,7 @@ dasd_destroy_partitions(struct dasd_device * device) | |||
136 | * device->bdev to lower the offline open_count limit again. | 136 | * device->bdev to lower the offline open_count limit again. |
137 | */ | 137 | */ |
138 | bdev = device->bdev; | 138 | bdev = device->bdev; |
139 | device->bdev = 0; | 139 | device->bdev = NULL; |
140 | 140 | ||
141 | /* | 141 | /* |
142 | * See fs/partition/check.c:delete_partition | 142 | * See fs/partition/check.c:delete_partition |
@@ -145,7 +145,7 @@ dasd_destroy_partitions(struct dasd_device * device) | |||
145 | */ | 145 | */ |
146 | memset(&bpart, 0, sizeof(struct blkpg_partition)); | 146 | memset(&bpart, 0, sizeof(struct blkpg_partition)); |
147 | memset(&barg, 0, sizeof(struct blkpg_ioctl_arg)); | 147 | memset(&barg, 0, sizeof(struct blkpg_ioctl_arg)); |
148 | barg.data = &bpart; | 148 | barg.data = (void __user *) &bpart; |
149 | barg.op = BLKPG_DEL_PARTITION; | 149 | barg.op = BLKPG_DEL_PARTITION; |
150 | for (bpart.pno = device->gdp->minors - 1; bpart.pno > 0; bpart.pno--) | 150 | for (bpart.pno = device->gdp->minors - 1; bpart.pno > 0; bpart.pno--) |
151 | ioctl_by_bdev(bdev, BLKPG, (unsigned long) &barg); | 151 | ioctl_by_bdev(bdev, BLKPG, (unsigned long) &barg); |
diff --git a/drivers/s390/block/dasd_ioctl.c b/drivers/s390/block/dasd_ioctl.c index e97f5316ad2d..8fed3603e9ea 100644 --- a/drivers/s390/block/dasd_ioctl.c +++ b/drivers/s390/block/dasd_ioctl.c | |||
@@ -345,7 +345,7 @@ dasd_ioctl_set_ro(struct block_device *bdev, void __user *argp) | |||
345 | if (bdev != bdev->bd_contains) | 345 | if (bdev != bdev->bd_contains) |
346 | // ro setting is not allowed for partitions | 346 | // ro setting is not allowed for partitions |
347 | return -EINVAL; | 347 | return -EINVAL; |
348 | if (get_user(intval, (int *)argp)) | 348 | if (get_user(intval, (int __user *)argp)) |
349 | return -EFAULT; | 349 | return -EFAULT; |
350 | 350 | ||
351 | set_disk_ro(bdev->bd_disk, intval); | 351 | set_disk_ro(bdev->bd_disk, intval); |
diff --git a/drivers/s390/block/xpram.c b/drivers/s390/block/xpram.c index 4c1e56b9b98d..1140302ff11d 100644 --- a/drivers/s390/block/xpram.c +++ b/drivers/s390/block/xpram.c | |||
@@ -71,11 +71,11 @@ static int xpram_devs; | |||
71 | /* | 71 | /* |
72 | * Parameter parsing functions. | 72 | * Parameter parsing functions. |
73 | */ | 73 | */ |
74 | static int devs = XPRAM_DEVS; | 74 | static int __initdata devs = XPRAM_DEVS; |
75 | static unsigned int sizes[XPRAM_MAX_DEVS]; | 75 | static char __initdata *sizes[XPRAM_MAX_DEVS]; |
76 | 76 | ||
77 | module_param(devs, int, 0); | 77 | module_param(devs, int, 0); |
78 | module_param_array(sizes, int, NULL, 0); | 78 | module_param_array(sizes, charp, NULL, 0); |
79 | 79 | ||
80 | MODULE_PARM_DESC(devs, "number of devices (\"partitions\"), " \ | 80 | MODULE_PARM_DESC(devs, "number of devices (\"partitions\"), " \ |
81 | "the default is " __MODULE_STRING(XPRAM_DEVS) "\n"); | 81 | "the default is " __MODULE_STRING(XPRAM_DEVS) "\n"); |
@@ -86,59 +86,6 @@ MODULE_PARM_DESC(sizes, "list of device (partition) sizes " \ | |||
86 | "claimed by explicit sizes\n"); | 86 | "claimed by explicit sizes\n"); |
87 | MODULE_LICENSE("GPL"); | 87 | MODULE_LICENSE("GPL"); |
88 | 88 | ||
89 | #ifndef MODULE | ||
90 | /* | ||
91 | * Parses the kernel parameters given in the kernel parameter line. | ||
92 | * The expected format is | ||
93 | * <number_of_partitions>[","<partition_size>]* | ||
94 | * where | ||
95 | * devices is a positive integer that initializes xpram_devs | ||
96 | * each size is a non-negative integer possibly followed by a | ||
97 | * magnitude (k,K,m,M,g,G), the list of sizes initialises | ||
98 | * xpram_sizes | ||
99 | * | ||
100 | * Arguments | ||
101 | * str: substring of kernel parameter line that contains xprams | ||
102 | * kernel parameters. | ||
103 | * | ||
104 | * Result 0 on success, -EINVAL else -- only for Version > 2.3 | ||
105 | * | ||
106 | * Side effects | ||
107 | * the global variabls devs is set to the value of | ||
108 | * <number_of_partitions> and sizes[i] is set to the i-th | ||
109 | * partition size (if provided). A parsing error of a value | ||
110 | * results in this value being set to -EINVAL. | ||
111 | */ | ||
112 | static int __init xpram_setup (char *str) | ||
113 | { | ||
114 | char *cp; | ||
115 | int i; | ||
116 | |||
117 | devs = simple_strtoul(str, &cp, 10); | ||
118 | if (cp <= str || devs > XPRAM_MAX_DEVS) | ||
119 | return 0; | ||
120 | for (i = 0; (i < devs) && (*cp++ == ','); i++) { | ||
121 | sizes[i] = simple_strtoul(cp, &cp, 10); | ||
122 | if (*cp == 'g' || *cp == 'G') { | ||
123 | sizes[i] <<= 20; | ||
124 | cp++; | ||
125 | } else if (*cp == 'm' || *cp == 'M') { | ||
126 | sizes[i] <<= 10; | ||
127 | cp++; | ||
128 | } else if (*cp == 'k' || *cp == 'K') | ||
129 | cp++; | ||
130 | while (isspace(*cp)) cp++; | ||
131 | } | ||
132 | if (*cp == ',' && i >= devs) | ||
133 | PRINT_WARN("partition sizes list has too many entries.\n"); | ||
134 | else if (*cp != 0) | ||
135 | PRINT_WARN("ignored '%s' at end of parameter string.\n", cp); | ||
136 | return 1; | ||
137 | } | ||
138 | |||
139 | __setup("xpram_parts=", xpram_setup); | ||
140 | #endif | ||
141 | |||
142 | /* | 89 | /* |
143 | * Copy expanded memory page (4kB) into main memory | 90 | * Copy expanded memory page (4kB) into main memory |
144 | * Arguments | 91 | * Arguments |
@@ -357,6 +304,7 @@ static int __init xpram_setup_sizes(unsigned long pages) | |||
357 | { | 304 | { |
358 | unsigned long mem_needed; | 305 | unsigned long mem_needed; |
359 | unsigned long mem_auto; | 306 | unsigned long mem_auto; |
307 | unsigned long long size; | ||
360 | int mem_auto_no; | 308 | int mem_auto_no; |
361 | int i; | 309 | int i; |
362 | 310 | ||
@@ -374,7 +322,19 @@ static int __init xpram_setup_sizes(unsigned long pages) | |||
374 | mem_needed = 0; | 322 | mem_needed = 0; |
375 | mem_auto_no = 0; | 323 | mem_auto_no = 0; |
376 | for (i = 0; i < xpram_devs; i++) { | 324 | for (i = 0; i < xpram_devs; i++) { |
377 | xpram_sizes[i] = (sizes[i] + 3) & -4UL; | 325 | if (sizes[i]) { |
326 | size = simple_strtoull(sizes[i], &sizes[i], 0); | ||
327 | switch (sizes[i][0]) { | ||
328 | case 'g': | ||
329 | case 'G': | ||
330 | size <<= 20; | ||
331 | break; | ||
332 | case 'm': | ||
333 | case 'M': | ||
334 | size <<= 10; | ||
335 | } | ||
336 | xpram_sizes[i] = (size + 3) & -4UL; | ||
337 | } | ||
378 | if (xpram_sizes[i]) | 338 | if (xpram_sizes[i]) |
379 | mem_needed += xpram_sizes[i]; | 339 | mem_needed += xpram_sizes[i]; |
380 | else | 340 | else |