From: Corey Minyard <minyard@acm.org>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
openipmi-developer@lists.sourceforge.net
Subject: Re: [PATCH] ipmi: Remove usage of the deprecated ida_simple_xx() API
Date: Tue, 19 Dec 2023 06:34:20 -0600 [thread overview]
Message-ID: <ZYGNzHt8yPMPTYfd@mail.minyard.net> (raw)
In-Reply-To: <b1a7a75263400742e5fda6bd7ba426772dc8ef11.1702961986.git.christophe.jaillet@wanadoo.fr>
On Tue, Dec 19, 2023 at 06:00:39AM +0100, Christophe JAILLET wrote:
> ida_alloc() and ida_free() should be preferred to the deprecated
> ida_simple_get() and ida_simple_remove().
>
> This is less verbose.
Thanks, queued for next release.
-corey
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> drivers/char/ipmi/ipmi_msghandler.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
> index d6f14279684d..b0eedc4595b3 100644
> --- a/drivers/char/ipmi/ipmi_msghandler.c
> +++ b/drivers/char/ipmi/ipmi_msghandler.c
> @@ -3053,7 +3053,7 @@ static void cleanup_bmc_work(struct work_struct *work)
> int id = bmc->pdev.id; /* Unregister overwrites id */
>
> platform_device_unregister(&bmc->pdev);
> - ida_simple_remove(&ipmi_bmc_ida, id);
> + ida_free(&ipmi_bmc_ida, id);
> }
>
> static void
> @@ -3169,7 +3169,7 @@ static int __ipmi_bmc_register(struct ipmi_smi *intf,
>
> bmc->pdev.name = "ipmi_bmc";
>
> - rv = ida_simple_get(&ipmi_bmc_ida, 0, 0, GFP_KERNEL);
> + rv = ida_alloc(&ipmi_bmc_ida, GFP_KERNEL);
> if (rv < 0) {
> kfree(bmc);
> goto out;
> --
> 2.34.1
>
prev parent reply other threads:[~2023-12-19 12:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-19 5:00 [PATCH] ipmi: Remove usage of the deprecated ida_simple_xx() API Christophe JAILLET
2023-12-19 12:34 ` Corey Minyard [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=ZYGNzHt8yPMPTYfd@mail.minyard.net \
--to=minyard@acm.org \
--cc=christophe.jaillet@wanadoo.fr \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=openipmi-developer@lists.sourceforge.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.