Function is a candidate for refactoring. None of the kernel static
analysis tools warn about this function but the function has a number
of code smells. There is a block of code separated into a anonymous
compound statement, this is not usual kernel code style and can easily
be factored into a separate function. There are a number of function
calls that could be formatted better to make the code more
readable. Finally there is extraneous whitespace that can be remove,
also mildly improving readability.

Patch 01 reduces the level of indentation.

Patch 02 factors out compound statement.

Patch 03 removes extraneous newlines.

Code is untested. Builds on x86_64 and PowerPC.

Tobin C. Harding (3):
  staging: ks7010: invert conditional, reduce indentation
  staging: ks7010: factor out send stop request
  staging: ks7010: remove extraneous newlines.

 drivers/staging/ks7010/ks7010_sdio.c | 108 ++++++++++++++++++-----------------
 1 file changed, 57 insertions(+), 51 deletions(-)

-- 
2.7.4

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

Reply via email to