From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:57663 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754187AbcEBVtD (ORCPT ); Mon, 2 May 2016 17:49:03 -0400 Date: Mon, 2 May 2016 23:48:59 +0200 From: Pavel Machek To: Al Viro Cc: Jens Axboe , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Linus Torvalds Subject: Re: another patch in #for-linus (was Re: [RFC] a corner case of open(2)) Message-ID: <20160502214859.GC2397@amd> References: <20160426175538.GO25498@ZenIV.linux.org.uk> <20160427053458.GA30149@ZenIV.linux.org.uk> <20160427192954.GU25498@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160427192954.GU25498@ZenIV.linux.org.uk> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: 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