From: Mathieu Poirier <mathieu.poirier@linaro.org>
To: Jori Koolstra <jkoolstra@xs4all.nl>
Cc: gregkh@linuxfoundation.org,
Bjorn Andersson <andersson@kernel.org>,
"open list:REMOTE PROCESSOR MESSAGING (RPMSG) SUBSYSTEM"
<linux-remoteproc@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drivers: rpmsg: class_destroy() is deprecated
Date: Mon, 9 Mar 2026 08:37:10 -0600 [thread overview]
Message-ID: <aa7bFpwOKHz2727C@p14s> (raw)
In-Reply-To: <20260308140850.1138376-1-jkoolstra@xs4all.nl>
On Sun, Mar 08, 2026 at 03:08:49PM +0100, Jori Koolstra wrote:
> The class_destroy() function documents that:
>
> Note, the pointer to be destroyed must have been created with a call
> to class_create().
>
> However, class_create() is deprecated. rpmsg already uses
> class_register() but the class_destroy() calls should also be replaced
> with class_unregister().
>
> Link: https://lore.kernel.org/all/2023040244-duffel-pushpin-f738@gregkh/
> Signed-off-by: Jori Koolstra <jkoolstra@xs4all.nl>
> ---
> drivers/rpmsg/rpmsg_core.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
Applied - thanks,
Mathieu
> diff --git a/drivers/rpmsg/rpmsg_core.c b/drivers/rpmsg/rpmsg_core.c
> index 96964745065b..948541656950 100644
> --- a/drivers/rpmsg/rpmsg_core.c
> +++ b/drivers/rpmsg/rpmsg_core.c
> @@ -650,7 +650,7 @@ static int __init rpmsg_init(void)
> ret = bus_register(&rpmsg_bus);
> if (ret) {
> pr_err("failed to register rpmsg bus: %d\n", ret);
> - class_destroy(&rpmsg_class);
> + class_unregister(&rpmsg_class);
> }
> return ret;
> }
> @@ -659,7 +659,7 @@ postcore_initcall(rpmsg_init);
> static void __exit rpmsg_fini(void)
> {
> bus_unregister(&rpmsg_bus);
> - class_destroy(&rpmsg_class);
> + class_unregister(&rpmsg_class);
> }
> module_exit(rpmsg_fini);
>
>
> base-commit: d466c332e106fe666d1e2f5a24d08e308bebbfa1
> --
> 2.53.0
>
prev parent reply other threads:[~2026-03-09 14:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-08 14:08 [PATCH] drivers: rpmsg: class_destroy() is deprecated Jori Koolstra
2026-03-08 14:22 ` Greg KH
2026-03-09 14:37 ` Mathieu Poirier [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=aa7bFpwOKHz2727C@p14s \
--to=mathieu.poirier@linaro.org \
--cc=andersson@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jkoolstra@xs4all.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.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