lkml.org 
[lkml]   [2017]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2017-11-17 17:18    [W:0.069 / U:7.884 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site