[PATCH 1/4] staging: dgnc: audit goto's in dgnc_driver

2017-03-06 Thread Tobin C. Harding
TODO file requests fix up of error handling. Audit dgnc_driver.c and fix all return paths to be uniform and inline with kernel coding style. Signed-off-by: Tobin C. Harding --- drivers/staging/dgnc/dgnc_driver.c | 27 +++ 1 file changed, 7 insertions(+), 20 deletions

[PATCH 0/4] staging: dgnc: remove goto task from TODO list

2017-03-06 Thread Tobin C. Harding
) return rc; ... if (other-conditional) return rc; ... Tobin C. Harding (4): staging: dgnc: audit goto's in dgnc_driver staging: dgnc: audit goto's in dgnc_mgmt staging: dgnc: audit goto's in dgnc_tty staging: dgnc: remove item from TO

[PATCH 3/4] staging: dgnc: audit goto's in dgnc_tty

2017-03-06 Thread Tobin C. Harding
TODO file requests fix up of error handling. Audit dgnc_mgmt.c and fix all return paths to be uniform and inline with kernel coding style. Signed-off-by: Tobin C. Harding --- drivers/staging/dgnc/dgnc_tty.c | 219 1 file changed, 112 insertions(+), 107

[PATCH 2/4] staging: dgnc: audit goto's in dgnc_mgmt

2017-03-06 Thread Tobin C. Harding
TODO file requests fix up of error handling. Audit dgnc_mgmt.c and fix all return paths to be uniform and inline with kernel coding style. Signed-off-by: Tobin C. Harding --- drivers/staging/dgnc/dgnc_mgmt.c | 37 - 1 file changed, 20 insertions(+), 17

[PATCH 4/4] staging: dgnc: remove item from TODO list

2017-03-06 Thread Tobin C. Harding
TODO file contains task to verify and correct function return sites. Need to check for and implement correct usage of goto's when there is work to be done before returning. Remove task from TODO list after already having completed audit of directory drivers/staging/dgnc. Signed-off-by: To

Re: [PATCH 1/4] staging: dgnc: audit goto's in dgnc_driver

2017-03-07 Thread Tobin C. Harding
On Tue, Mar 07, 2017 at 09:42:53AM +0100, Greg Kroah-Hartman wrote: > On Tue, Mar 07, 2017 at 05:33:06PM +1100, Tobin C. Harding wrote: > > TODO file requests fix up of error handling. > > > > Audit dgnc_driver.c and fix all return paths to be uniform and inline > &g

Re: [PATCH 1/4] staging: dgnc: audit goto's in dgnc_driver

2017-03-07 Thread Tobin C. Harding
On Tue, Mar 07, 2017 at 10:28:17AM +0100, Greg Kroah-Hartman wrote: > On Tue, Mar 07, 2017 at 07:57:40PM +1100, Tobin C. Harding wrote: > > On Tue, Mar 07, 2017 at 09:42:53AM +0100, Greg Kroah-Hartman wrote: > > > On Tue, Mar 07, 2017 at 05:33:06PM +1100, Tobin C. Harding wrote:

[PATCH v2 1/4] staging: dgnc: audit goto's in dgnc_driver

2017-03-07 Thread Tobin C. Harding
TODO file requests fix up of error handling. Audit dgnc_driver.c and fix all return paths to be uniform and inline with kernel coding style. Signed-off-by: Tobin C. Harding --- v1 -> v2: - remove out of place white space change drivers/staging/dgnc/dgnc_driver.c |

[PATCH v2 0/4] staging: dgnc: remove goto task from TODO list

2017-03-07 Thread Tobin C. Harding
) return rc; ... if (other-conditional) return rc; ... v1 -> v2: - remove out of place white space change from patch 01 of series Tobin C. Harding (4): staging: dgnc: audit goto's in dgnc_driver staging: dgnc: audit goto's in dgnc_mgmt stagin

[PATCH v2 2/4] staging: dgnc: audit goto's in dgnc_mgmt

2017-03-07 Thread Tobin C. Harding
TODO file requests fix up of error handling. Audit dgnc_mgmt.c and fix all return paths to be uniform and inline with kernel coding style. Signed-off-by: Tobin C. Harding --- drivers/staging/dgnc/dgnc_mgmt.c | 37 - 1 file changed, 20 insertions(+), 17

[PATCH v2 4/4] staging: dgnc: remove item from TODO list

2017-03-07 Thread Tobin C. Harding
TODO file contains task to verify and correct function return sites. Need to check for and implement correct usage of goto's when there is work to be done before returning. Remove task from TODO list after already having completed audit of directory drivers/staging/dgnc. Signed-off-by: To

[PATCH v2 3/4] staging: dgnc: audit goto's in dgnc_tty

2017-03-07 Thread Tobin C. Harding
TODO file requests fix up of error handling. Audit dgnc_mgmt.c and fix all return paths to be uniform and inline with kernel coding style. Signed-off-by: Tobin C. Harding --- drivers/staging/dgnc/dgnc_tty.c | 219 1 file changed, 112 insertions(+), 107

Re: [PATCH 1/4] staging: dgnc: audit goto's in dgnc_driver

2017-03-07 Thread Tobin C. Harding
On Tue, Mar 07, 2017 at 08:03:51PM +0300, Dan Carpenter wrote: > On Tue, Mar 07, 2017 at 05:33:06PM +1100, Tobin C. Harding wrote: > > @@ -419,17 +411,14 @@ static int dgnc_init_one(struct pci_dev *pdev, const > > struct pci_device_id *ent) > > brd-&g

Re: [PATCH 2/4] staging: dgnc: audit goto's in dgnc_mgmt

2017-03-07 Thread Tobin C. Harding
On Tue, Mar 07, 2017 at 08:05:10PM +0300, Dan Carpenter wrote: > On Tue, Mar 07, 2017 at 05:33:07PM +1100, Tobin C. Harding wrote: > > + /* Only allow 1 open at a time on mgmt device */ > > + if (dgnc_mgmt_in_use[minor]) { > > + rc = -EBUSY; >

Re: [PATCH 3/4] staging: dgnc: audit goto's in dgnc_tty

2017-03-07 Thread Tobin C. Harding
On Tue, Mar 07, 2017 at 08:08:44PM +0300, Dan Carpenter wrote: > On Tue, Mar 07, 2017 at 05:33:08PM +1100, Tobin C. Harding wrote: > > @@ -1668,20 +1669,20 @@ static int dgnc_tty_tiocmget(struct tty_struct *tty) > > { > > struct channel_t *ch; > > struct u

Re: [PATCH 3/3] staging: ks7010: add additional goto target

2017-03-07 Thread Tobin C. Harding
On Tue, Mar 07, 2017 at 08:19:03PM +0300, Dan Carpenter wrote: > On Tue, Mar 07, 2017 at 09:31:16AM +1100, Tobin C. Harding wrote: > @@ -610,12 +610,7 @@ static void ks_sdio_interrupt(struct sdio_func *func) > > if (atomic_read(&priv->psstatus.status

Re: [PATCH] staging: comedi: cb_pcidas64: move loop invariant

2017-03-07 Thread Tobin C. Harding
On Tue, Mar 07, 2017 at 08:03:16PM +0100, Greg Kroah-Hartman wrote: > On Tue, Mar 07, 2017 at 01:29:35PM +1100, Tobin C. Harding wrote: > > Loop invariant is inside the loop so code checks invariant on each > > iteration of the loop. Invariant can be moved outside of the loop so

[PATCH 01/12] staging: ks7010: fix checkpatch whitespace warnings

2017-03-07 Thread Tobin C. Harding
tabs where possible Remove all undesirable whitespace. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 2 -- drivers/staging/ks7010/ks_hostif.h | 50 +++--- 2 files changed, 25 insertions(+), 27 deletions(-) diff --git a/drivers/staging

[PATCH 02/12] staging: ks7010: fix checkpatch CONSTANT_COMPARISON

2017-03-07 Thread Tobin C. Harding
Checkpatch emits WARNING: Comparisons should place the constant on the right side of the test. Move comparison constant to the right side of the test. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a

[PATCH 00/12] refactor hostif_data_indication()

2017-03-07 Thread Tobin C. Harding
carried out. Tobin C. Harding (12): staging: ks7010: fix checkpatch whitespace warnings staging: ks7010: fix checkpatch CONSTANT_COMPARISON staging: ks7010: replace C types with kernel types staging: ks7010: fix spelling mistake staging: ks7010: remove unnecessary parenthesis staging

[PATCH 03/12] staging: ks7010: replace C types with kernel types

2017-03-07 Thread Tobin C. Harding
Checkpatch emits CHECK prefer kernel type. Source and header file use C standard types uintN_t. Replace C standard types with kernel types. uintN_t -> uN Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 250 +++--- drivers/staging/ks7

[PATCH 05/12] staging: ks7010: remove unnecessary parenthesis

2017-03-07 Thread Tobin C. Harding
Checkpatch emits CHECK: Unnecessary parentheses. Remove unnecessary parentheses. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers

[PATCH 04/12] staging: ks7010: fix spelling mistake

2017-03-07 Thread Tobin C. Harding
Comment contains misspelled work 'Adress'. Correct spelling: Adress -> Address Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/s

[PATCH 06/12] staging: ks7010: factor out WPA code

2017-03-07 Thread Tobin C. Harding
: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 175 - 1 file changed, 95 insertions(+), 80 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index b75ef1d6..1da7b5a 100644 --- a/drivers/staging/ks7010

[PATCH 07/12] staging: ks7010: reduce level of indentation

2017-03-07 Thread Tobin C. Harding
Indentation may be reduced by inverting if statement conditional and returning. Invert conditional. Return if new conditional evaluates to true. Do not alter program logic. Reduce by one the level of indentation in subsequent code. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010

[PATCH 08/12] staging: ks7010: fix spelling of Michael MIC

2017-03-07 Thread Tobin C. Harding
Various symbols are named 'michel*'. The keyed hash function name is spelled 'Michael'. Rename symbols michel -> michael. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 16 drivers/staging/ks7010/michael_mic.c | 8

[PATCH 09/12] staging: ks7010: add meaningful buffer names

2017-03-07 Thread Tobin C. Harding
eading. Change buffer name RecvMIC -> recv_mic_buf. Change buffer name buf -> wrqu_buf. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/stagi

[PATCH 10/12] staging: ks7010: add variables key, key_index

2017-03-07 Thread Tobin C. Harding
is used to create a string so having it named adds additional meaning when creating the string. Declare variable 'key_index' and define it at declaration time. Declare a pointer variable 'key' and define it to point to the correct key in the key table. Signed-off-by: Tobin C.

[PATCH 11/12] staging: ks7010: refactor, improve code layout

2017-03-07 Thread Tobin C. Harding
continuation warnings. These can also be fixed changing only whitespace. Refactor code making whitespace only changes. Do not change the program logic. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 63 -- 1 file changed, 27 insertions(+), 36

[PATCH 12/12] staging: ks7010: fix checkpatch line over 80

2017-03-07 Thread Tobin C. Harding
Checkpatch emits WARNING: line over 80 characters. Modify the comment without loss of meaning to reduce the length of the line. Clear two warnings with single change. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

Re: [PATCH] staging: comedi: cb_pcidas64: move loop invariant

2017-03-07 Thread Tobin C. Harding
On Wed, Mar 08, 2017 at 12:26:27AM +0300, Dan Carpenter wrote: > On Wed, Mar 08, 2017 at 08:18:50AM +1100, Tobin C. Harding wrote: > > On Tue, Mar 07, 2017 at 08:03:16PM +0100, Greg Kroah-Hartman wrote: > > > On Tue, Mar 07, 2017 at 01:29:35PM +1100, Tobin C. Harding wrote: >

Re: [PATCH 10/12] staging: ks7010: add variables key, key_index

2017-03-07 Thread Tobin C. Harding
On Wed, Mar 08, 2017 at 08:54:36AM +0300, Dan Carpenter wrote: > On Wed, Mar 08, 2017 at 02:36:55PM +1100, Tobin C. Harding wrote: > > diff --git a/drivers/staging/ks7010/ks_hostif.c > > b/drivers/staging/ks7010/ks_hostif.c > > index 7dc0d99..7ff5345 100644 > > -

Re: [PATCH 08/12] staging: ks7010: fix spelling of Michael MIC

2017-03-08 Thread Tobin C. Harding
On Wed, Mar 08, 2017 at 08:54:39AM +0300, Dan Carpenter wrote: > On Wed, Mar 08, 2017 at 02:36:53PM +1100, Tobin C. Harding wrote: > > Various symbols are named 'michel*'. The keyed hash function name is > > spelled 'Michael'. > > > > Rename sy

Re: [PATCH 1/4] staging: dgnc: audit goto's in dgnc_driver

2017-03-08 Thread Tobin C. Harding
> X-Mailer: Mutt 1.5.24 (2015-08-30) On Wed, Mar 08, 2017 at 12:22:46AM +0300, Dan Carpenter wrote: > On Wed, Mar 08, 2017 at 08:06:31AM +1100, Tobin C. Harding wrote: > > On Tue, Mar 07, 2017 at 08:03:51PM +0300, Dan Carpenter wrote: > > > On Tue, Mar 07, 2017 at 05:3

Re: [PATCH 1/4] staging: dgnc: audit goto's in dgnc_driver

2017-03-08 Thread Tobin C. Harding
On Wed, Mar 08, 2017 at 02:32:53PM +0300, Dan Carpenter wrote: > On Wed, Mar 08, 2017 at 08:39:28PM +1100, Tobin C. Harding wrote: > > Hope that is not an amazing amount of nit picking for no good reason. > > > > It basically is. ;) rofl, just call me Peda

[PATCH v2 00/12] refactor hostif_data_indication()

2017-03-08 Thread Tobin C. Harding
we make this call twice. v1 -> v2: - Fix typo in patch 8 - Fix pointer dereference in patch 10 Tobin C. Harding (12): staging: ks7010: fix checkpatch whitespace warnings staging: ks7010: fix checkpatch CONSTANT_COMPARISON staging: ks7010: replace C types with kernel types staging:

[PATCH v2 02/12] staging: ks7010: fix checkpatch CONSTANT_COMPARISON

2017-03-08 Thread Tobin C. Harding
Checkpatch emits WARNING: Comparisons should place the constant on the right side of the test. Move comparison constant to the right side of the test. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a

[PATCH v2 01/12] staging: ks7010: fix checkpatch whitespace warnings

2017-03-08 Thread Tobin C. Harding
tabs where possible Remove all undesirable whitespace. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 2 -- drivers/staging/ks7010/ks_hostif.h | 50 +++--- 2 files changed, 25 insertions(+), 27 deletions(-) diff --git a/drivers/staging

[PATCH v2 03/12] staging: ks7010: replace C types with kernel types

2017-03-08 Thread Tobin C. Harding
Checkpatch emits CHECK prefer kernel type. Source and header file use C standard types uintN_t. Replace C standard types with kernel types. uintN_t -> uN Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 250 +++--- drivers/staging/ks7

[PATCH v2 04/12] staging: ks7010: fix spelling mistake

2017-03-08 Thread Tobin C. Harding
Comment contains misspelled work 'Adress'. Correct spelling: Adress -> Address Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/s

[PATCH v2 05/12] staging: ks7010: remove unnecessary parenthesis

2017-03-08 Thread Tobin C. Harding
Checkpatch emits CHECK: Unnecessary parentheses. Remove unnecessary parentheses. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers

[PATCH v2 08/12] staging: ks7010: fix spelling of Michael MIC

2017-03-08 Thread Tobin C. Harding
Various symbols are named 'michel*'. The keyed hash function name is spelled 'Michael'. Rename symbols michel -> michael. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 16 drivers/staging/ks7010/michael_mic.c | 8

[PATCH v2 06/12] staging: ks7010: factor out WPA code

2017-03-08 Thread Tobin C. Harding
: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 175 - 1 file changed, 95 insertions(+), 80 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index b75ef1d6..1da7b5a 100644 --- a/drivers/staging/ks7010

[PATCH v2 09/12] staging: ks7010: add meaningful buffer names

2017-03-08 Thread Tobin C. Harding
eading. Rename buffer: RecvMIC -> recv_mic_buf Rename buffer: buf -> wrqu_buf Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7

[PATCH v2 07/12] staging: ks7010: reduce level of indentation

2017-03-08 Thread Tobin C. Harding
Indentation may be reduced by inverting if statement conditional and returning. Invert conditional. Return if new conditional evaluates to true. Do not alter program logic. Reduce by one the level of indentation in subsequent code. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010

[PATCH v2 10/12] staging: ks7010: add variables key, key_index

2017-03-08 Thread Tobin C. Harding
is used to create a string so having it named adds additional meaning when creating the string. Declare variable 'key_index' and define it at declaration time. Declare a pointer variable 'key' and define it to point to the correct key in the key table. Signed-off-by: Tobin C.

[PATCH v2 11/12] staging: ks7010: refactor, improve code layout

2017-03-08 Thread Tobin C. Harding
continuation warnings. These can also be fixed changing only whitespace. Refactor code making whitespace only changes. Do not change the program logic. Signed-off-by: Tobin C. Harding --- I don't know why the diff here shows the second line of the function parameters to be aligned with the

[PATCH v2 12/12] staging: ks7010: fix checkpatch line over 80

2017-03-08 Thread Tobin C. Harding
Checkpatch emits WARNING: line over 80 characters. Modify the comment without loss of meaning to reduce the length of the line. Clear two warnings with single change. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

Re: [PATCH v2 05/12] staging: ks7010: remove unnecessary parenthesis

2017-03-09 Thread Tobin C. Harding
On Thu, Mar 09, 2017 at 02:04:20PM +0100, Greg Kroah-Hartman wrote: > On Thu, Mar 09, 2017 at 03:47:05PM +1100, Tobin C. Harding wrote: > > Checkpatch emits CHECK: Unnecessary parentheses. > > > > Remove unnecessary parentheses. > > > > Signed-off-by: Tobin

Re: [PATCH v2 03/12] staging: ks7010: replace C types with kernel types

2017-03-09 Thread Tobin C. Harding
On Thu, Mar 09, 2017 at 02:04:45PM +0100, Greg Kroah-Hartman wrote: > On Thu, Mar 09, 2017 at 03:47:03PM +1100, Tobin C. Harding wrote: > > Checkpatch emits CHECK prefer kernel type. Source and header file use > > C standard types uintN_t. > > > > Replace C stand

Re: [PATCH v2 05/12] staging: ks7010: remove unnecessary parenthesis

2017-03-09 Thread Tobin C. Harding
On Thu, Mar 09, 2017 at 09:30:40PM +0100, Greg Kroah-Hartman wrote: > On Fri, Mar 10, 2017 at 07:08:28AM +1100, Tobin C. Harding wrote: > > On Thu, Mar 09, 2017 at 02:04:20PM +0100, Greg Kroah-Hartman wrote: > > > On Thu, Mar 09, 2017 at 03:47:05PM +1100, Tobin C. Harding wrote:

Re: [PATCH 1/3] Staging: ks7010: ks_*: Use preferred 'u8' kernel type over 'uint8_t'

2017-03-11 Thread Tobin C. Harding
On Sun, Mar 12, 2017 at 03:29:59AM +0100, Shiva Kerdel wrote: > Fix prefer kernel type 'u8' over 'uint8_t' checks. > > Signed-off-by: Shiva Kerdel > --- > drivers/staging/ks7010/ks_hostif.c | 4 +- > drivers/staging/ks7010/ks_hostif.h | 114 > +-- > drivers

Re: patch "staging: dgnc: remove item from TODO list" added to staging-next

2017-03-12 Thread Tobin C. Harding
> during the merge window. > > If you have any questions about this process, please let me know. > > > From 2437a9e023fe1df77c053b222762357bb73212e8 Mon Sep 17 00:00:00 2001 > From: "Tobin C. Harding" > Date: Tue, 7 Mar 2017 20:57:04 +1100 > Subject: sta

Re: patch "staging: dgnc: remove item from TODO list" added to staging-next

2017-03-12 Thread Tobin C. Harding
On Sun, Mar 12, 2017 at 11:02:41PM +0100, Greg KH wrote: > On Mon, Mar 13, 2017 at 07:50:42AM +1100, Tobin C. Harding wrote: > > On Sun, Mar 12, 2017 at 05:24:38PM +0100, gre...@linuxfoundation.org wrote: > > > > > > This is a note to let you know that I

[PATCH 1/3] staging: dgnc: return error code directly

2017-03-12 Thread Tobin C. Harding
-off-by: Tobin C. Harding --- drivers/staging/dgnc/dgnc_tty.c | 68 +++-- 1 file changed, 32 insertions(+), 36 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c index ffbe5a2..cbf90e0 100644 --- a/drivers/staging/dgnc

[PATCH 0/3] staging: dgnc: cleanup return statements

2017-03-12 Thread Tobin C. Harding
, and Sparse. Series does not introduce any new warnings/errors. Each patch in series has been applied and built on x86_64 and on PowerPC. Tobin C. Harding (3): staging: dgnc: return error code directly staging: dgnc: fix whitespace before return staging: dgnc: remove explicit cast drivers

[PATCH 2/3] staging: dgnc: fix whitespace before return

2017-03-12 Thread Tobin C. Harding
form throughout dgnc. Fix checkpatch CHECK. Make whitespace changes only. Signed-off-by: Tobin C. Harding --- drivers/staging/dgnc/dgnc_driver.c | 6 +- drivers/staging/dgnc/dgnc_mgmt.c | 3 ++- drivers/staging/dgnc/dgnc_tty.c| 9 +++-- 3 files changed, 14 insertions(+), 4 deletions

[PATCH 3/3] staging: dgnc: remove explicit cast

2017-03-12 Thread Tobin C. Harding
Function return type is 'int'. Returned variable is of type 'uint'. uint can be implicitly converted to int. Most significant bit is not set so there is no risk in implicit conversion. Remove unnecessary type cast. Signed-off-by: Tobin C. Harding --- drivers/staging/dgnc/

[PATCH v3 2/7] staging: ks7010: reduce level of indentation

2017-03-12 Thread Tobin C. Harding
Code is deeply nested. One level of indentation may be removed by inverting if statement conditional. Invert conditional, return if new conditional evaluates to true. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 136 +++-- 1 file

[PATCH v3 0/7] refactor hostif_data_indication()

2017-03-12 Thread Tobin C. Harding
- Drop patch renaming buffers, maybe that is stylistic and not really a candidate for changing in a checkpatch patch set. - Separate changes into different patches with the aim of more clearly doing just one thing in each patch. v1 -> v2: - Fix typo - Fix pointer dereference To

[PATCH v3 3/7] staging: ks7010: fix line continuations

2017-03-12 Thread Tobin C. Harding
changes in a single patch to give review a chance to critique the final layout of the *complex* logical statement. Signed-off-by: Tobin C. Harding --- Documentation/process/coding-style.rst states that spaces never be used for indentation. This patch violates that. Current Emacs settings (setup

[PATCH v3 1/7] staging: ks7010: move WPA code to separate function

2017-03-12 Thread Tobin C. Harding
compilation to pass, including modifying return statements. Make no other code changes, program logic is unchanged. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 176 - 1 file changed, 97 insertions(+), 79 deletions(-) diff --git a/drivers

[PATCH v3 7/7] staging: ks7010: add variables key, key_index

2017-03-12 Thread Tobin C. Harding
is used to create a string so having it named adds additional meaning when creating the string. Declare variable 'key_index' and define it at declaration time. Declare a pointer variable 'key' and define it to point to the correct key in the key table. Signed-off-by: Tobin C.

[PATCH v3 5/7] staging: ks7010: move quoted string onto single line

2017-03-12 Thread Tobin C. Harding
Checkpatch emits WARNING: quoted string split across lines. Line is already over 80 characters long, adding 3 more does little to effect line length while improving readibility. Concatenate split string into single line. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c

[PATCH v3 6/7] staging: ks7010: reduce length of comment string

2017-03-12 Thread Tobin C. Harding
Comment string is unnecessarily verbose. Checkpatch emits WARNING: line over 80 characters. Reduce comment string without loss of meaning. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging

[PATCH v3 4/7] staging: ks7010: refactor newly separated function

2017-03-12 Thread Tobin C. Harding
ace inline with kernel coding style. Fix various checkpatch warnings. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 42 +++--- 1 file changed, 17 insertions(+), 25 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers

[PATCH 0/2] staging: ks7010: fix checkpatch ks_wlan_ioctl.h

2017-03-13 Thread Tobin C. Harding
arithmetic macro definitions (24 identical cases). Tobin C. Harding (2): staging: ks7010: fix checkpatch whitespace warns staging: ks7010: add parentheses to complex macro drivers/staging/ks7010/ks_wlan_ioctl.h | 68 +- 1 file changed, 34 insertions(+), 34

[PATCH 2/2] staging: ks7010: add parentheses to complex macro

2017-03-13 Thread Tobin C. Harding
to save the next developer from having to add them. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_wlan_ioctl.h | 64 +- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/drivers/staging/ks7010/ks_wlan_ioctl.h b/drivers/staging/ks7010

[PATCH 1/2] staging: ks7010: fix checkpatch whitespace warns

2017-03-13 Thread Tobin C. Harding
CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis These are all trivial whitespace fixes. Fix them all in one patch. Change only whitespace. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_wlan_ioctl.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a

[PATCH] staging: ks7010: fix spelling of Michael MIC

2017-03-13 Thread Tobin C. Harding
off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 16 drivers/staging/ks7010/michael_mic.c | 8 drivers/staging/ks7010/michael_mic.h | 6 +++--- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/driv

Re: [PATCH 0/2] staging: ks7010: fix checkpatch ks_wlan_ioctl.h

2017-03-13 Thread Tobin C. Harding
On Mon, Mar 13, 2017 at 06:54:06PM +1100, Tobin C. Harding wrote: > Simple patch set. Clears 29 checkpatch errors/warnings. > > Patch 01 does various fixes, all whitespace only changes. > > Is this ok putting multiple checkpatch types in one patch if they are > all whitespace

[PATCH 06/12] staging: ks7010: remove multiple assignment

2017-03-13 Thread Tobin C. Harding
Checkpatch emits CHECK: multiple assignments should be avoided. Move multiple assignment onto separate lines. Fix comment to use more natural English. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_wlan_net.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff

[PATCH 02/12] staging: ks7010: fix checkpatch BLOCK_COMMENT_STYLE

2017-03-13 Thread Tobin C. Harding
Checkpatch emits block comments warnings. Change comments blocks to be inline with kernel coding style for networking code. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_wlan_net.c | 51 ++-- 1 file changed, 32 insertions(+), 19 deletions

[PATCH 01/12] staging: ks7010: fix checkpatch SPACING

2017-03-13 Thread Tobin C. Harding
Checkpatch emits over 100 instances of CHECK: No space is necessary after a cast. Remove unnecessary space. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_wlan_net.c | 212 +-- 1 file changed, 106 insertions(+), 106 deletions(-) diff --git a

[PATCH 00/12] staging: ks7010: fix checkpatch ks_wlan_net.c

2017-03-13 Thread Tobin C. Harding
t on x86_64 and PowerPC. Tobin C. Harding (12): staging: ks7010: fix checkpatch SPACING staging: ks7010: fix checkpatch BLOCK_COMMENT_STYLE staging: ks7010: convert comments to kernel doc format staging: ks7010: fix logical line continuation staging: ks7010: remove dead code staging:

[PATCH 10/12] staging: ks7010: fix checkpatch memset warning

2017-03-13 Thread Tobin C. Harding
location. Use '\0' to make explicit that it is a char pointer. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_wlan_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/ks7010/ks_wlan_net.c b/drivers/staging/ks7010/ks_wlan_net.c ind

[PATCH 09/12] staging: ks7010: remove unnecessary cast

2017-03-13 Thread Tobin C. Harding
Return value from kmalloc() does not require a cast. Remove unnecessary cast. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_wlan_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/ks7010/ks_wlan_net.c b/drivers/staging/ks7010

[PATCH 05/12] staging: ks7010: remove dead code

2017-03-13 Thread Tobin C. Harding
Checkpatch emits CHECK: Alignment should match open parenthesis. This is due to commented out code. Remove commented out (dead) code. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_wlan_net.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/ks7010

[PATCH 03/12] staging: ks7010: convert comments to kernel doc format

2017-03-13 Thread Tobin C. Harding
Function comments use a custom format. We have a standard function comment format, kernel doc format. Using the standard format aids readability and allows documentation to be produced using kernel tools. Convert function comments to use kernel doc format. Signed-off-by: Tobin C. Harding

[PATCH 04/12] staging: ks7010: fix logical line continuation

2017-03-13 Thread Tobin C. Harding
Checkpatch emits CHECK: Logical continuations should be on the previous line. Move logical continuation to previous line. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_wlan_net.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ks7010

[PATCH 08/12] staging: ks7010: remove unnecessary else statement

2017-03-13 Thread Tobin C. Harding
Checkpatch emits WARNING: else is not generally useful after a break or return. Two warnings of this type are emitted, both are the result of a else statement after a return statement. The 'else' can safely be removed. Remove unnecessary else statement. Signed-off-by: Tobin

[PATCH 12/12] staging: ks7010: refactor, whitespace only

2017-03-13 Thread Tobin C. Harding
Code may be refactored to take advantage of previous patches which reduced the level of indentation. Function parameter line breaks can be adjusted in line with kernel coding standards. Refactor layout of function call parameters. Make whitespace changes only. Signed-off-by: Tobin C. Harding

[PATCH 11/12] staging: ks7010: reduce level of indentation

2017-03-13 Thread Tobin C. Harding
. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_wlan_net.c | 195 ++- 1 file changed, 98 insertions(+), 97 deletions(-) diff --git a/drivers/staging/ks7010/ks_wlan_net.c b/drivers/staging/ks7010/ks_wlan_net.c index bb20bb9..ca46869 100644 --- a/drivers

[PATCH 07/12] staging: ks7010: move comparison to right hand side

2017-03-13 Thread Tobin C. Harding
Checkpatch emits WARNING: Comparisons should place the constant on the right side of the test. Move constant to right hand side of test, modify operator to ensure logic is maintained. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_wlan_net.c | 2 +- 1 file changed, 1 insertion

[PATCH v2] staging: ks7010: fix spelling of Michael MIC

2017-03-13 Thread Tobin C. Harding
off-by: Tobin C. Harding --- v1 -> v2: - rebase onto branch: staging-testing drivers/staging/ks7010/ks_hostif.c | 16 drivers/staging/ks7010/michael_mic.c | 8 drivers/staging/ks7010/michael_mic.h | 6 +++--- 3 files changed, 15 insertions(+), 15 deletions(-)

Re: [PATCH 03/12] staging: ks7010: convert comments to kernel doc format

2017-03-13 Thread Tobin C. Harding
On Tue, Mar 14, 2017 at 08:06:18AM +0800, Greg Kroah-Hartman wrote: > On Tue, Mar 14, 2017 at 09:54:01AM +1100, Tobin C. Harding wrote: > > Function comments use a custom format. We have a standard function > > comment format, kernel doc format. Using the standard format aids >

Re: [PATCH 09/12] staging: ks7010: remove unnecessary cast

2017-03-13 Thread Tobin C. Harding
On Tue, Mar 14, 2017 at 08:07:15AM +0800, Greg Kroah-Hartman wrote: > On Tue, Mar 14, 2017 at 09:54:07AM +1100, Tobin C. Harding wrote: > > Return value from kmalloc() does not require a cast. > > > > Remove unnecessary cast. > > > > Signed-off-by: Tobin C. Hard

[PATCH 1/6] staging: ks7010: remove custom return values

2017-03-14 Thread Tobin C. Harding
Driver code uses custom return values (often positive) to signal error condition instead of using standard kernel error codes. Replace custom return values with standard kernel error codes. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks7010_sdio.c | 161

[PATCH 3/6] staging: ks7010: replace identifier ret with rc

2017-03-14 Thread Tobin C. Harding
Code uses identifier names ret, and rc for function return values. It would be more readable if the whole driver used a single identifier for this task. Lets use 'rc' since it is the shortest. Change ret -> rc Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks701

[PATCH 4/6] staging: ks7010: make goto label naming uniform

2017-03-14 Thread Tobin C. Harding
overall cleanliness of the driver. Rename goto labels using uniform conventions. Audit all return statements. Comment obfuscated code. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks7010_sdio.c | 52 +--- 1 file changed, 25 insertions(+), 27 deletions

[PATCH 6/6] staging: ks7010: remove definition from declaration

2017-03-14 Thread Tobin C. Harding
Identifier does not need to be defined to 0 if it is assigned to before being returned on all code paths. Remove definition to 0 from declaration of return code identifier. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks7010_sdio.c | 2 +- drivers/staging/ks7010/ks_wlan_net.c | 4

[PATCH 2/6] staging: ks7010: replace identifier retval with rc

2017-03-14 Thread Tobin C. Harding
Code uses identifiers retval, ret, and rc all for function return values. It would be more readable if the whole driver used a single identifier for this task. Lets use 'rc' since it is the shortest. Change retval -> rc Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/

[PATCH 5/6] staging: ks7010: clean up return statement code

2017-03-14 Thread Tobin C. Harding
tespace changes only. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks7010_sdio.c | 16 + drivers/staging/ks7010/ks_hostif.c | 1 + drivers/staging/ks7010/ks_wlan_net.c | 45 ++-- 3 files changed, 45 insertions(+), 17 deletions(-) diff --g

[PATCH 0/6] staging: ks7010: clean up return statement code

2017-03-14 Thread Tobin C. Harding
ch and introduced no new warnings. Also checked with checkpatch --strict, I don't think series introduces any new warnings (there are a whole bunch still to go). Tobin C. Harding (6): staging: ks7010: remove custom return values staging: ks7010: replace identifier retval with rc stag

Re: [PATCH 07/12] staging: ks7010: move comparison to right hand side

2017-03-14 Thread Tobin C. Harding
On Tue, Mar 14, 2017 at 12:17:49PM +0300, Dan Carpenter wrote: > On Tue, Mar 14, 2017 at 09:54:05AM +1100, Tobin C. Harding wrote: > > Checkpatch emits WARNING: Comparisons should place the constant on the > > right side of the test. > > > > Move constant to righ

Re: [PATCH 10/12] staging: ks7010: fix checkpatch memset warning

2017-03-14 Thread Tobin C. Harding
On Tue, Mar 14, 2017 at 12:27:07PM +0300, Dan Carpenter wrote: > This code is #ifdeffed out so you should just delete it instead of > fixing it. The TODO file specifically asks for ifdeffed code not to be removed unless one knows exactly what is going on. I hope to get to that level but am not the

Re: [PATCH 08/12] staging: ks7010: remove unnecessary else statement

2017-03-14 Thread Tobin C. Harding
On Tue, Mar 14, 2017 at 12:23:14PM +0300, Dan Carpenter wrote: > On Tue, Mar 14, 2017 at 09:54:06AM +1100, Tobin C. Harding wrote: > > @@ -2196,20 +2195,21 @@ static int ks_wlan_set_pmksa(struct net_device *dev, > > case IW_PMKSA_REMOVE: > > if (list_empt

Re: [PATCH 1/3] Staging: ks7010: ks_*: Use preferred 'u8' kernel type over 'uint8_t'

2017-03-14 Thread Tobin C. Harding
On Tue, Mar 14, 2017 at 04:12:31PM +0100, Shiva Kerdel wrote: > Hello Tobin, > > I missed the other files because they did not show up using the checkpatch > script. > Next time I will do a recursive search through the files before committing > the changes to avoid this situation. > > Before I

Re: [PATCH 08/12] staging: ks7010: remove unnecessary else statement

2017-03-14 Thread Tobin C. Harding
On Tue, Mar 14, 2017 at 02:18:46PM +0300, Dan Carpenter wrote: > On Tue, Mar 14, 2017 at 09:54:22PM +1100, Tobin C. Harding wrote: > > On the topic of "one thing per patch", so we are aiming to do one > > thing per patch so it is easier to locate bugs if they get introduc

Re: [PATCH 1/3] staging: dgnc: return error code directly

2017-03-14 Thread Tobin C. Harding
On Tue, Mar 14, 2017 at 03:00:48PM +0300, Dan Carpenter wrote: > On Mon, Mar 13, 2017 at 12:37:32PM +1100, Tobin C. Harding wrote: > > if (!tty || tty->magic != TTY_MAGIC) > > - return rc; > > + return -EIO; > > > > [ snip ] > >

<    1   2   3   4   5   6   >