[PATCH 8/8] staging: kpc2000: remove needless 'break'

2019-06-26 Thread Fabian Krueger
The unconditioned jump will prohibit to ever reach the break-statement. Deleting this needless statement, the code becomes more understandable. Signed-off-by: Fabian Krueger Signed-off-by: Michael Scheiderer Cc: --- drivers/staging/kpc2000/kpc2000_spi.c | 1 - 1 file changed, 1 deletion

[PATCH 6/8] staging: kpc2000: introduce 'unsigned int'

2019-06-26 Thread Fabian Krueger
Replaced 'unsigned' with it's equivalent 'unsigned int' to reduce confusion while reading the code. Signed-off-by: Fabian Krueger Signed-off-by: Michael Scheiderer Cc: --- drivers/staging/kpc2000/kpc2000_spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers

[PATCH 7/8] staging: kpc2000: introduce __func__

2019-06-26 Thread Fabian Krueger
Instead of using the function name hard coded as string, using __func__ and the '%s'-placeholder will always give the current name of the function. When renaming a function, the debugging-messages won't have to be rewritten. Signed-off-by: Fabian Krueger Signed-off-by: Michael Scheiderer Cc

[PATCH 5/8] staging: kpc2000: add spaces

2019-06-26 Thread Fabian Krueger
Added spaces on the left side of parenthesis and on both sides of binary operators. Also realigned else and else if so it matches the parenthesis line. This refactoring makes the code more readable. Signed-off-by: Fabian Krueger Signed-off-by: Michael Scheiderer Cc: --- drivers/staging

[PATCH 4/8] staging: kpc2000: remove unnecessary brackets

2019-06-26 Thread Fabian Krueger
Removed brackets on around one-lined if-cases. This refactoring makes the code more readable. Signed-off-by: Fabian Krueger Signed-off-by: Michael Scheiderer Cc: --- drivers/staging/kpc2000/kpc2000_spi.c | 30 +-- 1 file changed, 10 insertions(+), 20 deletions(-) diff

[PATCH 3/8] staging: kpc2000: introduce usage of __packed

2019-06-26 Thread Fabian Krueger
Replaced __attribute__((packed)) with __packed. Both ways of attributing are equivalent, but being shorter, __packed should be preferred. This refactoring makes the core more readable. Signed-off-by: Fabian Krueger Signed-off-by: Michael Scheiderer Cc: --- drivers/staging/kpc2000

[PATCH 2/8] staging: kpc2000: blank lines after declaration

2019-06-26 Thread Fabian Krueger
After the declarations in a function, there should be a blank line, so that the declaration part is visibly separated from the rest. This refactoring makes the code more readable. Signed-off-by: Fabian Krueger Signed-off-by: Michael Scheiderer Cc: --- drivers/staging/kpc2000/kpc2000_spi.c | 4

[PATCH 0/8] staging: kpc2000: style refactoring

2019-06-26 Thread Fabian Krueger
A patch-series that will remove warnings, errors and check-messages, noted and highlighted by the checkpatch.pl script concerning kpc2000_spi.c. Signed-off-by: Fabian Krueger Signed-off-by: Michael Scheiderer Cc: Fabian Krueger (8): staging: kpc2000: add line breaks staging: kpc2000

[PATCH 1/8] staging: kpc2000: add line breaks

2019-06-26 Thread Fabian Krueger
To fix some checkpatch-warnings some lines of this module had to be shortened so that they do not exceed 80 characters per line. This refactoring makes the code more readable. Signed-off-by: Fabian Krueger Signed-off-by: Michael Scheiderer Cc: --- drivers/staging/kpc2000/kpc2000_spi.c | 34

[PATCH 6/8] staging: kpc2000: introduce 'unsigned int'

2019-06-25 Thread Fabian Krueger
Replaced 'unsigned' with it's equivalent 'unsigned int' to reduce confusion while reading the code. Signed-off-by: Fabian Krueger Signed-off-by: Michael Scheiderer --- drivers/staging/kpc2000/kpc2000_spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging

[PATCH 4/8] staging: kpc2000: add spaces

2019-06-25 Thread Fabian Krueger
Added spaces on the left side of parenthesis and on both sides of binary operators. This refactoring makes the code more readable. Signed-off-by: Fabian Krueger Signed-off-by: Michael Scheiderer --- drivers/staging/kpc2000/kpc2000_spi.c | 15 ++- 1 file changed, 6 insertions(+), 9

[PATCH 3/8] staging: kpc2000: introduce usage of __packed

2019-06-25 Thread Fabian Krueger
Replaced __attribute__((packed)) with __packed. Both ways of attributing are equivalent, but being shorter, __packed should be preferred. This refactoring makes the core more readable. Signed-off-by: Fabian Krueger Signed-off-by: Michael Scheiderer --- drivers/staging/kpc2000/kpc2000_spi.c | 6

[PATCH 2/8] staging: kpc2000: blank lines after declaration

2019-06-25 Thread Fabian Krueger
After the declarations in a function, there should be a blank line, so that the declaration part is visibly separated from the rest. This refactoring makes the code more readable. Signed-off-by: Fabian Krueger Signed-off-by: Michael Scheiderer --- drivers/staging/kpc2000/kpc2000_spi.c | 4

[PATCH 5/8] staging: kpc2000: remove unnecessary brackets

2019-06-25 Thread Fabian Krueger
Removed brackets on around one-lined if-cases. This refactoring makes the code more readable. Signed-off-by: Fabian Krueger Signed-off-by: Michael Scheiderer --- drivers/staging/kpc2000/kpc2000_spi.c | 27 +-- 1 file changed, 9 insertions(+), 18 deletions(-) diff --git

[PATCH 8/8] staging: kpc2000: remove needless 'break'

2019-06-25 Thread Fabian Krueger
The unconditioned jump will prohibit to ever reach the break-statement. Deleting this needless statement, the code becomes more understandable. Signed-off-by: Fabian Krueger Signed-off-by: Michael Scheiderer --- drivers/staging/kpc2000/kpc2000_spi.c | 1 - 1 file changed, 1 deletion(-) diff

[PATCH 1/8] staging: kpc2000: add line breaks

2019-06-25 Thread Fabian Krueger
To fix some checkpatch-warnings some lines of this module had to be shortened so that they do not exceed 80 characters per line. This refactoring makes the code more readable. Signed-off-by: Fabian Krueger Signed-off-by: Michael Scheiderer Cc: --- drivers/staging/kpc2000/kpc2000_spi.c | 77

[PATCH 0/8] staging: kpc2000: style refactoring

2019-06-25 Thread Fabian Krueger
A patch-series that will remove warnings, errors and check-messages, noted and highlighted by the checkpatch.pl script concerning kpc2000_spi.c. Signed-off-by: Fabian Krueger Signed-off-by: Michael Scheiderer Cc: Fabian Krueger (8): staging: kpc2000: add line breaks staging: kpc2000

[PATCH 7/8] staging: kpc2000: introduce __func__

2019-06-25 Thread Fabian Krueger
Instead of using the function name hard coded as string, using __func__ and the '%s'-placeholder will always give the current name of the function. When renaming a function, the debugging-messages won't have to be rewritten. Signed-off-by: Fabian Krueger Signed-off-by: Michael Scheiderer