From: Pavel Machek <pavel@ucw.cz>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Jens Axboe <axboe@kernel.dk>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: another patch in #for-linus (was Re: [RFC] a corner case of open(2))
Date: Mon, 2 May 2016 23:48:59 +0200 [thread overview]
Message-ID: <20160502214859.GC2397@amd> (raw)
In-Reply-To: <20160427192954.GU25498@ZenIV.linux.org.uk>
Hi!
> +unsigned long iov_iter_gap_alignment(const struct iov_iter *i)
> +{
> + unsigned long res = 0;
> + size_t size = i->count;
Something is wrong with indentation here.
> + iterate_all_kinds(i, size, v,
> + (res |= (!res ? 0 : (unsigned long)v.iov_base) |
> + (size != v.iov_len ? size : 0), 0),
> + (res |= (!res ? 0 : (unsigned long)v.bv_offset) |
> + (size != v.bv_len ? size : 0)),
> + (res |= (!res ? 0 : (unsigned long)v.iov_base) |
> + (size != v.iov_len ? size : 0))
> + );
Umm. Come on. What's that? Obfuscated C code contest? Could the logic
at least be modified to (res ? ... : 0)?
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
prev parent reply other threads:[~2016-05-02 21:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-26 17:55 [RFC] a corner case of open(2) Al Viro
2016-04-26 18:05 ` Cedric Blancher
2016-04-26 18:15 ` Al Viro
2016-04-26 18:41 ` Valdis.Kletnieks
2016-04-26 19:02 ` Al Viro
2016-04-26 19:25 ` Valdis.Kletnieks
2016-04-26 20:17 ` Al Viro
2016-04-27 5:34 ` Al Viro
2016-04-27 9:33 ` Miklos Szeredi
2016-04-27 19:29 ` another patch in #for-linus (was Re: [RFC] a corner case of open(2)) Al Viro
2016-05-02 21:48 ` Pavel Machek [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160502214859.GC2397@amd \
--to=pavel@ucw.cz \
--cc=axboe@kernel.dk \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=viro@ZenIV.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox