lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 23 Mar 2018 14:31:23 -1000
From:   Joey Pabalinas <joeypabalinas@...il.com>
To:     linux-kernel@...r.kernel.org
Cc:     Joey Pabalinas <joeypabalinas@...il.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Arnd Bergmann <arnd@...db.de>, Jiri Slaby <jslaby@...e.cz>,
        Tomasz Kramkowsk <tk@...-tk.com>
Subject: [PATCH 0/4] tty/nozomi: general module cleanup

The nozomi module code has a fair amount of sections which could
use a bit of improvement; both style and clarity could be improved
while maintaining equivalent semantics.

Cleanup messy portions of the module code while preserving existing
behavior by:

 - Replacing constructs like `len__ > TMP_BUF_MAX ? TMP_BUF_MAX : len__`
   with `min_t(u32, len__, TMP_BUF_MAX)` and function calls like
   snprintf(tbuf, ..., "%s", ...). with strscpy(tbuf, ..., ...).
 - Rename identifiers more descriptively (where appropriate).
 - Simplify deeply nested conditionals by replacing them with shallower
   (but semantically equivalent) logic.
 - Coalesce return paths / loop conditionals.
 - Remove pointless initializations and redundant parentheses/break
   statements.
 - Correct inconsistently indented lines and extraneous whitespace.

CC: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
CC: Arnd Bergmann <arnd@...db.de>
CC: Jiri Slaby <jslaby@...e.cz>
CC: Tomasz Kramkowsk <tk@...-tk.com>

Joey Pabalinas (4):
  tty/nozomi: cleanup DUMP() macro
  tty/nozomi: fix inconsistent indentation
  tty/nozomi: improve code readability and style
  tty/nozomi: refactor conditional statements

 drivers/tty/nozomi.c | 362 +++++++++++++++++++++++++--------------------------
 1 file changed, 181 insertions(+), 181 deletions(-)

-- 
2.16.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ