* [PATCH] misc: cb710: Replace deprecated PCI functions
@ 2025-09-19 8:32 Madhur Kumar
2025-09-20 16:25 ` Michał Mirosław
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Madhur Kumar @ 2025-09-19 8:32 UTC (permalink / raw)
To: mirq-linux; +Cc: arnd, gregkh, linux-kernel, Madhur Kumar
pcim_iomap_table() and pcim_iomap_regions() have been deprecated.
Replace them with pcim_iomap_region().
Signed-off-by: Madhur Kumar <madhurkumar004@gmail.com>
---
drivers/misc/cb710/core.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/misc/cb710/core.c b/drivers/misc/cb710/core.c
index 55b7ee0e8f93..033e9e6d37db 100644
--- a/drivers/misc/cb710/core.c
+++ b/drivers/misc/cb710/core.c
@@ -223,13 +223,12 @@ 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)
+ return -ENOMEM;
pci_set_drvdata(pdev, chip);
--
2.51.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] misc: cb710: Replace deprecated PCI functions
2025-09-19 8:32 [PATCH] misc: cb710: Replace deprecated PCI functions Madhur Kumar
@ 2025-09-20 16:25 ` Michał Mirosław
2025-10-04 21:53 ` Madhur Kumar
2025-10-07 12:43 ` Greg KH
2025-10-13 13:28 ` [PATCH v2] " Madhur Kumar
2 siblings, 1 reply; 8+ messages in thread
From: Michał Mirosław @ 2025-09-20 16:25 UTC (permalink / raw)
To: Madhur Kumar; +Cc: arnd, gregkh, linux-kernel
On Fri, Sep 19, 2025 at 02:02:14PM +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>
Acked-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
> ---
> drivers/misc/cb710/core.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/misc/cb710/core.c b/drivers/misc/cb710/core.c
> index 55b7ee0e8f93..033e9e6d37db 100644
> --- a/drivers/misc/cb710/core.c
> +++ b/drivers/misc/cb710/core.c
> @@ -223,13 +223,12 @@ 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)
> + return -ENOMEM;
>
> pci_set_drvdata(pdev, chip);
>
> --
> 2.51.0
>
--
Michał Mirosław
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] misc: cb710: Replace deprecated PCI functions
2025-09-20 16:25 ` Michał Mirosław
@ 2025-10-04 21:53 ` Madhur Kumar
2025-10-05 6:24 ` Greg KH
0 siblings, 1 reply; 8+ messages in thread
From: Madhur Kumar @ 2025-10-04 21:53 UTC (permalink / raw)
To: mirq-linux; +Cc: arnd, gregkh, linux-kernel, madhurkumar004
On Sat, Sep 20, 2025 at 18:25:13 +0200, Michał Mirosław wrote:
> Acked-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Thanks for the Ack!
Has this patch been applied or queued somewhere? Any feedback on the change?
Thanks,
Madhur Kumar
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] misc: cb710: Replace deprecated PCI functions
2025-10-04 21:53 ` Madhur Kumar
@ 2025-10-05 6:24 ` Greg KH
0 siblings, 0 replies; 8+ messages in thread
From: Greg KH @ 2025-10-05 6:24 UTC (permalink / raw)
To: Madhur Kumar; +Cc: mirq-linux, arnd, linux-kernel
On Sun, Oct 05, 2025 at 03:23:04AM +0530, Madhur Kumar wrote:
> On Sat, Sep 20, 2025 at 18:25:13 +0200, Michał Mirosław wrote:
> > Acked-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
>
> Thanks for the Ack!
>
> Has this patch been applied or queued somewhere? Any feedback on the change?
It's the middle of the merge window, I can't do anything with it until
after -rc1 is out.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] misc: cb710: Replace deprecated PCI functions
2025-09-19 8:32 [PATCH] misc: cb710: Replace deprecated PCI functions Madhur Kumar
2025-09-20 16:25 ` Michał Mirosław
@ 2025-10-07 12:43 ` Greg KH
2025-10-13 13:28 ` [PATCH v2] " Madhur Kumar
2 siblings, 0 replies; 8+ messages in thread
From: Greg KH @ 2025-10-07 12:43 UTC (permalink / raw)
To: Madhur Kumar; +Cc: mirq-linux, arnd, linux-kernel
On Fri, Sep 19, 2025 at 02:02:14PM +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>
> ---
> drivers/misc/cb710/core.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/misc/cb710/core.c b/drivers/misc/cb710/core.c
> index 55b7ee0e8f93..033e9e6d37db 100644
> --- a/drivers/misc/cb710/core.c
> +++ b/drivers/misc/cb710/core.c
> @@ -223,13 +223,12 @@ 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)
> + return -ENOMEM;
>
> pci_set_drvdata(pdev, chip);
>
> --
> 2.51.0
>
Hi,
This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him
a patch that has triggered this response. He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created. Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.
You are receiving this message because of the following common error(s)
as indicated below:
- Your patch contains warnings and/or errors noticed by the
scripts/checkpatch.pl tool.
If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.
thanks,
greg k-h's patch email bot
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2] misc: cb710: Replace deprecated PCI functions
2025-09-19 8:32 [PATCH] misc: cb710: Replace deprecated PCI functions Madhur Kumar
2025-09-20 16:25 ` Michał Mirosław
2025-10-07 12:43 ` Greg KH
@ 2025-10-13 13:28 ` Madhur Kumar
2025-11-11 15:21 ` Philipp Stanner
2 siblings, 1 reply; 8+ messages in thread
From: Madhur Kumar @ 2025-10-13 13:28 UTC (permalink / raw)
To: arnd, gregkh, mirq-linux; +Cc: linux-kernel, Madhur Kumar
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)
+ return -ENOMEM;
pci_set_drvdata(pdev, chip);
--
2.51.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v2] misc: cb710: Replace deprecated PCI functions
2025-10-13 13:28 ` [PATCH v2] " Madhur Kumar
@ 2025-11-11 15:21 ` Philipp Stanner
2025-11-11 15:59 ` Madhur Kumar
0 siblings, 1 reply; 8+ messages in thread
From: Philipp Stanner @ 2025-11-11 15:21 UTC (permalink / raw)
To: Madhur Kumar, arnd, gregkh, mirq-linux; +Cc: linux-kernel
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);
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] misc: cb710: Replace deprecated PCI functions
2025-11-11 15:21 ` Philipp Stanner
@ 2025-11-11 15:59 ` Madhur Kumar
0 siblings, 0 replies; 8+ messages in thread
From: Madhur Kumar @ 2025-11-11 15:59 UTC (permalink / raw)
To: phasta; +Cc: arnd, gregkh, linux-kernel, madhurkumar004, mirq-linux, phasta
On Tue, 11 Nov 2025 16:21:30 +0100, Philipp Stanner wrote:
>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.
Thank you for pointing it out but the issue if already been fixed by
Dan Carpenter
https://lore.kernel.org/all/aQITFDPyuzjNN4GN@stanley.mountain/
--
Madhur Kumar
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2025-11-11 15:59 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-19 8:32 [PATCH] misc: cb710: Replace deprecated PCI functions 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
2025-11-11 15:59 ` Madhur Kumar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox