summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2013-04-26 10:58:37 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2013-04-26 17:33:03 +1000
commit0d836cf6d0e6d587d30b56cd04f76c621da65a93 (patch)
treee6437dc893e646b6f6580ba979f5a2d8142dd3ee
parent81e4ba4df3a9dcf6eae7b7035a7aacc423c8bab6 (diff)
aio-make-aio_read_evt-more-efficient-convert-to-hrtimers-checkpatch-fixes
WARNING: line over 80 characters #97: FILE: fs/aio.c:775: + long avail = (head <= info->tail ? info->tail : info->nr) - head; WARNING: line over 80 characters #106: FILE: fs/aio.c:784: + ((head + AIO_EVENTS_OFFSET) % AIO_EVENTS_PER_PAGE)); WARNING: line over 80 characters #113: FILE: fs/aio.c:791: + copy_ret = copy_to_user(event + ret, ev + pos, sizeof(*ev) * avail); total: 0 errors, 3 warnings, 288 lines checked ./patches/aio-make-aio_read_evt-more-efficient-convert-to-hrtimers.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: Kent Overstreet <koverstreet@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r--fs/aio.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/aio.c b/fs/aio.c
index e75b596068e7..3f348a45e23b 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -773,23 +773,25 @@ static long aio_read_events_ring(struct kioctx *ctx,
goto out;
while (ret < nr) {
- long avail = (head <= info->tail ? info->tail : info->nr) - head;
+ long avail;
struct io_event *ev;
struct page *page;
+ avail = (head <= info->tail ? info->tail : info->nr) - head;
if (head == info->tail)
break;
avail = min(avail, nr - ret);
avail = min_t(long, avail, AIO_EVENTS_PER_PAGE -
- ((head + AIO_EVENTS_OFFSET) % AIO_EVENTS_PER_PAGE));
+ ((head + AIO_EVENTS_OFFSET) % AIO_EVENTS_PER_PAGE));
pos = head + AIO_EVENTS_OFFSET;
page = info->ring_pages[pos / AIO_EVENTS_PER_PAGE];
pos %= AIO_EVENTS_PER_PAGE;
ev = kmap(page);
- copy_ret = copy_to_user(event + ret, ev + pos, sizeof(*ev) * avail);
+ copy_ret = copy_to_user(event + ret, ev + pos,
+ sizeof(*ev) * avail);
kunmap(page);
if (unlikely(copy_ret)) {