diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-07-22 13:06:33 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-07-22 13:06:33 -0400 |
commit | bb184d11ffd015e67e5334e5a88bec2e00be5c20 (patch) | |
tree | 367ee0d4edd1c463de91e80024cc488e76b34900 | |
parent | 1f9758d4e7b3d5db638c728b54de2faa2a01f292 (diff) | |
parent | 4fbfff76079a5c0e1751b0ddf53160d33f7831e7 (diff) |
Merge branch 'tj-block-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc
* 'tj-block-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc:
virtio_blk: mark virtio_blk with __refdata to kill spurious section mismatch
block: sysfs fix mismatched queue_var_{store,show} in 64bit kernel
ataflop: adjust NULL test
block: fix failfast merge testing in elv_rq_merge_ok()
z2ram: Small cleanup for z2ram.c
-rw-r--r-- | block/blk-sysfs.c | 11 | ||||
-rw-r--r-- | block/elevator.c | 13 | ||||
-rw-r--r-- | drivers/block/ataflop.c | 2 | ||||
-rw-r--r-- | drivers/block/virtio_blk.c | 7 | ||||
-rw-r--r-- | drivers/block/z2ram.c | 2 |
5 files changed, 23 insertions, 12 deletions
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c index b1cd04087d6a..418d63619680 100644 --- a/block/blk-sysfs.c +++ b/block/blk-sysfs.c | |||
@@ -16,9 +16,9 @@ struct queue_sysfs_entry { | |||
16 | }; | 16 | }; |
17 | 17 | ||
18 | static ssize_t | 18 | static ssize_t |
19 | queue_var_show(unsigned int var, char *page) | 19 | queue_var_show(unsigned long var, char *page) |
20 | { | 20 | { |
21 | return sprintf(page, "%d\n", var); | 21 | return sprintf(page, "%lu\n", var); |
22 | } | 22 | } |
23 | 23 | ||
24 | static ssize_t | 24 | static ssize_t |
@@ -77,7 +77,8 @@ queue_requests_store(struct request_queue *q, const char *page, size_t count) | |||
77 | 77 | ||
78 | static ssize_t queue_ra_show(struct request_queue *q, char *page) | 78 | static ssize_t queue_ra_show(struct request_queue *q, char *page) |
79 | { | 79 | { |
80 | int ra_kb = q->backing_dev_info.ra_pages << (PAGE_CACHE_SHIFT - 10); | 80 | unsigned long ra_kb = q->backing_dev_info.ra_pages << |
81 | (PAGE_CACHE_SHIFT - 10); | ||
81 | 82 | ||
82 | return queue_var_show(ra_kb, (page)); | 83 | return queue_var_show(ra_kb, (page)); |
83 | } | 84 | } |
@@ -189,9 +190,9 @@ static ssize_t queue_nomerges_store(struct request_queue *q, const char *page, | |||
189 | 190 | ||
190 | static ssize_t queue_rq_affinity_show(struct request_queue *q, char *page) | 191 | static ssize_t queue_rq_affinity_show(struct request_queue *q, char *page) |
191 | { | 192 | { |
192 | unsigned int set = test_bit(QUEUE_FLAG_SAME_COMP, &q->queue_flags); | 193 | bool set = test_bit(QUEUE_FLAG_SAME_COMP, &q->queue_flags); |
193 | 194 | ||
194 | return queue_var_show(set != 0, page); | 195 | return queue_var_show(set, page); |
195 | } | 196 | } |
196 | 197 | ||
197 | static ssize_t | 198 | static ssize_t |
diff --git a/block/elevator.c b/block/elevator.c index 6f2375339a99..2d511f9105e1 100644 --- a/block/elevator.c +++ b/block/elevator.c | |||
@@ -101,11 +101,16 @@ int elv_rq_merge_ok(struct request *rq, struct bio *bio) | |||
101 | return 0; | 101 | return 0; |
102 | 102 | ||
103 | /* | 103 | /* |
104 | * Don't merge if failfast settings don't match | 104 | * Don't merge if failfast settings don't match. |
105 | * | ||
106 | * FIXME: The negation in front of each condition is necessary | ||
107 | * because bio and request flags use different bit positions | ||
108 | * and the accessors return those bits directly. This | ||
109 | * ugliness will soon go away. | ||
105 | */ | 110 | */ |
106 | if (bio_failfast_dev(bio) != blk_failfast_dev(rq) || | 111 | if (!bio_failfast_dev(bio) != !blk_failfast_dev(rq) || |
107 | bio_failfast_transport(bio) != blk_failfast_transport(rq) || | 112 | !bio_failfast_transport(bio) != !blk_failfast_transport(rq) || |
108 | bio_failfast_driver(bio) != blk_failfast_driver(rq)) | 113 | !bio_failfast_driver(bio) != !blk_failfast_driver(rq)) |
109 | return 0; | 114 | return 0; |
110 | 115 | ||
111 | if (!elv_iosched_allow_merge(rq, bio)) | 116 | if (!elv_iosched_allow_merge(rq, bio)) |
diff --git a/drivers/block/ataflop.c b/drivers/block/ataflop.c index f5e7180d7f47..3ff02941b3dd 100644 --- a/drivers/block/ataflop.c +++ b/drivers/block/ataflop.c | |||
@@ -1627,7 +1627,7 @@ static int fd_ioctl(struct block_device *bdev, fmode_t mode, | |||
1627 | drive, dtp->blocks, dtp->spt, dtp->stretch); | 1627 | drive, dtp->blocks, dtp->spt, dtp->stretch); |
1628 | 1628 | ||
1629 | /* sanity check */ | 1629 | /* sanity check */ |
1630 | if (!dtp || setprm.track != dtp->blocks/dtp->spt/2 || | 1630 | if (setprm.track != dtp->blocks/dtp->spt/2 || |
1631 | setprm.head != 2) { | 1631 | setprm.head != 2) { |
1632 | redo_fd_request(); | 1632 | redo_fd_request(); |
1633 | return -EINVAL; | 1633 | return -EINVAL; |
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index fbeefb68a31f..aa1a3d5a3e2b 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c | |||
@@ -427,7 +427,12 @@ static unsigned int features[] = { | |||
427 | VIRTIO_BLK_F_SCSI, VIRTIO_BLK_F_IDENTIFY | 427 | VIRTIO_BLK_F_SCSI, VIRTIO_BLK_F_IDENTIFY |
428 | }; | 428 | }; |
429 | 429 | ||
430 | static struct virtio_driver virtio_blk = { | 430 | /* |
431 | * virtio_blk causes spurious section mismatch warning by | ||
432 | * simultaneously referring to a __devinit and a __devexit function. | ||
433 | * Use __refdata to avoid this warning. | ||
434 | */ | ||
435 | static struct virtio_driver __refdata virtio_blk = { | ||
431 | .feature_table = features, | 436 | .feature_table = features, |
432 | .feature_table_size = ARRAY_SIZE(features), | 437 | .feature_table_size = ARRAY_SIZE(features), |
433 | .driver.name = KBUILD_MODNAME, | 438 | .driver.name = KBUILD_MODNAME, |
diff --git a/drivers/block/z2ram.c b/drivers/block/z2ram.c index 4575171e5beb..b2590409f25e 100644 --- a/drivers/block/z2ram.c +++ b/drivers/block/z2ram.c | |||
@@ -374,7 +374,7 @@ err: | |||
374 | static void __exit z2_exit(void) | 374 | static void __exit z2_exit(void) |
375 | { | 375 | { |
376 | int i, j; | 376 | int i, j; |
377 | blk_unregister_region(MKDEV(Z2RAM_MAJOR, 0), 256); | 377 | blk_unregister_region(MKDEV(Z2RAM_MAJOR, 0), Z2MINOR_COUNT); |
378 | unregister_blkdev(Z2RAM_MAJOR, DEVICE_NAME); | 378 | unregister_blkdev(Z2RAM_MAJOR, DEVICE_NAME); |
379 | del_gendisk(z2ram_gendisk); | 379 | del_gendisk(z2ram_gendisk); |
380 | put_disk(z2ram_gendisk); | 380 | put_disk(z2ram_gendisk); |