]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
aio-make-aio_read_evt-more-efficient-convert-to-hrtimers-checkpatch-fixes
authorAndrew Morton <akpm@linux-foundation.org>
Tue, 26 Mar 2013 23:26:19 +0000 (10:26 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 4 Apr 2013 06:26:36 +0000 (17:26 +1100)
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>
fs/aio.c

index e75b596068e74309630f9229de3d3eeefdf53d72..3f348a45e23b136dd4222904937aea6280a57cf2 100644 (file)
--- 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)) {