From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Subject: Re: [RFC PATCH v11 for 4.15 01/24] Restartable sequences system call Date: Thu, 16 Nov 2017 21:46:04 +0100 Message-ID: <20171116204604.52m63ngws7zmyuac@hirez.programming.kicks-ass.net> References: <20171114200414.2188-1-mathieu.desnoyers@efficios.com> <20171114200414.2188-2-mathieu.desnoyers@efficios.com> <20171116191448.rmds347hwsyibipm@hirez.programming.kicks-ass.net> <1083699948.16848.1510864678185.JavaMail.zimbra@efficios.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1083699948.16848.1510864678185.JavaMail.zimbra-vg+e7yoeK/dWk0Htik3J/w@public.gmane.org> Sender: linux-api-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Mathieu Desnoyers Cc: "Paul E. McKenney" , Boqun Feng , Andy Lutomirski , Dave Watson , linux-kernel , linux-api , Paul Turner , Andrew Morton , Russell King , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Andrew Hunter , Andi Kleen , Chris Lameter , Ben Maurer , rostedt , Josh Triplett , Linus Torvalds , Catalin Marinas , Will Deacon List-Id: linux-api@vger.kernel.org On Thu, Nov 16, 2017 at 08:37:58PM +0000, Mathieu Desnoyers wrote: > I usually never space-align with open parenthesis "(". Is it a coding > style requirement of the kernel for multi-line if () conditions ? Not sure, but it is the predominant pattern in most of the code. > Would the following replatement code be ok ? > > if (unlikely(flags & RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL)) { > if ((flags & (RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE > | RSEQ_CS_FLAG_NO_RESTART_ON_PREEMPT)) != > (RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE > | RSEQ_CS_FLAG_NO_RESTART_ON_PREEMPT)) > return -EINVAL; I really prefer the operator at the end, git grep "&&$" | wc -l 40708 git grep "^[[:space:]]*&&" | wc -l 3901