diff options
author | Mark Brown <broonie@kernel.org> | 2014-11-14 18:09:04 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-11-14 18:09:04 +0000 |
commit | 4f41964e046a17586c216f74f14bd97b3e5164c9 (patch) | |
tree | e0f206d1e5be4b526336c4037e74f08f1fda39ac /block | |
parent | 3251b2cdb9959eb46bd9b9fa9fb3c470eaf464b3 (diff) | |
parent | 11a266d2e5e6b73bfba337fb3ef21c8fd4fa4150 (diff) |
Merge branch 'linux-linaro-lsk-v3.14' into linux-linaro-lsk-v3.14-android
Diffstat (limited to 'block')
-rw-r--r-- | block/blk-settings.c | 4 | ||||
-rw-r--r-- | block/scsi_ioctl.c | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/block/blk-settings.c b/block/blk-settings.c index 5d21239bc859..95138e9d0ad5 100644 --- a/block/blk-settings.c +++ b/block/blk-settings.c @@ -553,7 +553,7 @@ int blk_stack_limits(struct queue_limits *t, struct queue_limits *b, bottom = max(b->physical_block_size, b->io_min) + alignment; /* Verify that top and bottom intervals line up */ - if (max(top, bottom) & (min(top, bottom) - 1)) { + if (max(top, bottom) % min(top, bottom)) { t->misaligned = 1; ret = -1; } @@ -598,7 +598,7 @@ int blk_stack_limits(struct queue_limits *t, struct queue_limits *b, /* Find lowest common alignment_offset */ t->alignment_offset = lcm(t->alignment_offset, alignment) - & (max(t->physical_block_size, t->io_min) - 1); + % max(t->physical_block_size, t->io_min); /* Verify that new alignment_offset is on a logical block boundary */ if (t->alignment_offset & (t->logical_block_size - 1)) { diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c index 26487972ac54..4044cf789c7a 100644 --- a/block/scsi_ioctl.c +++ b/block/scsi_ioctl.c @@ -489,7 +489,7 @@ int sg_scsi_ioctl(struct request_queue *q, struct gendisk *disk, fmode_t mode, if (bytes && blk_rq_map_kern(q, rq, buffer, bytes, __GFP_WAIT)) { err = DRIVER_ERROR << 24; - goto out; + goto error; } memset(sense, 0, sizeof(sense)); @@ -499,7 +499,6 @@ int sg_scsi_ioctl(struct request_queue *q, struct gendisk *disk, fmode_t mode, blk_execute_rq(q, disk, rq, 0); -out: err = rq->errors & 0xff; /* only 8 bit SCSI status */ if (err) { if (rq->sense_len && rq->sense) { |