mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Scott Branden <scott.branden@broadcom.com>
To: Breno Leitao <leitao@leitao.org>, bcm-kernel-feedback-list@broadcom.com
Cc: leit@fb.com, linux-kernel@vger.kernel.org,
	Breno Leitao <leitao@debian.org>
Subject: Re: [PATCH] misc: bcm_vk: Remove usage of deprecated functions
Date: Wed, 3 Aug 2022 12:09:44 -0700	[thread overview]
Message-ID: <612446a2-5a22-a349-35fc-47f34792b504@broadcom.com> (raw)
In-Reply-To: <20220727111435.2153813-1-leitao@leitao.org>

[-- Attachment #1: Type: text/plain, Size: 1844 bytes --]

Unsure, you may need to add Greg K-H to the to email for him to see this 
patch as he picks up misc drivers in his tree.

On 2022-07-27 04:14, Breno Leitao wrote:
> From: Breno Leitao <leitao@debian.org>
> 
> ida_simple_get() and ida_simple_remove() functions are deprecated now.
> These functions were replaced by ida_alloc() and ida_free()
> respectively. This patch modernizes the bcm_vk driver to use the
> replacement functions.
> 
> Signed-off-by: Breno Leitao <leitao@debian.org>
Acked-by: Scott Branden <scott.branden@broadcom.com>
> ---
>   drivers/misc/bcm-vk/bcm_vk_dev.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/misc/bcm-vk/bcm_vk_dev.c b/drivers/misc/bcm-vk/bcm_vk_dev.c
> index a16b99bdaa13..a3a82ebbc699 100644
> --- a/drivers/misc/bcm-vk/bcm_vk_dev.c
> +++ b/drivers/misc/bcm-vk/bcm_vk_dev.c
> @@ -1401,7 +1401,7 @@ static int bcm_vk_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>   		bcm_vk_tty_set_irq_enabled(vk, i);
>   	}
>   
> -	id = ida_simple_get(&bcm_vk_ida, 0, 0, GFP_KERNEL);
> +	id = ida_alloc(&bcm_vk_ida, GFP_KERNEL);
>   	if (id < 0) {
>   		err = id;
>   		dev_err(dev, "unable to get id\n");
> @@ -1500,7 +1500,7 @@ static int bcm_vk_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>   	misc_device->name = NULL;
>   
>   err_ida_remove:
> -	ida_simple_remove(&bcm_vk_ida, id);
> +	ida_free(&bcm_vk_ida, id);
>   
>   err_irq:
>   	for (i = 0; i < vk->num_irqs; i++)
> @@ -1573,7 +1573,7 @@ static void bcm_vk_remove(struct pci_dev *pdev)
>   	if (misc_device->name) {
>   		misc_deregister(misc_device);
>   		kfree(misc_device->name);
> -		ida_simple_remove(&bcm_vk_ida, vk->devid);
> +		ida_free(&bcm_vk_ida, vk->devid);
>   	}
>   	for (i = 0; i < vk->num_irqs; i++)
>   		devm_free_irq(&pdev->dev, pci_irq_vector(pdev, i), vk);

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4212 bytes --]

       reply	other threads:[~2022-08-03 19:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20220727111435.2153813-1-leitao@leitao.org>
2022-08-03 19:09 ` Scott Branden [this message]
2022-08-12  9:47   ` [RESEND PATCH] " Breno Leitao
2022-07-29 10:52 [PATCH] " Breno Leitao

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=612446a2-5a22-a349-35fc-47f34792b504@broadcom.com \
    --to=scott.branden@broadcom.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=leit@fb.com \
    --cc=leitao@debian.org \
    --cc=leitao@leitao.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®