Skip to content

signal: coding style wankery...

Joe Perches lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest16 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/16signal: whitespace neateningkernel/signal.c+87 -870 replies
2/16signal: vertical line neateningkernel/signal.c+25 -20 replies
3/16signal: Move EXPORT_SYMBOL after function definitionkernel/signal.c+9 -100 replies
4/16signal: Use pr_<level>kernel/signal.c+8 -110 replies
5/16signal: Move case statements to separate lines and for loop neateningkernel/signal.c+9 -40 replies
6/16signal: Use consistent function definition stylekernel/signal.c+92 -610 replies
7/16signal: Add braceskernel/signal.c+8 -70 replies
8/16signal: Remove unnecessary returnkernel/signal.c+0 -10 replies
9/16signal: Use include <linux not <asmkernel/signal.c+1 -10 replies
10/16signal: Remove unnecessary parentheses from function pointer callkernel/signal.c+1 -10 replies
11/16signal: Add parenthese around sizeof argumentkernel/signal.c+1 -10 replies
12/16signal: 80 column wrappingkernel/signal.c+23 -130 replies
13/16signal: Move label to first columnkernel/signal.c+1 -10 replies
14/16signal: Convert for (;;) to do {} whilekernel/signal.c+7 -70 replies
15/16signal: Isolate returns by adding blank lineskernel/signal.c+41 -110 replies
16/16signal: Coalesce kdb_printf formatskernel/signal.c+5 -100 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [UNNECESSARY PATCH 00/16] signal: coding style wankery...

This is intended to be instructive for Ionet Alexa. All these patches are almost totally unnecessary.

Converting a bunch of issues all at the same time makes for very difficult reviewing. Separating the changes into individual patches can make verifying and accepting the changes easier.

If signal.c was changed just neatening purposes, this is how I think it should be done.

Even if these patches were applied, there would still checkpatch messages that are and should be ignored because:

o logic there shouldn't be changed
o 80 column warnings don't have to be fixed
o checkpatch is just a brainless little script

ie:

before the patches:

$ ./scripts/checkpatch.pl -f --strict kernel/signal.c
[...]
total: 53 errors, 99 warnings, 37 checks, 3674 lines checked

after:

$ ./scripts/checkpatch.pl -f --strict kernel/signal.c
WARNING: line over 80 characters
#596: FILE: kernel/signal.c:596:
+				if (!current->notifier(current->notifier_data)) {

WARNING: else is not generally useful after a break or return #948: FILE: kernel/signal.c:948:
+ return;
+ } else {

CHECK: architecture specific defines should be avoided #1152: FILE: kernel/signal.c:1152:
+#if defined(__i386__) && !defined(__arch_um__)

CHECK: __setup appears un-documented -- check Documentation/kernel-parameters.txt #1179: FILE: kernel/signal.c:1179:
+__setup("print-fatal-signals=", setup_print_fatal_signals);

WARNING: line over 80 characters
#1452: FILE: kernel/signal.c:1452:
+ pid ? find_vpid(-pid) : task_pgrp(current));

WARNING: else is not generally useful after a break or return #2105: FILE: kernel/signal.c:2105:
+ return true;
+ } else {

WARNING: line over 80 characters
#3753: FILE: kernel/signal.c:3753:
+ kdb_printf("Process is not RUNNING, sending a signal from kdb risks deadlock on the run queue locks. The signal has _not_ been sent.\n"

total: 0 errors, 5 warnings, 2 checks, 3764 lines checked

Joe Perches (16):
signal: whitespace neatening
signal: vertical line neatening
signal: Move EXPORT_SYMBOL after function definition
signal: Use pr_<level>
signal: Move case statements to separate lines and for loop neatening
signal: Use consistent function definition style
signal: Add braces
signal: Remove unnecessary return
signal: Use include <linux not <asm
signal: Remove unnecessary parentheses from function pointer call
signal: Add parenthese around sizeof argument
signal: 80 column wrapping
signal: Move label to first column
signal: Convert for (;;) to do {} while
signal: Isolate returns by adding blank lines
signal: Coalesce kdb_printf formats

 kernel/signal.c | 528 +++++++++++++++++++++++++++++++++-----------------------
 1 file changed, 309 insertions(+), 219 deletions(-)
Signature · 1 line
2.1.2