* [PATCH v3 18/26] scsi: pm80xx: Use PCI_STD_NUM_BARS
[not found] <20190916204158.6889-1-efremov@linux.com>
@ 2019-09-16 20:41 ` Denis Efremov
2019-09-17 9:06 ` Jinpu Wang
2019-09-24 2:22 ` Martin K. Petersen
0 siblings, 2 replies; 6+ messages in thread
From: Denis Efremov @ 2019-09-16 20:41 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: Denis Efremov, linux-kernel, linux-pci, Andrew Murray, linux-scsi,
Jack Wang, James E.J. Bottomley
Replace the magic constant (6) with define PCI_STD_NUM_BARS representing
the number of PCI BARs.
Cc: Jack Wang <jinpu.wang@cloud.ionos.com>
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
Signed-off-by: Denis Efremov <efremov@linux.com>
---
drivers/scsi/pm8001/pm8001_hwi.c | 2 +-
drivers/scsi/pm8001/pm8001_init.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/pm8001/pm8001_hwi.c b/drivers/scsi/pm8001/pm8001_hwi.c
index 68a8217032d0..1a3661d6be06 100644
--- a/drivers/scsi/pm8001/pm8001_hwi.c
+++ b/drivers/scsi/pm8001/pm8001_hwi.c
@@ -1186,7 +1186,7 @@ static void pm8001_hw_chip_rst(struct pm8001_hba_info *pm8001_ha)
void pm8001_chip_iounmap(struct pm8001_hba_info *pm8001_ha)
{
s8 bar, logical = 0;
- for (bar = 0; bar < 6; bar++) {
+ for (bar = 0; bar < PCI_STD_NUM_BARS; bar++) {
/*
** logical BARs for SPC:
** bar 0 and 1 - logical BAR0
diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c
index 3374f553c617..aca913490eb5 100644
--- a/drivers/scsi/pm8001/pm8001_init.c
+++ b/drivers/scsi/pm8001/pm8001_init.c
@@ -401,7 +401,7 @@ static int pm8001_ioremap(struct pm8001_hba_info *pm8001_ha)
pdev = pm8001_ha->pdev;
/* map pci mem (PMC pci base 0-3)*/
- for (bar = 0; bar < 6; bar++) {
+ for (bar = 0; bar < PCI_STD_NUM_BARS; bar++) {
/*
** logical BARs for SPC:
** bar 0 and 1 - logical BAR0
--
2.21.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v3 18/26] scsi: pm80xx: Use PCI_STD_NUM_BARS
2019-09-16 20:41 ` [PATCH v3 18/26] scsi: pm80xx: Use PCI_STD_NUM_BARS Denis Efremov
@ 2019-09-17 9:06 ` Jinpu Wang
2019-09-24 2:22 ` Martin K. Petersen
1 sibling, 0 replies; 6+ messages in thread
From: Jinpu Wang @ 2019-09-17 9:06 UTC (permalink / raw)
To: Denis Efremov
Cc: Bjorn Helgaas, linux-kernel, linux-pci, Andrew Murray,
Linux SCSI Mailinglist, James E.J. Bottomley
On Mon, Sep 16, 2019 at 10:47 PM Denis Efremov <efremov@linux.com> wrote:
>
> Replace the magic constant (6) with define PCI_STD_NUM_BARS representing
> the number of PCI BARs.
>
> Cc: Jack Wang <jinpu.wang@cloud.ionos.com>
> Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
> Signed-off-by: Denis Efremov <efremov@linux.com>
Looks fine, thanks!
Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com>
> ---
> drivers/scsi/pm8001/pm8001_hwi.c | 2 +-
> drivers/scsi/pm8001/pm8001_init.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/pm8001/pm8001_hwi.c b/drivers/scsi/pm8001/pm8001_hwi.c
> index 68a8217032d0..1a3661d6be06 100644
> --- a/drivers/scsi/pm8001/pm8001_hwi.c
> +++ b/drivers/scsi/pm8001/pm8001_hwi.c
> @@ -1186,7 +1186,7 @@ static void pm8001_hw_chip_rst(struct pm8001_hba_info *pm8001_ha)
> void pm8001_chip_iounmap(struct pm8001_hba_info *pm8001_ha)
> {
> s8 bar, logical = 0;
> - for (bar = 0; bar < 6; bar++) {
> + for (bar = 0; bar < PCI_STD_NUM_BARS; bar++) {
> /*
> ** logical BARs for SPC:
> ** bar 0 and 1 - logical BAR0
> diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c
> index 3374f553c617..aca913490eb5 100644
> --- a/drivers/scsi/pm8001/pm8001_init.c
> +++ b/drivers/scsi/pm8001/pm8001_init.c
> @@ -401,7 +401,7 @@ static int pm8001_ioremap(struct pm8001_hba_info *pm8001_ha)
>
> pdev = pm8001_ha->pdev;
> /* map pci mem (PMC pci base 0-3)*/
> - for (bar = 0; bar < 6; bar++) {
> + for (bar = 0; bar < PCI_STD_NUM_BARS; bar++) {
> /*
> ** logical BARs for SPC:
> ** bar 0 and 1 - logical BAR0
> --
> 2.21.0
>
--
Jack Wang
Linux Kernel Developer
Platform Engineering Compute (IONOS Cloud)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3 18/26] scsi: pm80xx: Use PCI_STD_NUM_BARS
2019-09-16 20:41 ` [PATCH v3 18/26] scsi: pm80xx: Use PCI_STD_NUM_BARS Denis Efremov
2019-09-17 9:06 ` Jinpu Wang
@ 2019-09-24 2:22 ` Martin K. Petersen
2019-09-24 9:44 ` Denis Efremov
2019-09-26 2:29 ` Bjorn Helgaas
1 sibling, 2 replies; 6+ messages in thread
From: Martin K. Petersen @ 2019-09-24 2:22 UTC (permalink / raw)
To: Denis Efremov
Cc: Bjorn Helgaas, linux-kernel, linux-pci, Andrew Murray, linux-scsi,
Jack Wang, James E.J. Bottomley
Denis,
> Replace the magic constant (6) with define PCI_STD_NUM_BARS
> representing the number of PCI BARs.
Applied to 5.4/scsi-fixes. Thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3 18/26] scsi: pm80xx: Use PCI_STD_NUM_BARS
2019-09-24 2:22 ` Martin K. Petersen
@ 2019-09-24 9:44 ` Denis Efremov
2019-09-26 2:29 ` Bjorn Helgaas
1 sibling, 0 replies; 6+ messages in thread
From: Denis Efremov @ 2019-09-24 9:44 UTC (permalink / raw)
To: Martin K. Petersen
Cc: Bjorn Helgaas, linux-kernel, linux-pci, Andrew Murray, linux-scsi,
Jack Wang, James E.J. Bottomley
Hi,
On 24.09.2019 05:22, Martin K. Petersen wrote:
>
> Denis,
>
>> Replace the magic constant (6) with define PCI_STD_NUM_BARS
>> representing the number of PCI BARs.
>
> Applied to 5.4/scsi-fixes. Thanks!
>
This constant PCI_STD_NUM_BARS is introduced in the first patch [01/26].
I'm afraid that this patch without the first one will break the compilation.
This patchset is dedicated to Bjorn's tree. Sorry for confusing you.
Thanks,
Denis
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3 18/26] scsi: pm80xx: Use PCI_STD_NUM_BARS
2019-09-24 2:22 ` Martin K. Petersen
2019-09-24 9:44 ` Denis Efremov
@ 2019-09-26 2:29 ` Bjorn Helgaas
2019-09-26 22:51 ` Martin K. Petersen
1 sibling, 1 reply; 6+ messages in thread
From: Bjorn Helgaas @ 2019-09-26 2:29 UTC (permalink / raw)
To: Martin K. Petersen
Cc: Denis Efremov, linux-kernel, linux-pci, Andrew Murray, linux-scsi,
Jack Wang, James E.J. Bottomley
On Mon, Sep 23, 2019 at 10:22:42PM -0400, Martin K. Petersen wrote:
>
> Denis,
>
> > Replace the magic constant (6) with define PCI_STD_NUM_BARS
> > representing the number of PCI BARs.
>
> Applied to 5.4/scsi-fixes. Thanks!
I think this depends on a previous patch that actually adds the
PCI_STD_NUM_BARS definition. It will probably be easier if I apply
the whole series via the PCI tree.
Bjorn
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3 18/26] scsi: pm80xx: Use PCI_STD_NUM_BARS
2019-09-26 2:29 ` Bjorn Helgaas
@ 2019-09-26 22:51 ` Martin K. Petersen
0 siblings, 0 replies; 6+ messages in thread
From: Martin K. Petersen @ 2019-09-26 22:51 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: Martin K. Petersen, Denis Efremov, linux-kernel, linux-pci,
Andrew Murray, linux-scsi, Jack Wang, James E.J. Bottomley
Bjorn,
> I think this depends on a previous patch that actually adds the
> PCI_STD_NUM_BARS definition. It will probably be easier if I apply
> the whole series via the PCI tree.
Looks like my mail about this getting dropped due to the missing
definition got lost in transit. In any case, feel free to take this
through the PCI tree.
Acked-by: Martin K. Petersen <martin.petersen@oracle.com>
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-09-26 22:52 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20190916204158.6889-1-efremov@linux.com>
2019-09-16 20:41 ` [PATCH v3 18/26] scsi: pm80xx: Use PCI_STD_NUM_BARS Denis Efremov
2019-09-17 9:06 ` Jinpu Wang
2019-09-24 2:22 ` Martin K. Petersen
2019-09-24 9:44 ` Denis Efremov
2019-09-26 2:29 ` Bjorn Helgaas
2019-09-26 22:51 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).