[PATCH v2 3/8] staging: bcm2835-audio: Remove whitespace before quoted newline

2017-02-07 Thread Simon Sandström
Fixes checkpatch warning "unnecessary whitespace before a quoted newline". Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/bcm2835-audio/bcm2835.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/bcm2835-audio/bcm2835.c b

[PATCH v2 4/8] staging: bcm2835-audio: Move open brace to correct line

2017-02-07 Thread Simon Sandström
Fixes checkpatch error "open brace { should be on the previous line". Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/bcm2835-audio/bcm2835.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/bcm2835-audio/bcm2835.c b

[PATCH v2 5/8] staging: bcm2835-audio: Simplify bcm2835_alsa_device_init()

2017-02-07 Thread Simon Sandström
Fixes checkpatch warning "Missing a blank line after declarations". Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/bcm2835-audio/bcm2835.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/staging/bcm2835-audio/bcm2

[PATCH v2 8/8] staging: bcm2835-audio: Remove unnecessary space after cast

2017-02-07 Thread Simon Sandström
Fixes checkpatch check "No space is necessary after a cast". Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/bcm2835-audio/bcm2835.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/bcm2835-audio/bcm2835.c b/drivers/stagi

[PATCH v2 6/8] staging: bcm2835-audio: Fix argument indentation

2017-02-07 Thread Simon Sandström
Fixes checkpatch CHECK: "Alignment should match open parenthesis". Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/bcm2835-audio/bcm2835.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/bcm2835-audio/bcm2

[PATCH v2 7/8] staging: bcm2835-audio: Rewrite comparison to NULL

2017-02-07 Thread Simon Sandström
Fixes checkpatch check "Comparison to NULL could be written '!chip'". Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/bcm2835-audio/bcm2835.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/bcm2835-audio/bcm2835.c b

[PATCH v2 2/8] staging: bcm2835-audio: Remove incorrect whitespace

2017-02-07 Thread Simon Sandström
According to the coding style, "bcm2835_ship ** rchip" should be "bcm2835 **rchip". Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/bcm2835-audio/bcm2835.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/bcm2835-

[PATCH v2 0/8] staging: bcm2835-audio: Fix various checkpatch warnings

2017-02-07 Thread Simon Sandström
Fixes multiple checkpatch errors and warnings in bcm2835.c. Changes in v2: * Separated v1 patch into multiple smaller patches. Simon Sandström (8): staging: bcm2835-audio: Remove static initialisation staging: bcm2835-audio: Remove incorrect whitespace staging: bcm2835-audio: Remove

[PATCH v2 1/8] staging: bcm2835-audio: Remove static initialisation

2017-02-07 Thread Simon Sandström
Static pointers are explicility initialised to NULL. Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/bcm2835-audio/bcm2835.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/bcm2835-audio/bcm2835.c b/drivers/staging/bcm2835

[PATCH] staging: bcm2835-audio: Fix various checkpatch warnings

2017-02-06 Thread Simon Sandström
Fix following warnings in bcm2835.c: * Do not initialise statics to NULL. * Unnecessary whitespace before a quoted newline. * Open brace { on wrong line. Fix 'Missing blank line after declarations' by simplifying bcm2835_alsa_device_init(). Signed-off-by: Simon Sandström <si...@nikanor

[PATCH] staging: bcm2835-audio: Make internal symbols static

2017-02-10 Thread Simon Sandström
Fixes sparse warnings: warning: symbol 'xxx' was not declared. Should it be static? Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/bcm2835-audio/bcm2835-vchiq.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/bcm2835

[PATCH 0/6] Fix additional alignment issues in staging/ccree

2017-07-18 Thread Simon Sandström
. - Simon --- Simon Sandström (6): staging: ccree: Fix alignment issues in ssi_aead.c staging: ccree: Fix alignment issues in ssi_hash.c staging: ccree: Fix alignment issues in ssi_buffer_mgr.c staging: ccree: Fix alignment issues in ssi_cipher.c staging: ccree: Fix alignment issues

[PATCH 1/6] staging: ccree: Fix alignment issues in ssi_aead.c

2017-07-18 Thread Simon Sandström
Fixes checkpatch.pl alignment warnings. Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/ccree/ssi_aead.c | 47 +--- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/drivers/staging/ccree/ssi_aead.c b/drivers/staging

[PATCH 4/6] staging: ccree: Fix alignment issues in ssi_cipher.c

2017-07-18 Thread Simon Sandström
Fixes checkpatch.pl alignment warnings. Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/ccree/ssi_cipher.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/ccree/ssi_cipher.c b/drivers/staging/ccree/ssi_cipher.c index bfe9b1

[PATCH 2/6] staging: ccree: Fix alignment issues in ssi_hash.c

2017-07-18 Thread Simon Sandström
Fixes checkpatch.pl alignment warnings. Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/ccree/ssi_hash.c | 105 +-- 1 file changed, 56 insertions(+), 49 deletions(-) diff --git a/drivers/staging/ccree/ssi_hash.c b/drivers/staging

[PATCH 3/6] staging: ccree: Fix alignment issues in ssi_buffer_mgr.c

2017-07-18 Thread Simon Sandström
Fixes checkpatch.pl alignment warnings. Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/ccree/ssi_buffer_mgr.c | 40 -- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/drivers/staging/ccree/ssi_buffer_mgr.c b/drivers/s

[PATCH 5/6] staging: ccree: Fix alignment issues in ssi_ivgen.c

2017-07-18 Thread Simon Sandström
Fixes checkpatch.pl alignment warnings. Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/ccree/ssi_ivgen.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/ccree/ssi_ivgen.c b/drivers/staging/ccree/ssi_ivgen.c index f140db

[PATCH 6/6] staging: ccree: Fix alignment issues in ssi_request_mgr.c

2017-07-18 Thread Simon Sandström
Fixes checkpatch.pl alignment warnings. Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/ccree/ssi_request_mgr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/ccree/ssi_request_mgr.c b/drivers/staging/ccree/ssi_request_mgr.c

Re: [PATCH 00/10] Fix alignment issues in staging/ccree

2017-07-16 Thread Simon Sandström
Hi On Tue, Jul 11, 2017 at 07:00:33PM +0200, Greg KH wrote: > Not all of these applied, some did, if you could rebase the remaining > against my staging-testing branch at the moment, and resend, that would > be great. I'm not sure about the preferred procedure. Is it OK to send the rebased

[PATCH 2/4] staging: vt6656: Remove unnecessary blank lines

2017-06-30 Thread Simon Sandström
Fixes checkpatch.pl warning "Blank lines aren't necessary after an open brace". Also adds braces to balance if-else statement. Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/vt6656/power.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff

[PATCH 1/4] staging: vt6656: Add spaces between operators

2017-06-30 Thread Simon Sandström
Fixes checkpatch.pl warnings "spaces preferred around that ". Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/vt6656/device.h | 2 +- drivers/staging/vt6656/firmware.c | 2 +- drivers/staging/vt6656/rf.c | 4 ++-- 3 files changed, 4 insertions

[PATCH 0/4] staging: vt6656: Correct checkpatch.pl warnings

2017-06-30 Thread Simon Sandström
files. It was easier to write commit messages when grouped on type of warning, so that's what I did :-) - Simon --- Simon Sandström (4): staging: vt6656: Add spaces between operators staging: vt6656: Remove unnecessary blank lines staging: vt6656: Align function parameters staging

[PATCH 3/4] staging: vt6656: Align function parameters

2017-06-30 Thread Simon Sandström
Fixes checkpatch.pl warnings "Alignment should match open parenthesis". Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/vt6656/key.h | 2 +- drivers/staging/vt6656/rf.c | 2 +- drivers/staging/vt6656/usbpipe.c | 4 ++-- 3 files changed, 4 insertions

[PATCH 4/4] staging: vt6656: Use variable instead of its type in sizeof(...)

2017-06-30 Thread Simon Sandström
Use sizeof(variable) instead of sizeof(type) in memory allocations to prevent problems if the variable type changes in the future. Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/vt6656/main_usb.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff

[PATCH 01/10] staging: ccree: Fix alignment issues in ssi_aead.c

2017-07-01 Thread Simon Sandström
Fixes checkpatch.pl alignment warnings. Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/ccree/ssi_aead.c | 67 +--- 1 file changed, 35 insertions(+), 32 deletions(-) diff --git a/drivers/staging/ccree/ssi_aead.c b/drivers/staging

[PATCH 03/10] staging: ccree: Fix alignment issues in ssi_cipher.c

2017-07-01 Thread Simon Sandström
Fixes checkpatch.pl alignment warnings. Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/ccree/ssi_cipher.c | 75 +- 1 file changed, 34 insertions(+), 41 deletions(-) diff --git a/drivers/staging/ccree/ssi_cipher.c b/drivers/s

[PATCH 02/10] staging: ccree: Fix alignment issues in ssi_buffer_mgr.c

2017-07-01 Thread Simon Sandström
Fixes checkpatch.pl alignment warnings. Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/ccree/ssi_buffer_mgr.c | 295 ++--- 1 file changed, 164 insertions(+), 131 deletions(-) diff --git a/drivers/staging/ccree/ssi_buffer_mgr.c b/d

[PATCH 00/10] Fix alignment issues in staging/ccree

2017-07-01 Thread Simon Sandström
Fixes a total of 195 alignment issues in staging/ccree reported by checkpatch.pl. Adds a few "line over 80 characters" warnings as a result of the realignments, but I could try to get rid of them in the same patchset if needed. -- Simon --- Simon Sandström (10): staging: ccree: Fix

[PATCH 05/10] staging: ccree: Fix alignment issues in ssi_fips_local.c

2017-07-01 Thread Simon Sandström
Fixes checkpatch.pl alignment warnings. Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/ccree/ssi_fips_local.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/ccree/ssi_fips_local.c b/drivers/staging/ccree/ssi_fips_local.c

[PATCH 04/10] staging: ccree: Fix alignment issues in ssi_driver.c

2017-07-01 Thread Simon Sandström
Fixes checkpatch.pl alignment warnings. Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/ccree/ssi_driver.c | 40 +++--- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/drivers/staging/ccree/ssi_driver.c b/drivers/s

[PATCH 06/10] staging: ccree: Fix alignment issues in ssi_hash.c

2017-07-01 Thread Simon Sandström
Fixes checkpatch.pl alignment warnings. Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/ccree/ssi_hash.c | 116 +-- 1 file changed, 62 insertions(+), 54 deletions(-) diff --git a/drivers/staging/ccree/ssi_hash.c b/drivers/staging

[PATCH 09/10] staging: ccree: Fix alignment issues in ssi_sram_mgr.c

2017-07-01 Thread Simon Sandström
Fixes checkpatch.pl alignment warnings. Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/ccree/ssi_sram_mgr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/ccree/ssi_sram_mgr.c b/drivers/staging/ccree/ssi_sram_mgr.c

[PATCH 07/10] staging: ccree: Fix alignment issues in ssi_ivgen.c

2017-07-01 Thread Simon Sandström
Fixes checkpatch.pl alignment warnings. Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/ccree/ssi_ivgen.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/ccree/ssi_ivgen.c b/drivers/staging/ccree/ssi_ivgen.c index 5ff336

[PATCH 08/10] staging: ccree: Fix alignment issues in ssi_request_mgr.c

2017-07-01 Thread Simon Sandström
Fixes checkpatch.pl alignment warnings. Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/ccree/ssi_request_mgr.c | 42 - 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/drivers/staging/ccree/ssi_request_mgr.c b/drivers/s

[PATCH 10/10] staging: ccree: Fix alignment issues in ssi_sysfs.c

2017-07-01 Thread Simon Sandström
Fixes checkpatch.pl alignment warnings. Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/ccree/ssi_sysfs.c | 59 --- 1 file changed, 31 insertions(+), 28 deletions(-) diff --git a/drivers/staging/ccree/ssi_sysfs.c b/drivers/staging

Re: [PATCH 00/10] Fix alignment issues in staging/ccree

2017-07-03 Thread Simon Sandström
On Mon, Jul 03, 2017 at 10:19:31AM +0300, Gilad Ben-Yossef wrote: > but for the few cases where its a complex expression that can be > broken down like this one: > > WARNING: line over 80 characters > #93: FILE: drivers/staging/ccree/ssi_buffer_mgr.c:437: > + (AES_BLOCK_SIZE +

[PATCH] staging: ccree: Use sizeof(variable) in memory allocs

2017-07-30 Thread Simon Sandström
Fixes 9 checkpatch.pl warnings of type "Prefer kmalloc(sizeof(variable)...) over kmalloc(sizeof(type)...)" in staging/ccree. Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/ccree/ssi_aead.c| 4 ++-- drivers/staging/ccree/ssi_cipher.c | 5 ++---

Re: [PATCH 4/6] staging: pi433: Rename enum optionOnOff in rf69_enum.h

2017-12-04 Thread Simon Sandström
On Mon, Dec 04, 2017 at 09:22:06PM +0200, Marcus Wolf wrote: > > > Am 04.12.2017 um 21:15 schrieb Dan Carpenter: > > > > That's a bad name, because it doesn't just enable it also disables. > > Please split them. > > > > regards, > > dan carpenter > > > > > > Same applies to all other stuff,

Re: [PATCH 4/6] staging: pi433: Rename enum optionOnOff in rf69_enum.h

2017-12-04 Thread Simon Sandström
On Mon, Dec 04, 2017 at 09:59:02PM +0200, Marcus Wolf wrote: > > Hi Simon, hi Dan, > > if you both are of the same opinion, for me, it's fine, if we go with two > functions. > > But I don't get the advantage, if we split approx. 10 functions, to get rid > of enum optionOnOff. > > Keep in mind,

Re: rf69_get_lna_gain

2017-12-14 Thread Simon Sandström
On Thu, Dec 14, 2017 at 06:08:11PM +0200, Marcus Wolf wrote: > Hi! > > This is an information for all of you, doing experiments with real hardware! > > I wanted to explain, what this lna_gain stuff is used for: > > If you are receiving messages from different sender (let's say several >

[PATCH v2 04/11] staging: pi433: Rename enum optionOnOff in rf69_enum.h

2017-12-05 Thread Simon Sandström
Renames the enum optionOnOff and its values optionOn, optionOff to enum option_on_off and OPTION_ON, OPTION_OFF. Fixes checkpatch.pl warnings: "Avoid CamelCase: , , ". Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/pi433/

[PATCH v2 00/11] Fix indentation and CamelCase issue in staging/pi433

2017-12-05 Thread Simon Sandström
only used for ioctl. - Fix issue where GPIOs and device not being deallocated in pi433_probe() if SET_CHECKED fails. - Simon --- Simon Sandström (11): staging: pi433: Fix indentation in rf69_enum.h staging: pi433: Capitalize constant definitions staging: pi

[PATCH v2 02/11] staging: pi433: Capitalize constant definitions

2017-12-05 Thread Simon Sandström
Fixes checkpatch.pl warnings "Avoid CamelCase ". Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/pi433/pi433_if.c | 32 - drivers/staging/pi433/rf69_registers.h | 44 +- 2 files changed, 38 i

[PATCH v2 05/11] staging: pi433: Rename enum modShaping in rf69_enum.h

2017-12-05 Thread Simon Sandström
Renames enum modShaping and its values to get rid of checkpatch.pl warnings: "Avoid CamelCase: ". Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/pi433/pi433_if.c | 2 +- drivers/staging/pi433/pi433_if.h | 2 +- drivers/staging/pi433/

[PATCH v2 01/11] staging: pi433: Fix indentation in rf69_enum.h

2017-12-05 Thread Simon Sandström
Basically just 's//\t/', to fix checkpatch.pl warnings: "please, no spaces at the start of a line". Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/pi433/rf69_enum.h | 207 +++--- 1 file changed, 103 insertions(+), 104 de

[PATCH v2 10/11] staging: pi433: Move enum option_on_off to pi433_if.h

2017-12-05 Thread Simon Sandström
The enum is now only used for ioctl, so move it pi433_if.h. Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/pi433/pi433_if.h | 5 + drivers/staging/pi433/rf69_enum.h | 5 - 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging

[PATCH v2 07/11] staging: pi433: Split rf69_set_sync_enabled into two functions

2017-12-05 Thread Simon Sandström
Splits rf69_set_sync_enabled(dev, enabled) into rf69_enable_sync(dev) and rf69_disable_sync(dev). Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/pi433/pi433_if.c | 21 +++-- drivers/staging/pi433/rf69.c | 18 ++ drivers/staging

[PATCH v2 03/11] staging: pi433: Rename variable in struct pi433_rx_cfg

2017-12-05 Thread Simon Sandström
Renames variable thresholdDecrement in struct pi433_rx_cfg to threshold_decrement to get rid of checkpatch.pl warning "Avoid CamelCase: ". Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/pi433/pi433_if.c | 2 +- drivers/staging/pi433/pi433_if.h | 2 +- 2

[PATCH v2 11/11] staging: pi433: Remove SET_CHECKED usage from pi433_probe

2017-12-05 Thread Simon Sandström
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 <si...@nikanor.nu> --- drivers/staging/pi433/pi433_if.c | 28 +--- 1 file changed, 21 insertions(+), 7 del

[PATCH v2 06/11] staging: pi433: Split rf69_set_crc_enabled into two functions

2017-12-05 Thread Simon Sandström
Splits rf69_set_crc_enabled(dev, enabled) into rf69_enable_crc(dev) and rf69_disable_crc(dev). Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/pi433/pi433_if.c | 22 -- drivers/staging/pi433/rf69.c | 18 ++ drivers/staging/pi43

[PATCH v2 09/11] staging: pi433: Combine all rf69_set_amplifier_x()

2017-12-05 Thread Simon Sandström
Replaces the functions rf69_set_amplifier_1, _2, _3 with two functions: rf69_enable_amplifier(dev, amp_mask) and rf69_disable_amplifier(dev, amp_mask). Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/pi433/pi433_if.c | 6 +++--- drivers/staging/pi433/rf69.c

[PATCH v2 08/11] staging: pi433: Remove enum data_mode

2017-12-05 Thread Simon Sandström
Call rf69_set_data_mode with DATAMODUL_MODE value directly. Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/pi433/pi433_if.c | 2 +- drivers/staging/pi433/rf69.c | 15 ++- drivers/staging/pi433/rf69.h | 2 +- drivers/staging/pi433/rf69_enum.

[PATCH] staging: pi433: Fix ISO-8859 encoded non-english comments

2017-12-07 Thread Simon Sandström
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 <si...@nikanor.nu> --- drivers/staging/pi433/rf69.c | 11 ++- 1 file changed, 6 insertions(+), 5 de

[PATCH] staging: pi433: Add spaces around & and + operator

2017-12-07 Thread Simon Sandström
Fixes checkpatch warning: "spaces preferred around that '&'". Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/pi433/rf69.c | 29 ++--- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/drivers/staging/pi433/rf69

Re: [PATCH 4/6] staging: pi433: Rename enum optionOnOff in rf69_enum.h

2017-12-04 Thread Simon Sandström
On Sun, Dec 03, 2017 at 06:49:40PM +0200, Marcus Wolf wrote: > > Hi Simon, Hi, > > thanks for your effort. > > I have two questions: > * According to my practical experiance, enums were always written in lower > case. Does kernel style guide ask for upper case for enums? Yes. From

Re: [PATCH 1/6] staging: pi433: Split rf69_set_crc_enabled into two functions

2017-12-07 Thread Simon Sandström
On Thu, Dec 07, 2017 at 03:38:57PM +0100, Greg KH wrote: > On Wed, Dec 06, 2017 at 09:42:19PM +0100, Simon Sandström wrote: > > Splits rf69_set_crc_enabled(dev, enabled) into > > rf69_enable_crc(dev) and rf69_disable_crc(dev). > > > > Signed-off-by: Simon

[PATCH 6/6] staging: pi433: Remove SET_CHECKED usage from pi433_probe

2017-12-06 Thread Simon Sandström
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 <si...@nikanor.nu> --- drivers/staging/pi433/pi433_if.c | 28 +--- 1 file changed, 21 insertions(+), 7 del

[PATCH 2/6] staging: pi433: Split rf69_set_sync_enabled into two functions

2017-12-06 Thread Simon Sandström
Splits rf69_set_sync_enabled(dev, enabled) into rf69_enable_sync(dev) and rf69_disable_sync(dev). Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/pi433/pi433_if.c | 21 +++-- drivers/staging/pi433/rf69.c | 18 ++ drivers/staging

[PATCH 3/6] staging: pi433: Remove enum data_mode

2017-12-06 Thread Simon Sandström
Call rf69_set_data_mode with DATAMODUL_MODE value directly. Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/pi433/pi433_if.c | 2 +- drivers/staging/pi433/rf69.c | 15 ++- drivers/staging/pi433/rf69.h | 2 +- drivers/staging/pi433/rf69_enum.

[PATCH 4/6] staging: pi433: Combine all rf69_set_amplifier_x()

2017-12-06 Thread Simon Sandström
Replaces the functions rf69_set_amplifier_1, _2, _3 with two functions: rf69_enable_amplifier(dev, amp_mask) and rf69_disable_amplifier(dev, amp_mask). Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/pi433/pi433_if.c | 6 +++--- drivers/staging/pi433/rf69.c

[PATCH 0/6] staging: pi433: Minor cleanup and style fixes

2017-12-06 Thread Simon Sandström
These are the six remaining patches from "[PATCH v2 00/11] Fix indentation and CamelCase issues in staging/pi433" that couldn't be applied, rebased on top of staging-next. - Simon --- Simon Sandström (6): staging: pi433: Split rf69_set_crc_enabled into two functions staging: pi

[PATCH 1/6] staging: pi433: Split rf69_set_crc_enabled into two functions

2017-12-06 Thread Simon Sandström
Splits rf69_set_crc_enabled(dev, enabled) into rf69_enable_crc(dev) and rf69_disable_crc(dev). Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/pi433/pi433_if.c | 22 -- drivers/staging/pi433/rf69.c | 18 ++ drivers/staging/pi43

[PATCH 5/6] staging: pi433: Move enum option_on_off to pi433_if.h

2017-12-06 Thread Simon Sandström
The enum is now only used for ioctl, so move it pi433_if.h. Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/pi433/pi433_if.h | 5 + drivers/staging/pi433/rf69_enum.h | 5 - 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging

Re: [PATCH v2 04/11] staging: pi433: Rename enum optionOnOff in rf69_enum.h

2017-12-06 Thread Simon Sandström
On Wed, Dec 06, 2017 at 01:44:14PM +0300, Dan Carpenter wrote: > On Wed, Dec 06, 2017 at 12:31:31PM +0200, Marcus Wolf wrote: > > > > > > Am 06.12.2017 um 12:23 schrieb Dan Carpenter: > > > > > > > > > Wow... This was the one patch I thought was going to sink this > > > patchset... > > > > I

Re: [PATCH v2 06/11] staging: pi433: Split rf69_set_crc_enabled into two functions

2017-12-06 Thread Simon Sandström
On Wed, Dec 06, 2017 at 04:16:04PM +0100, Greg KH wrote: > > I had to stop here in applying this series, as the merge conflicts just > got too much for me to resolve by hand. > > Can you rebase this series on my staging-testing branch of staging.git > and send the remaining patches please? > >

[PATCH 3/3] staging: pi433: Remove unnecessary #ifdef DEBUG around dev_dbg

2017-12-09 Thread Simon Sandström
dev_dbg() already depends on DEBUG. Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/pi433/rf69.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c index 04a74423c325..6e38e6a515a4 100644 --- a/drivers/s

[PATCH 0/3] staging: pi433: Refactor usage of dev_dbg and #ifdef DEBUG

2017-12-09 Thread Simon Sandström
and DEBUG_VALUES. Perhaps they should be removed as well? - Simon --- Simon Sandström (3): staging: pi433: Remove indentation on #ifdef blocks staging: pi433: Remove function entry dev_dbg() staging: pi433: Remove unnecessary #ifdef DEBUG around dev_dbg drivers/staging/pi433/rf69.c | 232

[PATCH 2/3] staging: pi433: Remove function entry dev_dbg()

2017-12-09 Thread Simon Sandström
ftrace can be used to trace function calls, so there is no need to use dev_dbg() here. Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/pi433/rf69.c | 156 --- 1 file changed, 156 deletions(-) diff --git a/drivers/staging/pi433/

[PATCH 1/3] staging: pi433: Remove indentation on #ifdef blocks

2017-12-09 Thread Simon Sandström
ifdef blocks should not increase indentation level. Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/pi433/rf69.c | 314 +-- 1 file changed, 153 insertions(+), 161 deletions(-) diff --git a/drivers/staging/pi433/rf69.c b/d

[PATCH 1/6] staging: pi433: Fix indentation in rf69_enum.h

2017-12-03 Thread Simon Sandström
Basically just 's//\t/', to fix checkpatch.pl warnings: "please, no spaces at the start of a line". Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/pi433/rf69_enum.h | 207 +++--- 1 file changed, 103 insertions(+), 104 de

[PATCH 5/6] staging: pi433: Rename enum dataMode in rf69_enum.h

2017-12-03 Thread Simon Sandström
Renames enum dataMode and its values packet, continuous, continuousNoSync to enum data_mode and PACKET, CONTINUOUS, CONTINUOUS_NO_SYNC. Fixes checkpatch.pl warnings: "Avoid CamelCase: , ". Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/pi433/pi433_if.c

[PATCH 4/6] staging: pi433: Rename enum optionOnOff in rf69_enum.h

2017-12-03 Thread Simon Sandström
Renames the enum optionOnOff and its values optionOn, optionOff to enum option_on_off and OPTION_ON, OPTION_OFF. Fixes checkpatch.pl warnings: "Avoid CamelCase: , , ". Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/pi433/

[PATCH 6/6] staging: pi433: Rename enum modShaping in rf69_enum.h

2017-12-03 Thread Simon Sandström
Renames enum modShaping and its values to get rid of checkpatch.pl warnings: "Avoid CamelCase: ". Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/pi433/pi433_if.c | 2 +- drivers/staging/pi433/pi433_if.h | 2 +- drivers/staging/pi433/

[PATCH 3/6] staging: pi433: Rename variable in struct pi433_rx_cfg

2017-12-03 Thread Simon Sandström
Renames variable thresholdDecrement in struct pi433_rx_cfg to threshold_decrement to get rid of checkpatch.pl warning "Avoid CamelCase: ". Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/pi433/pi433_if.c | 2 +- drivers/staging/pi433/pi433_if.h | 2 +- 2

[PATCH 2/6] staging: pi433: Capitalize constant definitions

2017-12-03 Thread Simon Sandström
Fixes checkpatch.pl warnings "Avoid CamelCase ". Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/pi433/pi433_if.c | 32 - drivers/staging/pi433/rf69_registers.h | 44 +- 2 files changed, 38 i

[PATCH 0/6] Fix indentation and CamelCase issues in staging/pi433

2017-12-03 Thread Simon Sandström
These patches fixes a bunch of code style issues in staging/pi433. The first patch fixes indentation in rf69_enum.h and the rest of the patches fixes CamelCase issues in all of staging/pi433. In total the patches get rids of around 140 warnings generated by checkpatch.pl. - Simon --- Simon

[PATCH] staging: pi433: break long lines in rf69.c

2018-04-06 Thread Simon Sandström
Breaks long lines in rf69.c, fixing checkpatch.pl warnings: "WARNING: line over 80 characters" Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/pi433/rf69.c | 182 ++- 1 file changed, 129 insertions(+), 53 deletion

[PATCH] staging: pi433: break long lines

2018-04-06 Thread Simon Sandström
Breaks long lines in rf69.h, fixing checkpatch.pl warnings: "WARNING: line over 80 characters" Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/pi433/rf69.h | 28 +++- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a

[PATCH] staging: pi433: break long lines in pi433_if.c

2018-04-06 Thread Simon Sandström
Breaks long lines in pi433_if.c, fixing checkpatch.pl warnings: "WARNING: line over 80 characters" Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/pi433/pi433_if.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/drive

[PATCH RESEND] staging: pi433: break long lines in pi433_if.c

2018-04-23 Thread Simon Sandström
Breaks long lines in pi433_if.c, fixing checkpatch.pl warnings: "WARNING: line over 80 characters" Signed-off-by: Simon Sandström <si...@nikanor.nu> --- drivers/staging/pi433/pi433_if.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/drive

[PATCH 1/2] staging: kpc2000: fix typo in Kconfig

2019-05-24 Thread Simon Sandström
Fixes two minor typos in kpc2000's Kconfig: s/Kaktronics/Daktronics Signed-off-by: Simon Sandström --- drivers/staging/kpc2000/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/kpc2000/Kconfig b/drivers/staging/kpc2000/Kconfig index fb5922928f47

[PATCH 2/2] staging: kpc2000: add missing dependencies for kpc2000

2019-05-24 Thread Simon Sandström
Fixes build errors: ERROR: "mfd_remove_devices" [kpc2000.ko] undefined! ERROR: "uio_unregister_device" [kpc2000.ko] undefined! ERROR: "mfd_add_devices" [kpc2000.ko] undefined! ERROR: "__uio_register_device" [kpc2000.ko] undefined! Signed-off-by: Simon

[PATCH 0/2] Fixes for staging/kpc2000's Kconfig

2019-05-24 Thread Simon Sandström
not sure that I solved it correctly. Maybe there are some other things to consider as this is in staging? - Simon Simon Sandström (2): staging: kpc2000: fix typo in Kconfig staging: kpc2000: add missing dependencies for kpc2000 drivers/staging/kpc2000/Kconfig | 6 -- 1 file changed, 4

Re: [PATCH 2/2] staging: kpc2000: add missing dependencies for kpc2000

2019-05-25 Thread Simon Sandström
On Sat, May 25, 2019 at 07:00:17AM +0200, Greg KH wrote: > On Fri, May 24, 2019 at 10:30:58PM +0200, Simon Sandström wrote: > > Fixes build errors: > > > > ERROR: "mfd_remove_devices" [kpc2000.ko] undefined! > > ERROR: "uio_unregister_device" [kpc

Re: [PATCH 2/2] staging: kpc2000: add missing dependencies for kpc2000

2019-05-25 Thread Simon Sandström
On Sat, May 25, 2019 at 10:39:18AM +0200, Simon Sandström wrote: > On Sat, May 25, 2019 at 07:00:17AM +0200, Greg KH wrote: > > > > This is already in linux-next (in a different form), are you sure you > > are working against the latest kernel tree? > > > > th

Re: [PATCH 3/4] staging: kpc2000: add missing spaces in core.c

2019-05-29 Thread Simon Sandström
On Mon, May 27, 2019 at 10:31:59AM +0300, Dan Carpenter wrote: > On Fri, May 24, 2019 at 01:08:01PM +0200, Simon Sandström wrote: > > [..] > > - ret = copy_to_user((void*)ioctl_param, (void*), > > sizeof(temp)); > > + ret = copy_to_user

[PATCH 6/7] staging: kpc2000: use sizeof(var) in kzalloc call

2019-06-03 Thread Simon Sandström
Fixes checkpatch.pl warning "Prefer kzalloc(sizeof(*pcard)...) over kzalloc(sizeof(struct kp2000_device)...)". Signed-off-by: Simon Sandström --- drivers/staging/kpc2000/kpc2000/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/kpc2000/kpc2000

[PATCH 1/7] staging: kpc2000: simplify comparisons to NULL in core.c

2019-06-03 Thread Simon Sandström
Fixes checkpatch.pl warnings "Comparison to NULL could be written [...]" and "Comparisons should place the constant on the right side of the test". Signed-off-by: Simon Sandström --- drivers/staging/kpc2000/kpc2000/core.c | 12 ++-- 1 file changed, 6 insertions(+),

[PATCH 7/7] staging: kpc2000: fix incorrect code comment in core.c

2019-06-03 Thread Simon Sandström
Step 11 was removed from kp2000_pcie_probe in a previous commit but the comment was not changed to reflect this, so do it now. Signed-off-by: Simon Sandström --- drivers/staging/kpc2000/kpc2000/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/kpc2000

[PATCH 4/7] staging: kpc2000: use __func__ in debug messages in core.c

2019-06-03 Thread Simon Sandström
Fixes checkpatch.pl warning "Prefer using '"%s...", __func__' to using '', this function's name, in a string". Signed-off-by: Simon Sandström --- drivers/staging/kpc2000/kpc2000/core.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/sta

[PATCH 0/7] staging: kpc2000: various minor checkpatch fixes

2019-06-03 Thread Simon Sandström
Here is a bunch of checkpatch fixes for core.c in staging/kpc2000. Some of these were sent earlier but not applied. Now rebased on top of staging-testing (incl. Jeremy's kpc2000 misc device removal commits). - Simon Simon Sandström (7): staging: kpc2000: simplify comparisons to NULL

[PATCH 5/7] staging: kpc2000: remove unnecessary include in core.c

2019-06-03 Thread Simon Sandström
Fixes checkpatch.pl warning "Use #include instead of ". Signed-off-by: Simon Sandström --- drivers/staging/kpc2000/kpc2000/core.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/kpc2000/kpc2000/core.c b/drivers/staging/kpc2000/kpc2000/core.c index 6d4fc1f37c9f..3f

[PATCH 2/7] staging: kpc2000: remove unnecessary parentheses in core.c

2019-06-03 Thread Simon Sandström
Fixes checkpatch.pl check "Unnecessary parentheses around pdev->dev.kobj". Signed-off-by: Simon Sandström --- drivers/staging/kpc2000/kpc2000/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/kpc2000/kpc2000/core.c b/drivers/st

[PATCH 3/7] staging: kpc2000: remove unnecessary oom message in core.c

2019-06-03 Thread Simon Sandström
Fixes checkpatch.pl warning "Possible unnecessary 'out of memory' message". Signed-off-by: Simon Sandström --- drivers/staging/kpc2000/kpc2000/core.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/kpc2000/kpc2000/core.c b/drivers/staging/kpc20

[PATCH] staging: kpc2000: replace bogus variable name in core.c

2019-05-29 Thread Simon Sandström
"struct kp2000_regs temp" has nothing to do with temperatures, so replace it with the more proper name "regs". Signed-off-by: Simon Sandström --- drivers/staging/kpc2000/kpc2000/core.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-)

Re: [PATCH 2/2] staging: kpc2000: remove unnecessary comments in kp2000_pcie_probe

2019-06-12 Thread Simon Sandström
On 12/06, Greg KH wrote: > On Wed, Jun 12, 2019 at 10:39:36AM +0300, Dan Carpenter wrote: > > On Mon, Jun 10, 2019 at 10:05:35PM +0200, Simon Sandström wrote: > > > @@ -349,9 +340,7 @@ static int kp2000_pcie_probe(struct pci_dev *pdev, > > >

[PATCH 1/2] staging: kpc2000: improve label names in kp2000_pcie_probe

2019-06-10 Thread Simon Sandström
Use self-explanatory label names instead of the generic numbered ones, to make it easier to follow and understand the code. Signed-off-by: Simon Sandström --- drivers/staging/kpc2000/kpc2000/core.c | 42 -- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git

[PATCH 2/2] staging: kpc2000: remove unnecessary comments in kp2000_pcie_probe

2019-06-10 Thread Simon Sandström
Much of the code comments in kp2000_pcie_probe just repeats the code and does not add any additional information. Delete them and make sure that comments still left in the function all use the same style. Signed-off-by: Simon Sandström --- drivers/staging/kpc2000/kpc2000/core.c | 38

[PATCH 0/2] staging: kpc2000: minor fixes in kp2000_pcie_probe

2019-06-10 Thread Simon Sandström
repeats the code. Simon Sandström (2): staging: kpc2000: improve label names in kp2000_pcie_probe staging: kpc2000: remove unnecessary comments in kp2000_pcie_probe drivers/staging/kpc2000/kpc2000/core.c | 80 -- 1 file changed, 25 insertions(+), 55 deletions

Re: [PATCH 4/7] staging: kpc2000: use __func__ in debug messages in core.c

2019-06-10 Thread Simon Sandström
On 06/06, Greg KH wrote: > On Tue, Jun 04, 2019 at 12:29:13AM +0200, Simon Sandström wrote: > > > > - dev_dbg(>dev, "kp2000_pcie_probe(pdev = [%p], id = [%p])\n", > > - pdev, id); > > + dev_dbg(>dev, "%s(pdev = [%p], i

  1   2   >