aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ata.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/ata.h')
-rw-r--r--include/linux/ata.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/ata.h b/include/linux/ata.h
index b4c85e2adef5..700c5b9b3583 100644
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -1025,8 +1025,8 @@ static inline int ata_ok(u8 status)
1025 1025
1026static inline int lba_28_ok(u64 block, u32 n_block) 1026static inline int lba_28_ok(u64 block, u32 n_block)
1027{ 1027{
1028 /* check the ending block number */ 1028 /* check the ending block number: must be LESS THAN 0x0fffffff */
1029 return ((block + n_block) < ((u64)1 << 28)) && (n_block <= 256); 1029 return ((block + n_block) < ((1 << 28) - 1)) && (n_block <= 256);
1030} 1030}
1031 1031
1032static inline int lba_48_ok(u64 block, u32 n_block) 1032static inline int lba_48_ok(u64 block, u32 n_block)