From: Andrew Morton Date: Wed, 5 Oct 2011 00:44:07 +0000 (+1100) Subject: dio-optimize-cache-misses-in-the-submission-path-v2-checkpatch-fixes X-Git-Tag: next-20111013~1^2~4 X-Git-Url: https://git.kernelconcepts.de/?p=karo-tx-linux.git;a=commitdiff_plain;h=012fb1402e7aab18e09bd2ef2ddd9f8318d08fbe dio-optimize-cache-misses-in-the-submission-path-v2-checkpatch-fixes ERROR: trailing whitespace #63: FILE: fs/direct-io.c:1109: +^I/* $ ERROR: trailing whitespace #80: FILE: fs/direct-io.c:1127: +^I^Iif (unlikely((addr & blocksize_mask) || $ WARNING: suspect code indent for conditional statements (24, 33) #82: FILE: fs/direct-io.c:1129: if (bdev) + blkbits = blksize_bits( ERROR: trailing whitespace #99: FILE: fs/direct-io.c:1319: +^Istruct block_device *bdev, const struct iovec *iov, loff_t offset, $ ERROR: trailing whitespace #103: FILE: fs/direct-io.c:1323: +^I/* $ ERROR: trailing whitespace #108: FILE: fs/direct-io.c:1328: +^I * $ total: 5 errors, 1 warnings, 80 lines checked NOTE: whitespace errors detected, you may wish to use scripts/cleanpatch or scripts/cleanfile ./patches/dio-optimize-cache-misses-in-the-submission-path-v2.patch has style problems, please review. If any of these errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. Please run checkpatch prior to sending patches Cc: Andi Kleen Signed-off-by: Andrew Morton --- diff --git a/fs/direct-io.c b/fs/direct-io.c index f8dcd377ded7..a05ca0555ea2 100644 --- a/fs/direct-io.c +++ b/fs/direct-io.c @@ -1102,7 +1102,7 @@ do_blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode, if (rw & WRITE) rw = WRITE_ODIRECT; - /* + /* * Avoid references to bdev if not absolutely needed to give * the early prefetch in the caller enough time. */ @@ -1120,10 +1120,10 @@ do_blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode, addr = (unsigned long)iov[seg].iov_base; size = iov[seg].iov_len; end += size; - if (unlikely((addr & blocksize_mask) || - (size & blocksize_mask))) { + if (unlikely((addr & blocksize_mask) || + (size & blocksize_mask))) { if (bdev) - blkbits = blksize_bits( + blkbits = blksize_bits( bdev_logical_block_size(bdev)); blocksize_mask = (1 << blkbits) - 1; if ((addr & blocksize_mask) || (size & blocksize_mask)) @@ -1312,16 +1312,16 @@ out: ssize_t __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode, - struct block_device *bdev, const struct iovec *iov, loff_t offset, + struct block_device *bdev, const struct iovec *iov, loff_t offset, unsigned long nr_segs, get_block_t get_block, dio_iodone_t end_io, dio_submit_t submit_io, int flags) { - /* + /* * The block device state is needed in the end to finally * submit everything. Since it's likely to be cache cold * prefetch it here as first thing to hide some of the * latency. - * + * * Attempt to prefetch the pieces we likely need later. */ prefetch(&bdev->bd_disk->part_tbl);