From: Jeff Liu <jeff.liu@oracle.com>
To: Christoph Lameter <cl@gentwo.org>
Cc: linux-mm@kvack.org, penberg@kernel.org, mpm@selenic.com
Subject: Re: [PATCH] slub: correct return errno on slab_sysfs_init failure
Date: Mon, 16 Jun 2014 23:31:34 +0800 [thread overview]
Message-ID: <539F0DD6.1050701@oracle.com> (raw)
In-Reply-To: <alpine.DEB.2.11.1406161023420.20878@gentwo.org>
On 06/16/2014 23:25 PM, Christoph Lameter wrote:
> On Mon, 16 Jun 2014, Jeff Liu wrote:
>
>>>
>>> Dont be worried. I am not sure anymore that this was such a wise move.
>>> Maybe get kset_create_and_add to return an error code instead and return
>>> that instead of -ENOSYS?
>>
>> Personally, I prefer to get kset_create_and_add() to return an error which
>> can reflect the actual cause of the failure given that kset_register() can
>> failed due to different reasons. If so, however, looks we have to make a
>> certain amount of change for the existing modules which are support sysfs
>> since they all return -ENOMEM if kset_create_and_add() return NULL, maybe
>> this is inherited from samples/kobject/kset-example.c...
>
> Probably. Could you come up with patchset to clean this up? ERR_PTR() can
> be used to return an error code in a pointer value.
Sure, I'll work it out ASAP.
Cheers,
-Jeff
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2014-06-16 15:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-12 12:56 [PATCH] slub: correct return errno on slab_sysfs_init failure Jeff Liu
2014-06-13 6:57 ` Pekka Enberg
2014-06-14 7:44 ` Jeff Liu
2014-06-13 15:53 ` Christoph Lameter
2014-06-14 7:46 ` Jeff Liu
2014-06-16 14:00 ` Christoph Lameter
2014-06-16 14:59 ` Jeff Liu
2014-06-16 15:25 ` Christoph Lameter
2014-06-16 15:31 ` Jeff Liu [this message]
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=539F0DD6.1050701@oracle.com \
--to=jeff.liu@oracle.com \
--cc=cl@gentwo.org \
--cc=linux-mm@kvack.org \
--cc=mpm@selenic.com \
--cc=penberg@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).