pandora: defconfig: update
[pandora-kernel.git] / block / blk-settings.c
index fa1eb04..d55a3e4 100644 (file)
@@ -521,7 +521,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;
                }
@@ -562,7 +562,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)) {