All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/12] staging: ks7010: fix checkpatch ks_wlan_net.c
@ 2017-03-13 22:53 Tobin C. Harding
  2017-03-13 22:53 ` [PATCH 01/12] staging: ks7010: fix checkpatch SPACING Tobin C. Harding
                   ` (11 more replies)
  0 siblings, 12 replies; 27+ messages in thread
From: Tobin C. Harding @ 2017-03-13 22:53 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: driverdev-devel, Wolfram Sang

Checkpatch emits various checks, warnings, and errors when parsing
ks_wlan_net.c.

Patch 01 fixes spacing issues.

Patch 02 converts block comments to use networking style block
comments.

Patch 03 converts function comments to use kernel doc format.

Patch 04 moves logical operators to the end of the previous line.

Patch 05 removes commented out code (dead code).

Patch 06 removes multiple assignment on single line.

Patch 07 moves comparison constant to the right hand side.

Patch 08 removes unnecessary else statements.

Patch 09 removes unnecessary cast from kmalloc() call.

Patch 10 replaces single byte memset with assignment.

Patch 11 reduces the level of indentation multiple times.

This patch is the meat of the patch set. I was not able to easily
visually parse the diff, admittedly I do not have a maintainers skill
at this but if there is an easier way to split this patch up I'm happy
to re-work it. First I tried reducing one level of indentation per
patch but then found there was no easy way to uniquely describe each
patch.

Patch breaks out of case block in multiple places - is
this ok? The result of this patch is less indentation, enhanced
readability, and most importantly opens up the way to refactoring that
fixes multiple types and instances of checkpatch warnings.

Multiple break statements are intermingled, breaking out of loops and
case blocks. For this reason a comment string was added to each
'break' in similar fashion to that used on #endif preprocessor
directives.

Patch 12 does whitespace refactor taking advantage of changes made in
the previous patch.

Code has not been tested. Series has been run through checkpatch
--strict, Smatch, and Sparse and does not introduce any new
errors. Each patch in series has been applied and built 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: ks7010: remove multiple assignment
  staging: ks7010: move comparison to right hand side
  staging: ks7010: remove unnecessary else statement
  staging: ks7010: remove unnecessary cast
  staging: ks7010: fix checkpatch memset warning
  staging: ks7010: reduce level of indentation
  staging: ks7010: refactor, whitespace only

 drivers/staging/ks7010/ks_wlan_net.c | 1040 +++++++++++++++++++++-------------
 1 file changed, 640 insertions(+), 400 deletions(-)

-- 
2.7.4

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2017-03-14 20:34 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-13 22:53 [PATCH 00/12] staging: ks7010: fix checkpatch ks_wlan_net.c Tobin C. Harding
2017-03-13 22:53 ` [PATCH 01/12] staging: ks7010: fix checkpatch SPACING Tobin C. Harding
2017-03-13 22:54 ` [PATCH 02/12] staging: ks7010: fix checkpatch BLOCK_COMMENT_STYLE Tobin C. Harding
2017-03-13 22:54 ` [PATCH 03/12] staging: ks7010: convert comments to kernel doc format Tobin C. Harding
2017-03-14  0:06   ` Greg Kroah-Hartman
2017-03-14  1:39     ` Tobin C. Harding
2017-03-14  1:41       ` Greg Kroah-Hartman
2017-03-13 22:54 ` [PATCH 04/12] staging: ks7010: fix logical line continuation Tobin C. Harding
2017-03-13 22:54 ` [PATCH 05/12] staging: ks7010: remove dead code Tobin C. Harding
2017-03-13 22:54 ` [PATCH 06/12] staging: ks7010: remove multiple assignment Tobin C. Harding
2017-03-13 22:54 ` [PATCH 07/12] staging: ks7010: move comparison to right hand side Tobin C. Harding
2017-03-14  9:17   ` Dan Carpenter
2017-03-14 10:42     ` Tobin C. Harding
2017-03-13 22:54 ` [PATCH 08/12] staging: ks7010: remove unnecessary else statement Tobin C. Harding
2017-03-14  9:23   ` Dan Carpenter
2017-03-14 10:54     ` Tobin C. Harding
2017-03-14 11:18       ` Dan Carpenter
2017-03-14 20:34         ` Tobin C. Harding
2017-03-13 22:54 ` [PATCH 09/12] staging: ks7010: remove unnecessary cast Tobin C. Harding
2017-03-14  0:07   ` Greg Kroah-Hartman
2017-03-14  1:41     ` Tobin C. Harding
2017-03-13 22:54 ` [PATCH 10/12] staging: ks7010: fix checkpatch memset warning Tobin C. Harding
2017-03-14  9:27   ` Dan Carpenter
2017-03-14 10:44     ` Tobin C. Harding
2017-03-14 11:08       ` Dan Carpenter
2017-03-13 22:54 ` [PATCH 11/12] staging: ks7010: reduce level of indentation Tobin C. Harding
2017-03-13 22:54 ` [PATCH 12/12] staging: ks7010: refactor, whitespace only Tobin C. Harding

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.