Merge branch 'bkl/procfs' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic...
[linux-2.6-block.git] / include / linux / ata.h
index b4c85e2adef5e494d76a1c9a670ad22111e5c85b..700c5b9b358303a721dc1879b0df120f4eeb3176 100644 (file)
@@ -1025,8 +1025,8 @@ static inline int ata_ok(u8 status)
 
 static inline int lba_28_ok(u64 block, u32 n_block)
 {
-       /* check the ending block number */
-       return ((block + n_block) < ((u64)1 << 28)) && (n_block <= 256);
+       /* check the ending block number: must be LESS THAN 0x0fffffff */
+       return ((block + n_block) < ((1 << 28) - 1)) && (n_block <= 256);
 }
 
 static inline int lba_48_ok(u64 block, u32 n_block)