Skip to content

staging: rtl8712: Refactor conditionals to reduce indentation

Narcisa Ana Maria Vasile outreachy 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest4 patches 0 repliesNew
  2. v24 patches 1 replySuperseded

Changes in v3 from the cover letter

- Improve commit messages to better represent the patches

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4staging: rtl8712: Invert if statements to reduce indentation leveldrivers/staging/rtl8712/rtl871x_ioctl_linux.c+17 -220 replies
2/4staging: rtl8712: Invert the test on check_fwstate() to reduce indentationdrivers/staging/rtl8712/rtl871x_ioctl_linux.c+7 -70 replies
3/4staging: rtl8712: Restructure code for claritydrivers/staging/rtl8712/rtl871x_ioctl_linux.c+33 -360 replies
4/4staging: rtl8712: Invert comparison to reduce indentationdrivers/staging/rtl8712/rtl871x_ioctl_linux.c+5 -60 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 0/4] staging: rtl8712: Refactor conditionals to reduce indentation

This patchset reduces indentation level by inverting if statements, in order to clear out the error handling code immediately, and then continue executing the function without the excessive indentation and additional else branches.

These were found using Coccinelle.

---
Changes in v3:
- Improve commit messages to better represent the patches
Changes in v2:
- Make the commit messages more clear
- Improve layout of the functions

Narcisa Ana Maria Vasile (4):
staging: rtl8712: Invert if statements to reduce indentation level
staging: rtl8712: Invert the test on check_fwstate() to reduce
indentation
staging: rtl8712: Restructure code for clarity
staging: rtl8712: Invert comparison to reduce indentation

 drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 135 ++++++++++++--------------
 1 file changed, 63 insertions(+), 72 deletions(-)
Signature · 1 line
1.9.1