mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rodolfo Giometti <giometti@enneenne.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	akpm@linux-foundation.org
Subject: Re: [PATCH RESEND] pps: Remove usage of the deprecated ida_simple_xx() API
Date: Mon, 15 Apr 2024 08:17:30 +0200	[thread overview]
Message-ID: <0fc6dd85-3ac1-40c0-aecf-01ee758e6893@enneenne.com> (raw)
In-Reply-To: <9f681747d446b874952a892491387d79ffe565a9.1713089394.git.christophe.jaillet@wanadoo.fr>

On 14/04/24 12:10, 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.
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

Acked-by: Rodolfo Giometti <giometti@enneenne.com>

> ---
> This patch has been sent about 3 months ago [1].
> A gentle reminder has been sent 1 month later [2].
> 
> Neither one got any reply.
> 
> So, I'm adding Andrew Morton in To:, in order to help in the merge process.
> 
> Context:
> =======
> All patches to remove the ida_simple API have been sent.
> Matthew Wilcox seems happy with the on going work. (see [3])
> 
> Based on next-20240412
> $git grep ida_simple_get | wc -l
> 25
> 
> Based on next-20240220
> $git grep ida_simple_get | wc -l
> 36
> 
> https://elixir.bootlin.com/linux/v6.8-rc3/A/ident/ida_simple_get
> 50
> 
> https://elixir.bootlin.com/linux/v6.7.4/A/ident/ida_simple_get
> 81
> 
> Thanks
> CJ
> 
> [1]: https://lore.kernel.org/all/5065a9fe3101dcb7ee0a79bde0ec84de03c637ec.1702230047.git.christophe.jaillet@wanadoo.fr/
> [2]: https://lore.kernel.org/all/9bfe4d6b-d289-40bc-b9fa-bd34c08e6e03@wanadoo.fr/
> [3]: https://lore.kernel.org/all/ZaqruGVz734zjxrZ@casper.infradead.org/
> ---
>   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


      reply	other threads:[~2024-04-15  6:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-14 10:10 Christophe JAILLET
2024-04-15  6:17 ` 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=0fc6dd85-3ac1-40c0-aecf-01ee758e6893@enneenne.com \
    --to=giometti@enneenne.com \
    --cc=akpm@linux-foundation.org \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®