All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] staging: ks7010: refactor ks7010_sdio_remove()
@ 2017-03-28  6:45 Tobin C. Harding
  2017-03-28  6:45 ` [PATCH 1/3] staging: ks7010: invert conditional, reduce indentation Tobin C. Harding
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Tobin C. Harding @ 2017-03-28  6:45 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Linux Driver Project Developer List, Wolfram Sang

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

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

end of thread, other threads:[~2017-03-28  6:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-28  6:45 [PATCH 0/4] staging: ks7010: refactor ks7010_sdio_remove() Tobin C. Harding
2017-03-28  6:45 ` [PATCH 1/3] staging: ks7010: invert conditional, reduce indentation Tobin C. Harding
2017-03-28  6:45 ` [PATCH 2/3] staging: ks7010: factor out send stop request Tobin C. Harding
2017-03-28  6:45 ` [PATCH 3/3] staging: ks7010: remove extraneous newlines 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.