From: Greg KH <gregkh@linuxfoundation.org>
To: Qu Wenruo <wqu@suse.com>
Cc: rafael@kernel.org, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] kobject: unexport kobject_create() in kobject.h
Date: Tue, 31 Aug 2021 22:06:15 +0200 [thread overview]
Message-ID: <YS6Lt4OCbbauJHXo@kroah.com> (raw)
In-Reply-To: <20210831093044.110729-1-wqu@suse.com>
On Tue, Aug 31, 2021 at 05:30:44PM +0800, Qu Wenruo wrote:
> The function kobject_create() is only used by one caller,
> kobject_create_and_add(), no other driver uses it, nor is exported to
> other modules.
>
> However it's still exported in kobject.h, and can sometimes confuse
> users of kobject.h.
>
> Since all users should call kobject_create_and_add(), or if extra
> attributes are needed, should alloc the memory manually then call
> kobject_init_and_add().
>
> Signed-off-by: Qu Wenruo <wqu@suse.com>
> ---
> include/linux/kobject.h | 1 -
> lib/kobject.c | 2 +-
> 2 files changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/include/linux/kobject.h b/include/linux/kobject.h
> index ea30529fba08..efd56f990a46 100644
> --- a/include/linux/kobject.h
> +++ b/include/linux/kobject.h
> @@ -101,7 +101,6 @@ int kobject_init_and_add(struct kobject *kobj,
>
> extern void kobject_del(struct kobject *kobj);
>
> -extern struct kobject * __must_check kobject_create(void);
> extern struct kobject * __must_check kobject_create_and_add(const char *name,
> struct kobject *parent);
>
> diff --git a/lib/kobject.c b/lib/kobject.c
> index ea53b30cf483..4a56f519139d 100644
> --- a/lib/kobject.c
> +++ b/lib/kobject.c
> @@ -777,7 +777,7 @@ static struct kobj_type dynamic_kobj_ktype = {
> * call to kobject_put() and not kfree(), as kobject_init() has
> * already been called on this structure.
> */
> -struct kobject *kobject_create(void)
> +static struct kobject *kobject_create(void)
> {
> struct kobject *kobj;
>
> --
> 2.33.0
>
Hi,
This is the friendly semi-automated patch-bot of Greg Kroah-Hartman.
You have sent him a patch that has triggered this response.
Right now, the development tree you have sent a patch for is "closed"
due to the timing of the merge window. Don't worry, the patch(es) you
have sent are not lost, and will be looked at after the merge window is
over (after the -rc1 kernel is released by Linus).
So thank you for your patience and your patches will be reviewed at this
later time, you do not have to do anything further, this is just a short
note to let you know the patch status and so you don't worry they didn't
make it through.
thanks,
greg k-h's patch email bot
prev parent reply other threads:[~2021-08-31 20:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-31 9:30 [PATCH] kobject: unexport kobject_create() in kobject.h Qu Wenruo
2021-08-31 20:06 ` Greg KH [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=YS6Lt4OCbbauJHXo@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=wqu@suse.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