lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAP+cEOOEmbgon-VjUQtVBVXDcsgmJ1EZr7p=kqt04eUE3D9TeA@mail.gmail.com>
Date:   Tue, 7 Nov 2023 08:04:45 +0100
From:   Vaibhav Gupta <vaibhavgupta40@...il.com>
To:     Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc:     Jens Taprogge <jens.taprogge@...rogge.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
        industrypack-devel@...ts.sourceforge.net
Subject: Re: [PATCH] ipack: Remove usage of the deprecated ida_simple_xx() API

Hello Christophe,
Thank you for your patch.

Acked-by: Vaibhav Gupta <vaibhavgupta40@...il.com>

Hey Greg, could you please add this patch to your misc tree?

Thanks,
Vaibhav

On Wed, Nov 1, 2023 at 10:41 AM Christophe JAILLET
<christophe.jaillet@...adoo.fr> 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@...adoo.fr>
> ---
>  drivers/ipack/ipack.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/ipack/ipack.c b/drivers/ipack/ipack.c
> index cc1ecfd49928..b1471ba016a5 100644
> --- a/drivers/ipack/ipack.c
> +++ b/drivers/ipack/ipack.c
> @@ -207,7 +207,7 @@ struct ipack_bus_device *ipack_bus_register(struct device *parent, int slots,
>         if (!bus)
>                 return NULL;
>
> -       bus_nr = ida_simple_get(&ipack_ida, 0, 0, GFP_KERNEL);
> +       bus_nr = ida_alloc(&ipack_ida, GFP_KERNEL);
>         if (bus_nr < 0) {
>                 kfree(bus);
>                 return NULL;
> @@ -237,7 +237,7 @@ int ipack_bus_unregister(struct ipack_bus_device *bus)
>  {
>         bus_for_each_dev(&ipack_bus_type, NULL, bus,
>                 ipack_unregister_bus_member);
> -       ida_simple_remove(&ipack_ida, bus->bus_nr);
> +       ida_free(&ipack_ida, bus->bus_nr);
>         kfree(bus);
>         return 0;
>  }
> --
> 2.34.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ