From: Bjorn Helgaas <bhelgaas@google.com>
To: Minghuan Lian <Minghuan.Lian@freescale.com>
Cc: linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
Zang Roy-R61911 <r61911@freescale.com>,
Hu Mingkai-B21284 <B21284@freescale.com>,
Scott Wood <scottwood@freescale.com>,
Yoder Stuart-B08248 <stuart.yoder@freescale.com>,
Arnd Bergmann <arnd@arndb.de>, Mohit Kumar <mohit.kumar@st.com>,
Jingoo Han <jg1.han@samsung.com>
Subject: Re: [PATCH v3 1/3] PCI: designware: Rename get_msi_data to get_msi_addr
Date: Tue, 23 Sep 2014 16:45:55 -0600 [thread overview]
Message-ID: <20140923224555.GE27117@google.com> (raw)
In-Reply-To: <1411482540-31297-3-git-send-email-Minghuan.Lian@freescale.com>
[+cc Mohit, Jingoo]
On Tue, Sep 23, 2014 at 10:28:58PM +0800, Minghuan Lian wrote:
> The function get_msi_data is used to return MSI message address.
> In order to accurately express function purpose the patch rename
> it to get_msi_addr.
>
> Signed-off-by: Minghuan Lian <Minghuan.Lian@freescale.com>
I think this looks like a good idea, but it needs an ack from Mohit and/or
Jingoo (cc'd).
You previously asked whether .get_msi_addr() should also be changed to
return u64 instead of u32. I think it should, and you can do that in a
separate patch that also changes the use in dw_msi_setup_irq() to split the
64-bit result into msg.address_lo and msg.address_hi.
I don't see any implementations of .get_msi_data() or .get_msi_addr(), so
this seems pretty straightforward.
Bjorn
> ---
> Change log:
> v3: no change
> v2: no change just derived from v1
>
> drivers/pci/host/pcie-designware.c | 4 ++--
> drivers/pci/host/pcie-designware.h | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c
> index 5d720c2..1c09f814 100644
> --- a/drivers/pci/host/pcie-designware.c
> +++ b/drivers/pci/host/pcie-designware.c
> @@ -361,8 +361,8 @@ static int dw_msi_setup_irq(struct msi_chip *chip, struct pci_dev *pdev,
> */
> desc->msi_attrib.multiple = msgvec;
>
> - if (pp->ops->get_msi_data)
> - msg.address_lo = pp->ops->get_msi_data(pp);
> + if (pp->ops->get_msi_addr)
> + msg.address_lo = pp->ops->get_msi_addr(pp);
> else
> msg.address_lo = virt_to_phys((void *)pp->msi_data);
> msg.address_hi = 0x0;
> diff --git a/drivers/pci/host/pcie-designware.h b/drivers/pci/host/pcie-designware.h
> index 48f8670..904e40a 100644
> --- a/drivers/pci/host/pcie-designware.h
> +++ b/drivers/pci/host/pcie-designware.h
> @@ -70,7 +70,7 @@ struct pcie_host_ops {
> void (*host_init)(struct pcie_port *pp);
> void (*msi_set_irq)(struct pcie_port *pp, int irq);
> void (*msi_clear_irq)(struct pcie_port *pp, int irq);
> - u32 (*get_msi_data)(struct pcie_port *pp);
> + u32 (*get_msi_addr)(struct pcie_port *pp);
> void (*scan_bus)(struct pcie_port *pp);
> int (*msi_host_init)(struct pcie_port *pp, struct msi_chip *chip);
> };
> --
> 1.9.1
>
WARNING: multiple messages have this Message-ID (diff)
From: bhelgaas@google.com (Bjorn Helgaas)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 1/3] PCI: designware: Rename get_msi_data to get_msi_addr
Date: Tue, 23 Sep 2014 16:45:55 -0600 [thread overview]
Message-ID: <20140923224555.GE27117@google.com> (raw)
In-Reply-To: <1411482540-31297-3-git-send-email-Minghuan.Lian@freescale.com>
[+cc Mohit, Jingoo]
On Tue, Sep 23, 2014 at 10:28:58PM +0800, Minghuan Lian wrote:
> The function get_msi_data is used to return MSI message address.
> In order to accurately express function purpose the patch rename
> it to get_msi_addr.
>
> Signed-off-by: Minghuan Lian <Minghuan.Lian@freescale.com>
I think this looks like a good idea, but it needs an ack from Mohit and/or
Jingoo (cc'd).
You previously asked whether .get_msi_addr() should also be changed to
return u64 instead of u32. I think it should, and you can do that in a
separate patch that also changes the use in dw_msi_setup_irq() to split the
64-bit result into msg.address_lo and msg.address_hi.
I don't see any implementations of .get_msi_data() or .get_msi_addr(), so
this seems pretty straightforward.
Bjorn
> ---
> Change log:
> v3: no change
> v2: no change just derived from v1
>
> drivers/pci/host/pcie-designware.c | 4 ++--
> drivers/pci/host/pcie-designware.h | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c
> index 5d720c2..1c09f814 100644
> --- a/drivers/pci/host/pcie-designware.c
> +++ b/drivers/pci/host/pcie-designware.c
> @@ -361,8 +361,8 @@ static int dw_msi_setup_irq(struct msi_chip *chip, struct pci_dev *pdev,
> */
> desc->msi_attrib.multiple = msgvec;
>
> - if (pp->ops->get_msi_data)
> - msg.address_lo = pp->ops->get_msi_data(pp);
> + if (pp->ops->get_msi_addr)
> + msg.address_lo = pp->ops->get_msi_addr(pp);
> else
> msg.address_lo = virt_to_phys((void *)pp->msi_data);
> msg.address_hi = 0x0;
> diff --git a/drivers/pci/host/pcie-designware.h b/drivers/pci/host/pcie-designware.h
> index 48f8670..904e40a 100644
> --- a/drivers/pci/host/pcie-designware.h
> +++ b/drivers/pci/host/pcie-designware.h
> @@ -70,7 +70,7 @@ struct pcie_host_ops {
> void (*host_init)(struct pcie_port *pp);
> void (*msi_set_irq)(struct pcie_port *pp, int irq);
> void (*msi_clear_irq)(struct pcie_port *pp, int irq);
> - u32 (*get_msi_data)(struct pcie_port *pp);
> + u32 (*get_msi_addr)(struct pcie_port *pp);
> void (*scan_bus)(struct pcie_port *pp);
> int (*msi_host_init)(struct pcie_port *pp, struct msi_chip *chip);
> };
> --
> 1.9.1
>
next prev parent reply other threads:[~2014-09-23 22:45 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-23 14:28 [PATCH] PCI: designware: Fix configuration base address Minghuan Lian
2014-09-23 14:28 ` Minghuan Lian
2014-09-23 14:28 ` [PATCH] PCI: designware: Fix IO resource end address calculation Minghuan Lian
2014-09-23 14:28 ` Minghuan Lian
2014-09-23 22:53 ` Bjorn Helgaas
2014-09-23 22:53 ` Bjorn Helgaas
2014-09-24 4:14 ` Mohit KUMAR DCG
2014-09-24 4:14 ` Mohit KUMAR DCG
2014-09-24 13:26 ` Bjorn Helgaas
2014-09-24 13:26 ` Bjorn Helgaas
2014-09-23 14:28 ` [PATCH v3 1/3] PCI: designware: Rename get_msi_data to get_msi_addr Minghuan Lian
2014-09-23 14:28 ` Minghuan Lian
2014-09-23 22:45 ` Bjorn Helgaas [this message]
2014-09-23 22:45 ` Bjorn Helgaas
2014-09-24 4:12 ` Mohit KUMAR DCG
2014-09-24 4:12 ` Mohit KUMAR DCG
2014-09-24 13:27 ` Bjorn Helgaas
2014-09-24 13:27 ` Bjorn Helgaas
2014-09-23 14:28 ` [PATCH v3 2/3] PCI: designware: Add get_msi_data() to pcie_host_ops Minghuan Lian
2014-09-23 14:28 ` Minghuan Lian
2014-09-23 23:14 ` Bjorn Helgaas
2014-09-23 23:14 ` Bjorn Helgaas
2014-09-24 4:22 ` Mohit KUMAR DCG
2014-09-24 4:22 ` Mohit KUMAR DCG
2014-09-23 14:29 ` [PATCH v3 3/3] PCI: Layerscape: Add Layerscape PCIe driver Minghuan Lian
2014-09-23 14:29 ` Minghuan Lian
2014-09-23 21:25 ` Scott Wood
2014-09-23 21:25 ` Scott Wood
2014-09-24 2:17 ` Lian Minghuan-B31939
2014-09-24 2:17 ` Lian Minghuan-B31939
2014-09-23 22:53 ` [PATCH] PCI: designware: Fix configuration base address Bjorn Helgaas
2014-09-23 22:53 ` Bjorn Helgaas
2014-09-24 4:14 ` Mohit KUMAR DCG
2014-09-24 4:14 ` Mohit KUMAR DCG
2014-09-24 13:25 ` Bjorn Helgaas
2014-09-24 13:25 ` Bjorn Helgaas
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=20140923224555.GE27117@google.com \
--to=bhelgaas@google.com \
--cc=B21284@freescale.com \
--cc=Minghuan.Lian@freescale.com \
--cc=arnd@arndb.de \
--cc=jg1.han@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-pci@vger.kernel.org \
--cc=mohit.kumar@st.com \
--cc=r61911@freescale.com \
--cc=scottwood@freescale.com \
--cc=stuart.yoder@freescale.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.