summaryrefslogtreecommitdiffstats
path: root/drivers/staging/pi433
Commit message (Collapse)AuthorAgeFilesLines
* staging: pi433: Cleanup codestyle, indent statements after case labelsMichael Panzlaff2018-01-101-79/+158
| | | | | | | | | | | | | | | 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>
* staging: pi433: align function parameters with open parenthesisValentin Vidic2018-01-091-5/+5
| | | | | | | | | 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>
* staging: pi433: replace shifting with BIT macroValentin Vidic2018-01-091-1/+1
| | | | | | | | | 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>
* Staging: pi433 - fix ccheckpatch issue, updated include line.Derek Robson2018-01-081-1/+1
| | | | | | | 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>
* staging: pi433: fix CamelCase for payload identifiersValentin Vidic2018-01-084-6/+6
| | | | | | | | | | 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>
* staging: pi433: fix CamelCase for maxMinus variablesValentin Vidic2018-01-083-17/+17
| | | | | | | | | | | | | 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>
* staging: pi433: remove unused rf69_reset_flag functionMarcin Ciupak2018-01-082-13/+0
| | | | | | | 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>
* staging: pi433: remove unused rf69_set_sync_tolerance functionMarcin Ciupak2018-01-082-13/+0
| | | | | | | 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>
* staging: pi433: remove unused rf69_set_dc_cut_off_frequency* functionsMarcin Ciupak2017-12-213-41/+0
| | | | | | | | | | | | 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>
* staging: pi433: remove unused rf69_set_ook_threshold_type functionMarcin Ciupak2017-12-213-19/+0
| | | | | | | | 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>
* staging: pi433: remove unused rf69_set_ook_threshold_step functionMarcin Ciupak2017-12-213-29/+0
| | | | | | | | 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>
* staging: pi433: remove unused rf69_set_rx_start_timeout functionMarcin Ciupak2017-12-212-8/+0
| | | | | | | 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>
* staging: pi433: remove unused rf69_set_rssi_timeout functionMarcin Ciupak2017-12-212-8/+0
| | | | | | | 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>
* staging: pi433: remove unused rf69_get_payload_length functionMarcin Ciupak2017-12-212-6/+0
| | | | | | | 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>
* staging: pi433: make local functions staticMarcin Ciupak2017-12-212-50/+47
| | | | | | | | | | | 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>
* staging: pi433: fix CamelCase for fifo variablesValentin Vidic2017-12-214-34/+34
| | | | | | | | | | | | | | | 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>
* staging: pi433: pi433_write fixed the return valueOliver Graute2017-12-211-1/+1
| | | | | | | | 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>
* staging: pi433: remove unused functionValentin Vidic2017-12-192-19/+0
| | | | | | | 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>
* staging: pi433: replace printk calls with dev_dbgValentin Vidic2017-12-191-2/+2
| | | | | | | | | 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>
* staging: pi433: avoid logging ENOMEM messagesValentin Vidic2017-12-191-3/+1
| | | | | | | | | 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>
* staging: pi433: replace unsigned with unsigned intValentin Vidic2017-12-191-1/+1
| | | | | | | | | 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>
* staging: pi433: collapse else block after return statementValentin Vidic2017-12-191-7/+7
| | | | | | | | | 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>
* Staging: Pi433: Bugfix for wrong argument for sizeof() in TX threadMarcus Wolf2017-12-191-7/+6
| | | | | | | | | sizeof(array) != sizeof(pointer to array) Fixes: "staging: pi433: reduce stack size in tx thread" Fixes: 62f39d49d168 ("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>
* staging: pi433: remove multiple blank linesValentin Vidic2017-12-194-25/+0
| | | | | | | 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>
* staging: pi433: fix CamelCase for dccPercent variablesValentin Vidic2017-12-193-27/+27
| | | | | | | | | 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>
* Merge 4.15-rc4 into staging-nextGreg Kroah-Hartman2017-12-181-1/+1
|\ | | | | | | | | | | We want the staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging: pi433: Fixes issue with bit shift in rf69_get_modulationMarcus Wolf2017-12-061-1/+1
| | | | | | | | | | | | | | Fixes issue with bit shift in rf69_get_modulation Signed-off-by: Marcus Wolf <linux@wolf-entwicklungen.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: pi433: Fix disordered switch caseKari Argillander2017-12-131-2/+2
| | | | | | | | | | | | | | | | 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>
* | staging: pi433: remove comparison with trueValentin Vidic2017-12-131-1/+1
| | | | | | | | | | | | | | 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>
* | staging: pi433: remove comparison with falseValentin Vidic2017-12-131-1/+1
| | | | | | | | | | | | | | 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>
* | staging: pi433: add blank line after functionValentin Vidic2017-12-131-0/+1
| | | | | | | | | | | | | | | | 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>
* | staging: pi433: fix spelling errors in documentationValentin Vidic2017-12-131-2/+2
| | | | | | | | | | | | | | 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>
* | staging: pi433: rewrite comparison with NULLValentin Vidic2017-12-131-2/+2
| | | | | | | | | | | | | | 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>
* | staging: pi433: remove return from a void functionValentin Vidic2017-12-131-1/+0
| | | | | | | | | | | | | | 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>
* | staging: pi433: remove spaces before tabsValentin Vidic2017-12-133-4/+4
| | | | | | | | | | | | | | 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>
* | staging: pi433: move trailing statements to next lineValentin Vidic2017-12-131-14/+31
| | | | | | | | | | | | | | 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>
* | staging: pi433: use tabs for code indentValentin Vidic2017-12-132-20/+20
| | | | | | | | | | | | | | Fixes checkpatch error for whitespace idents. Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: pi433: use consistent brace styleValentin Vidic2017-12-131-88/+41
| | | | | | | | | | | | | | 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>
* | staging: pi433: remove space inside parenthesisValentin Vidic2017-12-133-21/+21
| | | | | | | | | | | | | | Fixes checkpatch error for prohibited spaces. Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: pi433: add space around operatorsValentin Vidic2017-12-131-5/+4
| | | | | | | | | | | | | | Fixes checkpatch error for missing spaces. Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: pi433: add space after commaValentin Vidic2017-12-131-2/+2
| | | | | | | | | | | | | | Fixes checkpatch error for missing spaces. Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: pi433: add space before open parenthesisValentin Vidic2017-12-131-2/+2
| | | | | | | | | | | | | | Fixes checkpatch error for missing spaces. Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: pi433: Remove unnecessary #ifdef DEBUG around dev_dbgSimon Sandström2017-12-131-4/+0
| | | | | | | | | | | | | | dev_dbg() already depends on DEBUG. Signed-off-by: Simon Sandström <simon@nikanor.nu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: pi433: Remove function entry dev_dbg()Simon Sandström2017-12-131-156/+0
| | | | | | | | | | | | | | | | 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>
* | staging: pi433: Remove indentation on #ifdef blocksSimon Sandström2017-12-131-161/+153
| | | | | | | | | | | | | | 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>
* | staging: pi433: Fix validation of rf69_get_modulation valueMarcin Ciupak2017-12-081-2/+6
| | | | | | | | | | | | | | | | | | | | | | 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>
* | staging: pi433: Fix missing 'undefined' value in enum modulationMarcin Ciupak2017-12-082-2/+3
| | | | | | | | | | | | | | | | | | 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>
* | staging: pi433: Add spaces around & and + operatorSimon Sandström2017-12-081-15/+14
| | | | | | | | | | | | | | 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>
* | staging: pi433: Fix ISO-8859 encoded non-english commentsSimon Sandström2017-12-081-5/+6
| | | | | | | | | | | | | | | | | | 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>
* | staging: pi433: pi433_if.c remove SET_CHECKED macroNguyen Phan Quang Minh2017-12-081-54/+139
| | | | | | | | | | | | | | | | | | | | 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>