From: Greg KH <gregkh@linuxfoundation.org>
To: "Bjørn Mork" <bjorn@mork.no>
Cc: Stefani Seibold <stefani@seibold.net>,
linux-kernel@vger.kernel.org, oneukum@suse.de,
linux-usb@vger.kernel.org
Subject: Re: [PATCH 02/13] code cleanup
Date: Tue, 12 Jun 2012 18:03:09 -0700 [thread overview]
Message-ID: <20120613010309.GC6765@kroah.com> (raw)
In-Reply-To: <87vcj3s8fm.fsf@nemi.mork.no>
On Thu, Jun 07, 2012 at 12:49:49PM +0200, Bjørn Mork wrote:
> Stefani Seibold <stefani@seibold.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?
I totally agree, the original style should be preserved.
thanks,
greg k-h
next prev parent reply other threads:[~2012-06-13 1:03 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-07 8:20 [PATCH] fix usb skeleton driver stefani
2012-06-07 8:20 ` [PATCH 01/13] fix wrong label in skel_open stefani
2012-06-13 1:03 ` Greg KH
2012-06-07 8:20 ` [PATCH 02/13] code cleanup stefani
2012-06-07 9:06 ` Bjørn Mork
2012-06-07 9:21 ` Stefani Seibold
2012-06-07 10:49 ` Bjørn Mork
2012-06-13 1:03 ` Greg KH [this message]
2012-06-13 1:02 ` Greg KH
2012-06-13 18:00 ` Stefani Seibold
2012-06-07 8:20 ` [PATCH 03/13] remove dead code stefani
2012-06-07 15:04 ` Oliver Neukum
2012-06-07 19:40 ` Stefani Seibold
2012-06-07 8:20 ` [PATCH 04/13] remove unneeded forward declaration stefani
2012-06-07 8:20 ` [PATCH 05/13] remove pr_err() noise in skel_open stefani
2012-06-07 8:20 ` [PATCH 06/13] Handle a non blocking read without blocking stefani
2012-06-07 8:20 ` [PATCH 07/13] fix flush function stefani
2012-06-07 8:20 ` [PATCH 08/13] add fsync function stefani
2012-06-07 8:20 ` [PATCH 09/13] remove unneeded lock in skel_open stefani
2012-06-07 8:20 ` [PATCH 10/13] fix race in skel_write stefani
2012-06-07 8:20 ` [PATCH 11/13] fix kref usage in skel_open stefani
2012-06-07 8:20 ` [PATCH 12/13] Introduce single user mode stefani
2012-06-13 1:05 ` Greg KH
2012-06-07 8:20 ` [PATCH 13/13] Bump version number and add aditional author stefani
2012-06-07 9:09 ` Bjørn Mork
2012-06-13 1:00 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120613010309.GC6765@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=bjorn@mork.no \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=oneukum@suse.de \
--cc=stefani@seibold.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox