diff options
-rw-r--r-- | drivers/scsi/sg.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index f493d7fca348..d45ac4aab92f 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c | |||
@@ -98,7 +98,6 @@ static int scatter_elem_sz = SG_SCATTER_SZ; | |||
98 | static int scatter_elem_sz_prev = SG_SCATTER_SZ; | 98 | static int scatter_elem_sz_prev = SG_SCATTER_SZ; |
99 | 99 | ||
100 | #define SG_SECTOR_SZ 512 | 100 | #define SG_SECTOR_SZ 512 |
101 | #define SG_SECTOR_MSK (SG_SECTOR_SZ - 1) | ||
102 | 101 | ||
103 | static int sg_add(struct device *, struct class_interface *); | 102 | static int sg_add(struct device *, struct class_interface *); |
104 | static void sg_remove(struct device *, struct class_interface *); | 103 | static void sg_remove(struct device *, struct class_interface *); |
@@ -1723,8 +1722,8 @@ sg_build_indirect(Sg_scatter_hold * schp, Sg_fd * sfp, int buff_size) | |||
1723 | return -EFAULT; | 1722 | return -EFAULT; |
1724 | if (0 == blk_size) | 1723 | if (0 == blk_size) |
1725 | ++blk_size; /* don't know why */ | 1724 | ++blk_size; /* don't know why */ |
1726 | /* round request up to next highest SG_SECTOR_SZ byte boundary */ | 1725 | /* round request up to next highest SG_SECTOR_SZ byte boundary */ |
1727 | blk_size = (blk_size + SG_SECTOR_MSK) & (~SG_SECTOR_MSK); | 1726 | blk_size = ALIGN(blk_size, SG_SECTOR_SZ); |
1728 | SCSI_LOG_TIMEOUT(4, printk("sg_build_indirect: buff_size=%d, blk_size=%d\n", | 1727 | SCSI_LOG_TIMEOUT(4, printk("sg_build_indirect: buff_size=%d, blk_size=%d\n", |
1729 | buff_size, blk_size)); | 1728 | buff_size, blk_size)); |
1730 | 1729 | ||