commit | 6eadc61224666dcc79763dc21749b5f809d82140 | [log] [tgz] |
---|---|---|
author | Damien Le Moal <damien.lemoal@wdc.com> | Mon Apr 24 16:51:10 2017 +0900 |
committer | Martin K. Petersen <martin.petersen@oracle.com> | Mon Apr 24 19:00:29 2017 -0400 |
tree | b14107bc46373d10b1727c2b0f348de0b5ad7e50 | |
parent | 7529fbb0080d67bc45a3cdad91574cdd0f8a31cf [diff] |
scsi: sd: Improve sd_completed_bytes Re-shuffle the code to be more efficient by not initializing variables upfront (i.e. do it only when necessary). Also replace the do_div calls with calls to sectors_to_logical(). No functional change is introduced by this patch. [mkp: bytes_to_logical()] Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>