mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: keliu <liuke94@huawei.com>,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drivers: slimbus: Directly use ida_alloc()/free()
Date: Mon, 6 Jun 2022 11:10:22 +0100	[thread overview]
Message-ID: <a9ce408f-eaea-40db-34be-26e51cbb3515@linaro.org> (raw)
In-Reply-To: <20220527073053.2402630-1-liuke94@huawei.com>



On 27/05/2022 08:30, keliu wrote:
> Use ida_alloc()/ida_free() instead of deprecated
> ida_simple_get()/ida_simple_remove() .
> 
> Signed-off-by: keliu <liuke94@huawei.com>

Applied thanks,

--srini
> ---
>   drivers/slimbus/core.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/slimbus/core.c b/drivers/slimbus/core.c
> index 78480e332ab8..219483b79c09 100644
> --- a/drivers/slimbus/core.c
> +++ b/drivers/slimbus/core.c
> @@ -250,7 +250,7 @@ int slim_register_controller(struct slim_controller *ctrl)
>   {
>   	int id;
>   
> -	id = ida_simple_get(&ctrl_ida, 0, 0, GFP_KERNEL);
> +	id = ida_alloc(&ctrl_ida, GFP_KERNEL);
>   	if (id < 0)
>   		return id;
>   
> @@ -299,7 +299,7 @@ int slim_unregister_controller(struct slim_controller *ctrl)
>   {
>   	/* Remove all clients */
>   	device_for_each_child(ctrl->dev, NULL, slim_ctrl_remove_device);
> -	ida_simple_remove(&ctrl_ida, ctrl->id);
> +	ida_free(&ctrl_ida, ctrl->id);
>   
>   	return 0;
>   }
> @@ -323,7 +323,7 @@ void slim_report_absent(struct slim_device *sbdev)
>   	sbdev->is_laddr_valid = false;
>   	mutex_unlock(&ctrl->lock);
>   	if (!ctrl->get_laddr)
> -		ida_simple_remove(&ctrl->laddr_ida, sbdev->laddr);
> +		ida_free(&ctrl->laddr_ida, sbdev->laddr);
>   	slim_device_update_status(sbdev, SLIM_DEVICE_STATUS_DOWN);
>   }
>   EXPORT_SYMBOL_GPL(slim_report_absent);

      reply	other threads:[~2022-06-06 10:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-27  7:30 keliu
2022-06-06 10:10 ` Srinivas Kandagatla [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=a9ce408f-eaea-40db-34be-26e51cbb3515@linaro.org \
    --to=srinivas.kandagatla@linaro.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liuke94@huawei.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®