mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Philipp Stanner <phasta@mailbox.org>
To: Madhur Kumar <madhurkumar004@gmail.com>,
	arnd@arndb.de,  gregkh@linuxfoundation.org,
	mirq-linux@rere.qmqm.pl
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] misc: cb710: Replace deprecated PCI functions
Date: Tue, 11 Nov 2025 16:21:30 +0100	[thread overview]
Message-ID: <629a4be58b02dac86d267fb00b8e44d7aa01877d.camel@mailbox.org> (raw)
In-Reply-To: <20251013132833.1783880-1-madhurkumar004@gmail.com>

On Mon, 2025-10-13 at 18:58 +0530, Madhur Kumar wrote:
> pcim_iomap_table() and pcim_iomap_regions() have been deprecated.
> Replace them with pcim_iomap_region().
> 
> Signed-off-by: Madhur Kumar <madhurkumar004@gmail.com>
> ---
> v2: fix checkpatch warning for missing space after 'if' in core.c
> 
>  drivers/misc/cb710/core.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/misc/cb710/core.c b/drivers/misc/cb710/core.c
> index 55b7ee0e8f93..a1e6ba62c298 100644
> --- a/drivers/misc/cb710/core.c
> +++ b/drivers/misc/cb710/core.c
> @@ -223,13 +223,11 @@ static int cb710_probe(struct pci_dev *pdev,
>  	if (err)
>  		return err;
>  
> -	err = pcim_iomap_regions(pdev, 0x0001, KBUILD_MODNAME);
> -	if (err)
> -		return err;
> -
>  	spin_lock_init(&chip->irq_lock);
>  	chip->pdev = pdev;
> -	chip->iobase = pcim_iomap_table(pdev)[0];
> +	chip->iobase = pcim_iomap_region(pdev, 0, KBUILD_MODNAME);
> +	if (!chip->iobase)

Nope, this is wrong. pcim_iomap_region() returns an ERR_PTR on error,
not NULL. You need to check it with IS_ERR or similar.

Sry, late to the party, but just saw this. It was applied already, so
someone should send a fix. I could, but maybe Madhur can do it faster
since he's got the branch etc already.

Thx,
P.

> +		return -ENOMEM;
>  
>  	pci_set_drvdata(pdev, chip);
>  


  reply	other threads:[~2025-11-11 15:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-19  8:32 [PATCH] " Madhur Kumar
2025-09-20 16:25 ` Michał Mirosław
2025-10-04 21:53   ` Madhur Kumar
2025-10-05  6:24     ` Greg KH
2025-10-07 12:43 ` Greg KH
2025-10-13 13:28 ` [PATCH v2] " Madhur Kumar
2025-11-11 15:21   ` Philipp Stanner [this message]
2025-11-11 15:59     ` Madhur Kumar

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=629a4be58b02dac86d267fb00b8e44d7aa01877d.camel@mailbox.org \
    --to=phasta@mailbox.org \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=madhurkumar004@gmail.com \
    --cc=mirq-linux@rere.qmqm.pl \
    --cc=phasta@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®