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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux