From: Rodolfo Giometti <giometti@enneenne.com>
To: keliu <liuke94@huawei.com>,
gregkh@linuxfoundation.org, andriy.shevchenko@linux.intel.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pps: clients: Directly use ida_alloc()/free()
Date: Fri, 27 May 2022 09:36:57 +0200 [thread overview]
Message-ID: <98e236c5-fe7e-51bf-3817-2aa721fe79bc@enneenne.com> (raw)
In-Reply-To: <20220527072520.2374615-1-liuke94@huawei.com>
On 27/05/22 09:25, keliu wrote:
> Use ida_alloc()/ida_free() instead of deprecated
> ida_simple_get()/ida_simple_remove() .
>
> Signed-off-by: keliu <liuke94@huawei.com>
Acked-by: Rodolfo Giometti <giometti@enneenne.com>
> ---
> drivers/pps/clients/pps_parport.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/pps/clients/pps_parport.c b/drivers/pps/clients/pps_parport.c
> index 42f93d4c6ee3..af972cdc04b5 100644
> --- a/drivers/pps/clients/pps_parport.c
> +++ b/drivers/pps/clients/pps_parport.c
> @@ -148,7 +148,7 @@ static void parport_attach(struct parport *port)
> return;
> }
>
> - index = ida_simple_get(&pps_client_index, 0, 0, GFP_KERNEL);
> + index = ida_alloc(&pps_client_index, GFP_KERNEL);
> memset(&pps_client_cb, 0, sizeof(pps_client_cb));
> pps_client_cb.private = device;
> pps_client_cb.irq_func = parport_irq;
> @@ -188,7 +188,7 @@ static void parport_attach(struct parport *port)
> err_unregister_dev:
> parport_unregister_device(device->pardev);
> err_free:
> - ida_simple_remove(&pps_client_index, index);
> + ida_free(&pps_client_index, index);
> kfree(device);
> }
>
> @@ -208,7 +208,7 @@ static void parport_detach(struct parport *port)
> pps_unregister_source(device->pps);
> parport_release(pardev);
> parport_unregister_device(pardev);
> - ida_simple_remove(&pps_client_index, device->index);
> + ida_free(&pps_client_index, device->index);
> kfree(device);
> }
>
--
GNU/Linux Solutions e-mail: giometti@enneenne.com
Linux Device Driver giometti@linux.it
Embedded Systems phone: +39 349 2432127
UNIX programming skype: rodolfo.giometti
prev parent reply other threads:[~2022-05-27 7:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-27 7:25 keliu
2022-05-27 7:36 ` Rodolfo Giometti [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=98e236c5-fe7e-51bf-3817-2aa721fe79bc@enneenne.com \
--to=giometti@enneenne.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=gregkh@linuxfoundation.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®