From: Linus Torvalds <torvalds@linux-foundation.org>
To: Mark Fasheh <mfasheh@suse.com>
Cc: linux-kernel@vger.kernel.org, ocfs2-devel@oss.oracle.com,
Joel Becker <joel.becker@oracle.com>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [git patches] Ocfs2 and Configfs updates for 2.6.27
Date: Thu, 17 Jul 2008 11:01:40 -0700 (PDT) [thread overview]
Message-ID: <alpine.LFD.1.10.0807171056520.2959@woody.linux-foundation.org> (raw)
In-Reply-To: <20080717175146.GH28014@wotan.suse.de>
On Thu, 17 Jul 2008, Mark Fasheh wrote:
>
> The only two things that could be described as features would be:
>
> - Joel updated configfs's ->make_item() and ->make_group() callbacks to
> return more descriptive error types. This update is responsible for the
> changes to drivers/net/netconsole.c and fs/dlm/config.c as shown in the diffstat.
.. I really dislike how this was done.
This commit:
11c3b79218390a139f2d474ee1e983a672d5839a ("configfs: Allow ->make_item()
and ->make_group() to return detailed errors.")
is just ugly. Returning one value by passing a pointer to a pointer, and
the error value by returning an 'int' errno is _not_ how we do things in
the kernel.
No, we use error pointers.
IOW, you should have left the calling convention for "(*make_item)()" and
"(*make_group)()" alone, but allowed people to just do
return ERR_PTR(-ENOMEM);
etc for errors, and then in the caller you just check for IS_ERR().
That would have made the result much cleaner, and avoided that whole
"return two different things" issue.
I pulled it, but I want to register my protest.
Linus
next prev parent reply other threads:[~2008-07-17 18:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-17 17:51 Mark Fasheh
2008-07-17 18:01 ` Linus Torvalds [this message]
2008-07-17 21:20 ` Joel Becker
2008-07-17 21:45 ` [Ocfs2-devel] " Joel Becker
2008-07-17 22:30 ` Joel Becker
2008-07-18 8:48 ` Louis Rilling
2008-07-18 22:22 ` Joel Becker
-- strict thread matches above, loose matches on Subject: below --
2008-07-14 22:01 Mark Fasheh
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=alpine.LFD.1.10.0807171056520.2959@woody.linux-foundation.org \
--to=torvalds@linux-foundation.org \
--cc=akpm@linux-foundation.org \
--cc=joel.becker@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mfasheh@suse.com \
--cc=ocfs2-devel@oss.oracle.com \
/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
all inboxes | Powered by JetHome®