summaryrefslogtreecommitdiffstats
path: root/drivers/staging/pi433/rf69.c
Commit message (Collapse)AuthorAgeFilesLines
* Staging: pi433: Merge assignment with return valueMeghana Madhyastha2017-09-181-3/+1
| | | | | | | | | | | | | | | | | | | | Removes the unnecessary assignment of retval preceding the return statement. Detected using the following Coccinelle script: @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Meghana Madhyastha <meghana.madhyastha@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: pi433: fix spelling mistake: "preample" -> "preamble"Colin Ian King2017-08-311-1/+1
| | | | | | | Trivial fix to spelling mistake in dev_dbg message Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: pi433: replace INVALID_PARAM macro with inline codeMarcin Ciupak2017-08-181-45/+104
| | | | | | | | | | | | | | | | | | | | | | | The following macro: \#define INVALID_PARAM { \ dev_dbg(&spi->dev, "set: illegal input param"); \ return -EINVAL; \ } affects control flow by having return statement. This is against Linux Kernel Coding Style and should be avoided and therefore this macro is replaced by inline code. Additionally following 3 minor issues: ERROR: code indent should use tabs where possible ERROR: spaces required around that '!=' (ctx:VxV) ERROR: space prohibited before that close parenthesis ')' were fiexed inline. Signed-off-by: Marcin Ciupak <marcin.s.ciupak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: pi433: replace logical not with bitwiseQuentin Swain2017-08-181-1/+1
| | | | | | | | sparse reports the following warning "warning: dubious: x & !y". Replaced te logical not with bitwise to resolve the warning Signed-off-by: Quentin Swain <dudebrobro179@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: pi433: rf69.c style fix - spaces open braceMarcin Ciupak2017-08-141-1/+1
| | | | | | | | | | | This patch fixes the following checkpatch.pl error: ERROR: space required before the open brace '{' in rf69.c file as requested by TODO file. Signed-off-by: Marcin Ciupak <marcin.s.ciupak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: pi433: rf69.c style fix - else close braceMarcin Ciupak2017-08-141-2/+1
| | | | | | | | | | | This patch fixes the following checkpatch.pl error: ERROR: else should follow close brace '}' in rf69.c file as requested by TODO file. Signed-off-by: Marcin Ciupak <marcin.s.ciupak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: pi433: rf69.c style fix - that open braceMarcin Ciupak2017-08-141-22/+11
| | | | | | | | | | | | | | | | | | This patch fixes the following checkpatch.pl error: ERROR: that open brace { should be on the previous line in rf69.c file as requested by TODO file. Note: ERROR: else should follow close brace '}' remains valid here and is going to be fixed by the next patch in set. Additionally some style warnings remain valid here and could be fixed by another patch. Signed-off-by: Marcin Ciupak <marcin.s.ciupak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: pi433: style fix - space after asteriskMarcin Ciupak2017-08-141-1/+1
| | | | | | | | | | | | | | | | | This patch is intended to fix coding style issues in order to comply with kernel coding style guide as requested by TODO file. It fixes the following checkpatch.pl error: ERROR: "foo * bar" should be "foo *bar" Note: "WARNING: line over 80 characters" remains valid here and could be fixed by another patch. Signed-off-by: Marcin Ciupak <marcin.s.ciupak@gmail.com> Reviewed-by: Marcus Wolf <linux@wolf-entwicklungen.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: pi433: use div_u64 for 64-bit divisionArnd Bergmann2017-07-281-1/+1
| | | | | | | | | | | | | | | I ran into this link error on an ARM OABI build: drivers/staging/pi433/rf69.o: In function `rf69_set_frequency': rf69.c:(.text+0xc9c): undefined reference to `__udivdi3' No idea why I didn't see it with the default EABI configurations, but the right solution here seems to be to use div_u64() to get the external division implementation. Fixes: 874bcba65f9a ("staging: pi433: New driver") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: pi433: Style fix - align block commentsDerek Robson2017-07-281-4/+6
| | | | | | | | | Fixed the alignment of block comments Found using checkpatch Signed-off-by: Derek Robson <robsonde@gmail.com> Reviewed-by: Marcus Wolf <linux@wolf-entwicklungen.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: pi433: Make functions rf69_set_bandwidth_intern staticColin Ian King2017-07-281-1/+2
| | | | | | | | | | | | | The function rf69_set_bandwidth_intern is local to the source and do not need to be in global scope, so make it static. Also break overly wide line. Cleans up sparse warning: symbol 'update_share_count' was not declared. Should it be static? Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Marcus Wolf <linux@wolf-entwicklungen.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: pi433: New driverMarcus Wolf2017-07-161-0/+982
Added a driver for the pi433 radio module (see https://www.pi433.de/en.html for details). Signed-off-by: Marcus Wolf <linux@Wolf-Entwicklungen.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
OpenPOWER on IntegriCloud