From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934944AbdKPUqn (ORCPT ); Thu, 16 Nov 2017 15:46:43 -0500 Received: from merlin.infradead.org ([205.233.59.134]:39338 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932369AbdKPUqf (ORCPT ); Thu, 16 Nov 2017 15:46:35 -0500 Date: Thu, 16 Nov 2017 21:46:04 +0100 From: Peter Zijlstra 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 , Michael Kerrisk , Alexander Viro Subject: Re: [RFC PATCH v11 for 4.15 01/24] Restartable sequences system call 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 Content-Disposition: inline In-Reply-To: <1083699948.16848.1510864678185.JavaMail.zimbra@efficios.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@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