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-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 07 Jun 2012 12:49:49 +0200
From:	Bjørn Mork <bjorn@...k.no>
To:	Stefani Seibold <stefani@...bold.net>
Cc:	linux-kernel@...r.kernel.org, gregkh@...uxfoundation.org,
	oneukum@...e.de, linux-usb@...r.kernel.org
Subject: Re: [PATCH 02/13] code cleanup

Stefani Seibold <stefani@...bold.net> writes:

> If it is necessary...

So, why is it necessary for you to change this code *from* the style
recommended by CodingStyle and LDD3?

Quoting from LDD3:

 "Error recovery is sometimes best handled with the goto statement. We
  normally hate to use goto, but in our opinion, this is one situation
  where it is useful. Careful use of goto in error situations can
  eliminate a great deal of complicated, highly-indented, "structured"
  logic. Thus, in the kernel, goto is often used as shown here to deal
  with errors."

> Compacting improves since it will make the code more readable.

No, it does not.  As pointed out, instead of having to follow a single
exit path from each function, your changes makes it necessary to follow
n exit paths.  That does not make the code more readable, and it
contradicts both CodingStyle and LDD3.

Note that I am not stating in any way that those documents contain
absolute truths and that you cannot write your own driver the way you
like.  I do however find it extremely strange that you insist on
changing a coding example to be inconsistent with those documents.
Regardless of whether you agree with them or not, you must see that such
inconsistent guidelines will be a problem for anyone trying to use this
code for learning?


Bjørn
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ