Michael Panzlaff
a66a4e8e01
staging: pi433: Cleanup codestyle, indent statements after case labels
...
This patch changes the indentation of the statements after case labels.
The linux coding guidelines do not explicitly mentiond this but pretty
much all existing code doesn't put any statements into the same line of
their belonging case labels. Therefore this adapts to the more usual style.
Please note that there is still a lot of > 80 character lines which will
cause checkpatch warnings. This patch does not intent to fix this
already existing issue.
Signed-off-by: Michael Panzlaff <michael.panzlaff@fau.de >
Signed-off-by: Tillmann Zipperer <tillmann.zipperer@fau.de >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-01-10 19:29:34 +01:00
Valentin Vidic
3861b724de
staging: pi433: align function parameters with open parenthesis
...
Fixes checkpatch warnings:
CHECK: Alignment should match open parenthesis
Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-01-09 16:02:18 +01:00
Valentin Vidic
9ab7bc50a8
staging: pi433: replace shifting with BIT macro
...
Fixes checkpatch warnings:
CHECK: Prefer using the BIT macro
Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-01-09 15:38:48 +01:00
Derek Robson
7b4c570ee5
Staging: pi433 - fix ccheckpatch issue, updated include line.
...
Updated the include of compat.h to fix checkpatch error
Signed-off-by: Derek Robson <robsonde@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-01-08 16:33:33 +01:00
Valentin Vidic
0b9acf7ddb
staging: pi433: fix CamelCase for payload identifiers
...
Fixes checkpatch warnings:
CHECK: Avoid CamelCase: <payloadLength>
CHECK: Avoid CamelCase: <payloadReady>
Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-01-08 16:32:27 +01:00
Valentin Vidic
b167a524d2
staging: pi433: fix CamelCase for maxMinus variables
...
Fixes checkpatch warnings:
CHECK: Avoid CamelCase: <maxMinus12>
CHECK: Avoid CamelCase: <maxMinus24>
CHECK: Avoid CamelCase: <maxMinus36>
CHECK: Avoid CamelCase: <maxMinus48>
CHECK: Avoid CamelCase: <maxMinus6>
Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-01-08 16:32:23 +01:00
Marcin Ciupak
7ebee24ba1
staging: pi433: remove unused rf69_reset_flag function
...
Function rf69_reset_flag is unused and should be removed.
Signed-off-by: Marcin Ciupak <marcin.s.ciupak@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-01-08 16:30:47 +01:00
Marcin Ciupak
109fb18fcc
staging: pi433: remove unused rf69_set_sync_tolerance function
...
Function rf69_set_sync_tolerance is unused and should be removed.
Signed-off-by: Marcin Ciupak <marcin.s.ciupak@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-01-08 16:30:47 +01:00
Marcin Ciupak
f235bcfe6a
staging: pi433: remove unused rf69_set_dc_cut_off_frequency* functions
...
The following functions:
* rf69_set_dc_cut_off_frequency,
* rf69_set_dc_cut_off_frequency_intern,
* rf69_set_dc_cut_off_frequency_during_afc
are unused and should be removed along with type enum dcc_percent which
was used only by these functions.
Signed-off-by: Marcin Ciupak <marcin.s.ciupak@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2017-12-21 18:29:59 +01:00
Marcin Ciupak
9924a8339f
staging: pi433: remove unused rf69_set_ook_threshold_type function
...
Function rf69_set_ook_threshold_type is unused and should be removed
along with type enum thresholdType which was used only by that function.
Signed-off-by: Marcin Ciupak <marcin.s.ciupak@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2017-12-21 18:29:59 +01:00
Marcin Ciupak
418e175a99
staging: pi433: remove unused rf69_set_ook_threshold_step function
...
Function rf69_set_ook_threshold_step is unused and should be removed
along with type enum thresholdStep which was used only by that function.
Signed-off-by: Marcin Ciupak <marcin.s.ciupak@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2017-12-21 18:29:59 +01:00
Marcin Ciupak
b44badd30b
staging: pi433: remove unused rf69_set_rx_start_timeout function
...
Function rf69_set_rx_start_timeout is unused and should be removed.
Signed-off-by: Marcin Ciupak <marcin.s.ciupak@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2017-12-21 18:29:57 +01:00
Marcin Ciupak
68701fb146
staging: pi433: remove unused rf69_set_rssi_timeout function
...
Function rf69_set_rssi_timeout is unused and should be removed.
Signed-off-by: Marcin Ciupak <marcin.s.ciupak@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2017-12-21 18:29:57 +01:00
Marcin Ciupak
68a87a9a23
staging: pi433: remove unused rf69_get_payload_length function
...
Function rf69_get_payload_length is unused and should be removed.
Signed-off-by: Marcin Ciupak <marcin.s.ciupak@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2017-12-21 18:29:40 +01:00
Marcin Ciupak
db1bad5235
staging: pi433: make local functions static
...
Following functions:
* rf69_get_modulation
* rf69_read_reg
* rf69_write_reg
are used locally only and should be declared as static
Signed-off-by: Marcin Ciupak <marcin.s.ciupak@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2017-12-21 18:29:40 +01:00
Valentin Vidic
acf71f8dfc
staging: pi433: fix CamelCase for fifo variables
...
Fixes checkpatch warnings:
CHECK: Avoid CamelCase: <fifoEmpty>
CHECK: Avoid CamelCase: <fifoFillCondition>
CHECK: Avoid CamelCase: <fifoFull>
CHECK: Avoid CamelCase: <fifoLevel>
CHECK: Avoid CamelCase: <fifoLevelBelowThreshold>
CHECK: Avoid CamelCase: <fifoNotEmpty>
CHECK: Avoid CamelCase: <fifoOverrun>
Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2017-12-21 18:17:05 +01:00
Oliver Graute
dd1114693b
staging: pi433: pi433_write fixed the return value
...
The pi433_write function should return the number of processed bytes
Reported-by: Marcin Ciupak <marcin.s.ciupak@gmail.com >
Signed-off-by: Oliver Graute <oliver.graute@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2017-12-21 18:17:05 +01:00
Valentin Vidic
f772fa121d
staging: pi433: remove unused function
...
As it turns out rf69_get_lna_gain is not used at all.
Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2017-12-19 16:05:54 +01:00
Valentin Vidic
ebc1dea21b
staging: pi433: replace printk calls with dev_dbg
...
Fixes checkpatch warning:
WARNING: printk() should include KERN_<LEVEL> facility level
Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2017-12-19 16:05:54 +01:00
Valentin Vidic
57fa80f5b0
staging: pi433: avoid logging ENOMEM messages
...
Fixes checkpatch warning:
WARNING: Possible unnecessary 'out of memory' message
Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2017-12-19 16:05:54 +01:00
Valentin Vidic
211c282061
staging: pi433: replace unsigned with unsigned int
...
Fixes checkpatch warning:
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2017-12-19 16:05:53 +01:00
Valentin Vidic
83e3e2ef74
staging: pi433: collapse else block after return statement
...
Fixes checkpatch warning:
WARNING: else is not generally useful after a break or return
Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2017-12-19 16:05:38 +01:00
Marcus Wolf
da3761feae
Staging: Pi433: Bugfix for wrong argument for sizeof() in TX thread
...
sizeof(array) != sizeof(pointer to array)
Fixes: "staging: pi433: reduce stack size in tx thread"
Fixes: 62f39d49d1 ("staging: pi433: reduce stack size in tx thread")
Signed-off-by: Marcus Wolf <linux@wolf-entwicklungen.de >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2017-12-19 15:55:07 +01:00
Valentin Vidic
82a708e740
staging: pi433: remove multiple blank lines
...
Fixes checkpatch warning for multiple blank lines in source.
Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2017-12-19 15:14:58 +01:00
Valentin Vidic
6106cfbd05
staging: pi433: fix CamelCase for dccPercent variables
...
Fixes checkpatch warning:
CHECK: Avoid CamelCase: <dccPercent>
Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2017-12-19 15:14:58 +01:00
Greg Kroah-Hartman
7f9d04bc56
Merge 4.15-rc4 into staging-next
...
We want the staging fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2017-12-18 09:12:51 +01:00
Kari Argillander
9a38450ac3
staging: pi433: Fix disordered switch case
...
Case: SHAPING_0_5 is writing DATAMODUL_MODLATION_SHAPE_0_3 value and
vice versa
Signed-off-by: Kari Argillander <kari.argillander@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2017-12-13 13:00:31 +01:00
Valentin Vidic
2b3943b3c3
staging: pi433: remove comparison with true
...
Fixes checkpatch warning for error prone comparison.
Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2017-12-13 12:59:41 +01:00
Valentin Vidic
de71b5bd5a
staging: pi433: remove comparison with false
...
Fixes checkpatch warning for error prone comparison.
Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2017-12-13 12:59:41 +01:00
Valentin Vidic
c144df8d79
staging: pi433: add blank line after function
...
Fixes checkpatch warning for blank line after
function/struct/union/enum declarations.
Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2017-12-13 12:59:40 +01:00
Valentin Vidic
8d7ec913cf
staging: pi433: fix spelling errors in documentation
...
Fixes checkpatch warning for 'transfered' and 'devided'.
Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2017-12-13 12:59:40 +01:00
Valentin Vidic
16fdcc7b41
staging: pi433: rewrite comparison with NULL
...
Fixes checkpatch warning for comparing value with NULL.
Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2017-12-13 12:59:40 +01:00
Valentin Vidic
6bd00b5ab6
staging: pi433: remove return from a void function
...
Fixes checkpatch warning for void function return statements.
Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2017-12-13 12:58:57 +01:00
Valentin Vidic
2f58f293c2
staging: pi433: remove spaces before tabs
...
Fixes checkpatch warning for hidden spaces before tabs.
Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2017-12-13 12:58:04 +01:00
Valentin Vidic
6b167a67c6
staging: pi433: move trailing statements to next line
...
Fixes checkpatch error for trailing if statements.
Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2017-12-13 12:58:04 +01:00
Valentin Vidic
3b57c15c40
staging: pi433: use tabs for code indent
...
Fixes checkpatch error for whitespace idents.
Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2017-12-13 12:58:04 +01:00
Valentin Vidic
91086b82a0
staging: pi433: use consistent brace style
...
Fixes checkpatch error for open/close braces.
Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2017-12-13 12:58:04 +01:00
Valentin Vidic
7b15049c4d
staging: pi433: remove space inside parenthesis
...
Fixes checkpatch error for prohibited spaces.
Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2017-12-13 12:56:29 +01:00
Valentin Vidic
e27de55d0e
staging: pi433: add space around operators
...
Fixes checkpatch error for missing spaces.
Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2017-12-13 12:56:29 +01:00
Valentin Vidic
dd30cfebb8
staging: pi433: add space after comma
...
Fixes checkpatch error for missing spaces.
Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2017-12-13 12:56:29 +01:00
Valentin Vidic
2e3a641d8c
staging: pi433: add space before open parenthesis
...
Fixes checkpatch error for missing spaces.
Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2017-12-13 12:56:29 +01:00
Simon Sandström
b01c3553a9
staging: pi433: Remove unnecessary #ifdef DEBUG around dev_dbg
...
dev_dbg() already depends on DEBUG.
Signed-off-by: Simon Sandström <simon@nikanor.nu >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2017-12-13 12:53:56 +01:00
Simon Sandström
49f43ef226
staging: pi433: Remove function entry dev_dbg()
...
ftrace can be used to trace function calls, so there is no need to use
dev_dbg() here.
Signed-off-by: Simon Sandström <simon@nikanor.nu >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2017-12-13 12:53:56 +01:00
Simon Sandström
178dd42aa4
staging: pi433: Remove indentation on #ifdef blocks
...
ifdef blocks should not increase indentation level.
Signed-off-by: Simon Sandström <simon@nikanor.nu >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2017-12-13 12:53:55 +01:00
Marcin Ciupak
84f1e4b089
staging: pi433: Fix validation of rf69_get_modulation value
...
Checking of modulation in rf69_set_modulation_shaping is done by
if-else and since else part covers OOK and UNDEF values it possible to
set modulation shaping for undefined modulation type.
To fix this validation should be done by switch clause and in case of
undefined modulation error returned.
Signed-off-by: Marcin Ciupak <marcin.s.ciupak@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2017-12-08 16:36:35 +01:00
Marcin Ciupak
1c12da3576
staging: pi433: Fix missing 'undefined' value in enum modulation
...
It is possible that rf69_get_modulation() function will return
'undefined' value and this value is missing in enum modulation. Fix this
by adding appropriate entry in enum modulation.
Signed-off-by: Marcin Ciupak <marcin.s.ciupak@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2017-12-08 16:36:35 +01:00
Simon Sandström
9b65e91010
staging: pi433: Add spaces around & and + operator
...
Fixes checkpatch warning: "spaces preferred around that '&'".
Signed-off-by: Simon Sandström <simon@nikanor.nu >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2017-12-08 16:34:50 +01:00
Simon Sandström
02dd7bc27a
staging: pi433: Fix ISO-8859 encoded non-english comments
...
Some comments, like "without memcpy would be nice", are removed.
Other comments are just translated to english.
rf69.c is now plain ASCII.
Signed-off-by: Simon Sandström <simon@nikanor.nu >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2017-12-08 16:34:49 +01:00
Nguyen Phan Quang Minh
038a5b4eb3
staging: pi433: pi433_if.c remove SET_CHECKED macro
...
The macro calls its argument -a function- twice, makes the calling
function return prematurely -skipping resource cleanup code- and hurts
understandability.
Signed-off-by: Nguyen Phan Quang Minh <minhnpq16@gmail.com >
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2017-12-08 16:31:35 +01:00
Simon Sandström
54fc95a7c5
staging: pi433: Remove SET_CHECKED usage from pi433_probe
...
SET_CHECKED returns from the function on failure and in pi433_probe it is
necessary to free the GPIOs and the device on failure.
Signed-off-by: Simon Sandström <simon@nikanor.nu >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2017-12-06 22:07:23 +01:00