Messages in this thread | | | Date | Thu, 16 Nov 2017 21:46:04 +0100 | From | Peter Zijlstra <> | Subject | Re: [RFC PATCH v11 for 4.15 01/24] Restartable sequences system call |
| |
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
| |