diff options
author | Mark Brown <broonie@kernel.org> | 2014-11-14 18:07:40 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-11-14 18:07:40 +0000 |
commit | 24a92c14505e9768d206ba8133054298d64103e6 (patch) | |
tree | 721bffa213dd8faff305b44dd8bfc1fa4af81c45 /block | |
parent | 71b34fd1db384bb37b092bd6d0cf1b6be4fc7c26 (diff) | |
parent | 8eb52971d4749c0192358e1942ca83d8dc7e686b (diff) |
Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-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 53309333c2f0..ec00a0f75212 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; } @@ -594,7 +594,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 a5ffcc988f0b..1b4988b4bc11 100644 --- a/block/scsi_ioctl.c +++ b/block/scsi_ioctl.c @@ -506,7 +506,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)); @@ -516,7 +516,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) { |