Skip to content

Commit 749701e

Browse files
akpm00sfrothwell
authored andcommitted
ipc-sem-optimize-perform_atomic_semop-checkpatch-fixes
WARNING: Missing a blank line after declarations torvalds#132: FILE: ipc/sem.c:747: + int undo = un->semadj[sop->sem_num] - sem_op; + un->semadj[sop->sem_num] = undo; ERROR: spaces required around that '?' (ctx:VxW) torvalds#142: FILE: ipc/sem.c:757: + return sop->sem_flg & IPC_NOWAIT? -EAGAIN : 1; ^ total: 1 errors, 1 warnings, 171 lines checked NOTE: For some of the reported defects, checkpatch may be able to mechanically convert to the typical style using --fix or --fix-inplace. ./patches/ipc-sem-optimize-perform_atomic_semop.patch has style problems, please review. NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. Please run checkpatch prior to sending patches Cc: Davidlohr Bueso <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 3d8c2e0 commit 749701e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ipc/sem.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -744,6 +744,7 @@ static int perform_atomic_semop(struct sem_array *sma, struct sem_queue *q)
744744

745745
if (sop->sem_flg & SEM_UNDO) {
746746
int undo = un->semadj[sop->sem_num] - sem_op;
747+
747748
un->semadj[sop->sem_num] = undo;
748749
}
749750
curr->semval += sem_op;
@@ -754,7 +755,7 @@ static int perform_atomic_semop(struct sem_array *sma, struct sem_queue *q)
754755

755756
would_block:
756757
q->blocking = sop;
757-
return sop->sem_flg & IPC_NOWAIT? -EAGAIN : 1;
758+
return sop->sem_flg & IPC_NOWAIT ? -EAGAIN : 1;
758759
}
759760

760761
static inline void wake_up_sem_queue_prepare(struct sem_queue *q, int error,

0 commit comments

Comments
 (0)