public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: keliu <liuke94@huawei.com>
Cc: vaibhav.sr@gmail.com, mgreer@animalcreek.com, elder@kernel.org,
	gregkh@linuxfoundation.org, vireshk@kernel.org,
	pure.logic@nexus-software.ie, greybus-dev@lists.linaro.org,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [greybus-dev] [PATCH] staging: greybus: Directly use ida_alloc()/free()
Date: Tue, 21 Jun 2022 11:13:55 +0200	[thread overview]
Message-ID: <YrGL0zLpdzGbcWE4@hovoldconsulting.com> (raw)
In-Reply-To: <20220527063528.2356712-1-liuke94@huawei.com>

On Fri, May 27, 2022 at 06:35:28AM +0000, keliu wrote:
> Use ida_alloc()/ida_free() instead of deprecated
> ida_simple_get()/ida_simple_remove() .
> 
> Signed-off-by: keliu <liuke94@huawei.com>

Is "keliu" really your full legal name?

> ---
>  drivers/staging/greybus/audio_manager.c  |  8 ++++----
>  drivers/staging/greybus/authentication.c |  4 ++--
>  drivers/staging/greybus/fw-download.c    |  4 ++--
>  drivers/staging/greybus/fw-management.c  | 12 ++++++------
>  drivers/staging/greybus/gbphy.c          |  4 ++--
>  drivers/staging/greybus/loopback.c       |  6 +++---
>  drivers/staging/greybus/raw.c            |  6 +++---
>  drivers/staging/greybus/vibrator.c       |  6 +++---
>  8 files changed, 25 insertions(+), 25 deletions(-)
 
> diff --git a/drivers/staging/greybus/authentication.c b/drivers/staging/greybus/authentication.c
> index 297e69f011c7..01dd1cd958ea 100644
> --- a/drivers/staging/greybus/authentication.c
> +++ b/drivers/staging/greybus/authentication.c
> @@ -348,7 +348,7 @@ int gb_cap_connection_init(struct gb_connection *connection)
>  err_del_cdev:
>  	cdev_del(&cap->cdev);
>  err_remove_ida:
> -	ida_simple_remove(&cap_minors_map, minor);
> +	ida_free(&cap_minors_map, minor);
>  err_connection_disable:
>  	gb_connection_disable(connection);
>  err_list_del:
> @@ -372,7 +372,7 @@ void gb_cap_connection_exit(struct gb_connection *connection)
>  
>  	device_destroy(cap_class, cap->dev_num);
>  	cdev_del(&cap->cdev);
> -	ida_simple_remove(&cap_minors_map, MINOR(cap->dev_num));
> +	ida_free(&cap_minors_map, MINOR(cap->dev_num));
>  
>  	/*
>  	 * Disallow any new ioctl operations on the char device and wait for

The above looks incomplete since you do not change the ida_simple_get()
in gb_cap_connection_init().

Please check for any similar mistakes throughout.

Johan

      reply	other threads:[~2022-06-21  9:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-27  6:35 [PATCH] staging: greybus: Directly use ida_alloc()/free() keliu
2022-06-21  9:13 ` Johan Hovold [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=YrGL0zLpdzGbcWE4@hovoldconsulting.com \
    --to=johan@kernel.org \
    --cc=elder@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=greybus-dev@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=liuke94@huawei.com \
    --cc=mgreer@animalcreek.com \
    --cc=pure.logic@nexus-software.ie \
    --cc=vaibhav.sr@gmail.com \
    --cc=vireshk@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