* [PATCH] pcie-rcar: kill duplicate checks
@ 2014-06-27 14:59 ` Sergei Shtylyov
0 siblings, 0 replies; 8+ messages in thread
From: Sergei Shtylyov @ 2014-06-27 14:59 UTC (permalink / raw)
To: horms, bhelgaas, linux-pci, linux-sh; +Cc: phil.edworthy
The PCI core will have already checked the configuration register address before
calling the {read|write}() methods, no need to check it again in these methods.
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
---
The patch is against the 'next' branch of Bjorn Helgaas' 'pci.git' repo.
drivers/pci/host/pcie-rcar.c | 10 ----------
1 file changed, 10 deletions(-)
Index: pci/drivers/pci/host/pcie-rcar.c
=================================--- pci.orig/drivers/pci/host/pcie-rcar.c
+++ pci/drivers/pci/host/pcie-rcar.c
@@ -260,11 +260,6 @@ static int rcar_pcie_read_conf(struct pc
struct rcar_pcie *pcie = sys_to_pcie(bus->sysdata);
int ret;
- if ((size = 2) && (where & 1))
- return PCIBIOS_BAD_REGISTER_NUMBER;
- else if ((size = 4) && (where & 3))
- return PCIBIOS_BAD_REGISTER_NUMBER;
-
ret = rcar_pcie_config_access(pcie, PCI_ACCESS_READ,
bus, devfn, where, val);
if (ret != PCIBIOS_SUCCESSFUL) {
@@ -291,11 +286,6 @@ static int rcar_pcie_write_conf(struct p
int shift, ret;
u32 data;
- if ((size = 2) && (where & 1))
- return PCIBIOS_BAD_REGISTER_NUMBER;
- else if ((size = 4) && (where & 3))
- return PCIBIOS_BAD_REGISTER_NUMBER;
-
ret = rcar_pcie_config_access(pcie, PCI_ACCESS_READ,
bus, devfn, where, &data);
if (ret != PCIBIOS_SUCCESSFUL)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] pcie-rcar: kill duplicate checks
@ 2014-06-27 14:59 ` Sergei Shtylyov
0 siblings, 0 replies; 8+ messages in thread
From: Sergei Shtylyov @ 2014-06-27 14:59 UTC (permalink / raw)
To: horms, bhelgaas, linux-pci, linux-sh; +Cc: phil.edworthy
The PCI core will have already checked the configuration register address before
calling the {read|write}() methods, no need to check it again in these methods.
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
---
The patch is against the 'next' branch of Bjorn Helgaas' 'pci.git' repo.
drivers/pci/host/pcie-rcar.c | 10 ----------
1 file changed, 10 deletions(-)
Index: pci/drivers/pci/host/pcie-rcar.c
===================================================================
--- pci.orig/drivers/pci/host/pcie-rcar.c
+++ pci/drivers/pci/host/pcie-rcar.c
@@ -260,11 +260,6 @@ static int rcar_pcie_read_conf(struct pc
struct rcar_pcie *pcie = sys_to_pcie(bus->sysdata);
int ret;
- if ((size == 2) && (where & 1))
- return PCIBIOS_BAD_REGISTER_NUMBER;
- else if ((size == 4) && (where & 3))
- return PCIBIOS_BAD_REGISTER_NUMBER;
-
ret = rcar_pcie_config_access(pcie, PCI_ACCESS_READ,
bus, devfn, where, val);
if (ret != PCIBIOS_SUCCESSFUL) {
@@ -291,11 +286,6 @@ static int rcar_pcie_write_conf(struct p
int shift, ret;
u32 data;
- if ((size == 2) && (where & 1))
- return PCIBIOS_BAD_REGISTER_NUMBER;
- else if ((size == 4) && (where & 3))
- return PCIBIOS_BAD_REGISTER_NUMBER;
-
ret = rcar_pcie_config_access(pcie, PCI_ACCESS_READ,
bus, devfn, where, &data);
if (ret != PCIBIOS_SUCCESSFUL)
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH] pcie-rcar: kill duplicate checks
2014-06-27 14:59 ` Sergei Shtylyov
@ 2014-06-27 16:31 ` Phil Edworthy
-1 siblings, 0 replies; 8+ messages in thread
From: Phil Edworthy @ 2014-06-27 16:31 UTC (permalink / raw)
To: Sergei Shtylyov, horms, bhelgaas, linux-pci, linux-sh
Acked-by: Phil Edworthy <phil.edworthy@renesas.com>
Thanks
Phil
On 27 June 2014 15:59, Sergei wrote:
> The PCI core will have already checked the configuration register address
> before
> calling the {read|write}() methods, no need to check it again in these
> methods.
>
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>
> ---
> The patch is against the 'next' branch of Bjorn Helgaas' 'pci.git' repo.
>
> drivers/pci/host/pcie-rcar.c | 10 ----------
> 1 file changed, 10 deletions(-)
>
> Index: pci/drivers/pci/host/pcie-rcar.c
> =============================
> ====> --- pci.orig/drivers/pci/host/pcie-rcar.c
> +++ pci/drivers/pci/host/pcie-rcar.c
> @@ -260,11 +260,6 @@ static int rcar_pcie_read_conf(struct pc
> struct rcar_pcie *pcie = sys_to_pcie(bus->sysdata);
> int ret;
>
> - if ((size = 2) && (where & 1))
> - return PCIBIOS_BAD_REGISTER_NUMBER;
> - else if ((size = 4) && (where & 3))
> - return PCIBIOS_BAD_REGISTER_NUMBER;
> -
> ret = rcar_pcie_config_access(pcie, PCI_ACCESS_READ,
> bus, devfn, where, val);
> if (ret != PCIBIOS_SUCCESSFUL) {
> @@ -291,11 +286,6 @@ static int rcar_pcie_write_conf(struct p
> int shift, ret;
> u32 data;
>
> - if ((size = 2) && (where & 1))
> - return PCIBIOS_BAD_REGISTER_NUMBER;
> - else if ((size = 4) && (where & 3))
> - return PCIBIOS_BAD_REGISTER_NUMBER;
> -
> ret = rcar_pcie_config_access(pcie, PCI_ACCESS_READ,
> bus, devfn, where, &data);
> if (ret != PCIBIOS_SUCCESSFUL)
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH] pcie-rcar: kill duplicate checks
@ 2014-06-27 16:31 ` Phil Edworthy
0 siblings, 0 replies; 8+ messages in thread
From: Phil Edworthy @ 2014-06-27 16:31 UTC (permalink / raw)
To: Sergei Shtylyov, horms, bhelgaas, linux-pci, linux-sh
Acked-by: Phil Edworthy <phil.edworthy@renesas.com>
Thanks
Phil
On 27 June 2014 15:59, Sergei wrote:
> The PCI core will have already checked the configuration register address
> before
> calling the {read|write}() methods, no need to check it again in these
> methods.
>
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>
> ---
> The patch is against the 'next' branch of Bjorn Helgaas' 'pci.git' repo.
>
> drivers/pci/host/pcie-rcar.c | 10 ----------
> 1 file changed, 10 deletions(-)
>
> Index: pci/drivers/pci/host/pcie-rcar.c
> ==========================================================
> =========
> --- pci.orig/drivers/pci/host/pcie-rcar.c
> +++ pci/drivers/pci/host/pcie-rcar.c
> @@ -260,11 +260,6 @@ static int rcar_pcie_read_conf(struct pc
> struct rcar_pcie *pcie = sys_to_pcie(bus->sysdata);
> int ret;
>
> - if ((size == 2) && (where & 1))
> - return PCIBIOS_BAD_REGISTER_NUMBER;
> - else if ((size == 4) && (where & 3))
> - return PCIBIOS_BAD_REGISTER_NUMBER;
> -
> ret = rcar_pcie_config_access(pcie, PCI_ACCESS_READ,
> bus, devfn, where, val);
> if (ret != PCIBIOS_SUCCESSFUL) {
> @@ -291,11 +286,6 @@ static int rcar_pcie_write_conf(struct p
> int shift, ret;
> u32 data;
>
> - if ((size == 2) && (where & 1))
> - return PCIBIOS_BAD_REGISTER_NUMBER;
> - else if ((size == 4) && (where & 3))
> - return PCIBIOS_BAD_REGISTER_NUMBER;
> -
> ret = rcar_pcie_config_access(pcie, PCI_ACCESS_READ,
> bus, devfn, where, &data);
> if (ret != PCIBIOS_SUCCESSFUL)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] pcie-rcar: kill duplicate checks
2014-06-27 16:31 ` Phil Edworthy
@ 2014-06-28 0:06 ` Simon Horman
-1 siblings, 0 replies; 8+ messages in thread
From: Simon Horman @ 2014-06-28 0:06 UTC (permalink / raw)
To: Phil Edworthy; +Cc: Sergei Shtylyov, bhelgaas, linux-pci, linux-sh
On Fri, Jun 27, 2014 at 04:31:49PM +0000, Phil Edworthy wrote:
> > The PCI core will have already checked the configuration register address
> > before
> > calling the {read|write}() methods, no need to check it again in these
> > methods.
> >
> > Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>
> Acked-by: Phil Edworthy <phil.edworthy@renesas.com>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
>
> On 27 June 2014 15:59, Sergei wrote:
> >
> > ---
> > The patch is against the 'next' branch of Bjorn Helgaas' 'pci.git' repo.
> >
> > drivers/pci/host/pcie-rcar.c | 10 ----------
> > 1 file changed, 10 deletions(-)
> >
> > Index: pci/drivers/pci/host/pcie-rcar.c
> > =============================
> > ====> > --- pci.orig/drivers/pci/host/pcie-rcar.c
> > +++ pci/drivers/pci/host/pcie-rcar.c
> > @@ -260,11 +260,6 @@ static int rcar_pcie_read_conf(struct pc
> > struct rcar_pcie *pcie = sys_to_pcie(bus->sysdata);
> > int ret;
> >
> > - if ((size = 2) && (where & 1))
> > - return PCIBIOS_BAD_REGISTER_NUMBER;
> > - else if ((size = 4) && (where & 3))
> > - return PCIBIOS_BAD_REGISTER_NUMBER;
> > -
> > ret = rcar_pcie_config_access(pcie, PCI_ACCESS_READ,
> > bus, devfn, where, val);
> > if (ret != PCIBIOS_SUCCESSFUL) {
> > @@ -291,11 +286,6 @@ static int rcar_pcie_write_conf(struct p
> > int shift, ret;
> > u32 data;
> >
> > - if ((size = 2) && (where & 1))
> > - return PCIBIOS_BAD_REGISTER_NUMBER;
> > - else if ((size = 4) && (where & 3))
> > - return PCIBIOS_BAD_REGISTER_NUMBER;
> > -
> > ret = rcar_pcie_config_access(pcie, PCI_ACCESS_READ,
> > bus, devfn, where, &data);
> > if (ret != PCIBIOS_SUCCESSFUL)
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] pcie-rcar: kill duplicate checks
@ 2014-06-28 0:06 ` Simon Horman
0 siblings, 0 replies; 8+ messages in thread
From: Simon Horman @ 2014-06-28 0:06 UTC (permalink / raw)
To: Phil Edworthy; +Cc: Sergei Shtylyov, bhelgaas, linux-pci, linux-sh
On Fri, Jun 27, 2014 at 04:31:49PM +0000, Phil Edworthy wrote:
> > The PCI core will have already checked the configuration register address
> > before
> > calling the {read|write}() methods, no need to check it again in these
> > methods.
> >
> > Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>
> Acked-by: Phil Edworthy <phil.edworthy@renesas.com>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
>
> On 27 June 2014 15:59, Sergei wrote:
> >
> > ---
> > The patch is against the 'next' branch of Bjorn Helgaas' 'pci.git' repo.
> >
> > drivers/pci/host/pcie-rcar.c | 10 ----------
> > 1 file changed, 10 deletions(-)
> >
> > Index: pci/drivers/pci/host/pcie-rcar.c
> > ==========================================================
> > =========
> > --- pci.orig/drivers/pci/host/pcie-rcar.c
> > +++ pci/drivers/pci/host/pcie-rcar.c
> > @@ -260,11 +260,6 @@ static int rcar_pcie_read_conf(struct pc
> > struct rcar_pcie *pcie = sys_to_pcie(bus->sysdata);
> > int ret;
> >
> > - if ((size == 2) && (where & 1))
> > - return PCIBIOS_BAD_REGISTER_NUMBER;
> > - else if ((size == 4) && (where & 3))
> > - return PCIBIOS_BAD_REGISTER_NUMBER;
> > -
> > ret = rcar_pcie_config_access(pcie, PCI_ACCESS_READ,
> > bus, devfn, where, val);
> > if (ret != PCIBIOS_SUCCESSFUL) {
> > @@ -291,11 +286,6 @@ static int rcar_pcie_write_conf(struct p
> > int shift, ret;
> > u32 data;
> >
> > - if ((size == 2) && (where & 1))
> > - return PCIBIOS_BAD_REGISTER_NUMBER;
> > - else if ((size == 4) && (where & 3))
> > - return PCIBIOS_BAD_REGISTER_NUMBER;
> > -
> > ret = rcar_pcie_config_access(pcie, PCI_ACCESS_READ,
> > bus, devfn, where, &data);
> > if (ret != PCIBIOS_SUCCESSFUL)
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] pcie-rcar: kill duplicate checks
2014-06-27 14:59 ` Sergei Shtylyov
@ 2014-07-05 17:47 ` Bjorn Helgaas
-1 siblings, 0 replies; 8+ messages in thread
From: Bjorn Helgaas @ 2014-07-05 17:47 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: horms, linux-pci, linux-sh, phil.edworthy
On Fri, Jun 27, 2014 at 06:59:13PM +0400, Sergei Shtylyov wrote:
> The PCI core will have already checked the configuration register address before
> calling the {read|write}() methods, no need to check it again in these methods.
>
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Applied with Phil and Simon's acks to pci/host-rcar for v3.17, thanks!
> ---
> The patch is against the 'next' branch of Bjorn Helgaas' 'pci.git' repo.
>
> drivers/pci/host/pcie-rcar.c | 10 ----------
> 1 file changed, 10 deletions(-)
>
> Index: pci/drivers/pci/host/pcie-rcar.c
> =================================> --- pci.orig/drivers/pci/host/pcie-rcar.c
> +++ pci/drivers/pci/host/pcie-rcar.c
> @@ -260,11 +260,6 @@ static int rcar_pcie_read_conf(struct pc
> struct rcar_pcie *pcie = sys_to_pcie(bus->sysdata);
> int ret;
>
> - if ((size = 2) && (where & 1))
> - return PCIBIOS_BAD_REGISTER_NUMBER;
> - else if ((size = 4) && (where & 3))
> - return PCIBIOS_BAD_REGISTER_NUMBER;
> -
> ret = rcar_pcie_config_access(pcie, PCI_ACCESS_READ,
> bus, devfn, where, val);
> if (ret != PCIBIOS_SUCCESSFUL) {
> @@ -291,11 +286,6 @@ static int rcar_pcie_write_conf(struct p
> int shift, ret;
> u32 data;
>
> - if ((size = 2) && (where & 1))
> - return PCIBIOS_BAD_REGISTER_NUMBER;
> - else if ((size = 4) && (where & 3))
> - return PCIBIOS_BAD_REGISTER_NUMBER;
> -
> ret = rcar_pcie_config_access(pcie, PCI_ACCESS_READ,
> bus, devfn, where, &data);
> if (ret != PCIBIOS_SUCCESSFUL)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] pcie-rcar: kill duplicate checks
@ 2014-07-05 17:47 ` Bjorn Helgaas
0 siblings, 0 replies; 8+ messages in thread
From: Bjorn Helgaas @ 2014-07-05 17:47 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: horms, linux-pci, linux-sh, phil.edworthy
On Fri, Jun 27, 2014 at 06:59:13PM +0400, Sergei Shtylyov wrote:
> The PCI core will have already checked the configuration register address before
> calling the {read|write}() methods, no need to check it again in these methods.
>
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Applied with Phil and Simon's acks to pci/host-rcar for v3.17, thanks!
> ---
> The patch is against the 'next' branch of Bjorn Helgaas' 'pci.git' repo.
>
> drivers/pci/host/pcie-rcar.c | 10 ----------
> 1 file changed, 10 deletions(-)
>
> Index: pci/drivers/pci/host/pcie-rcar.c
> ===================================================================
> --- pci.orig/drivers/pci/host/pcie-rcar.c
> +++ pci/drivers/pci/host/pcie-rcar.c
> @@ -260,11 +260,6 @@ static int rcar_pcie_read_conf(struct pc
> struct rcar_pcie *pcie = sys_to_pcie(bus->sysdata);
> int ret;
>
> - if ((size == 2) && (where & 1))
> - return PCIBIOS_BAD_REGISTER_NUMBER;
> - else if ((size == 4) && (where & 3))
> - return PCIBIOS_BAD_REGISTER_NUMBER;
> -
> ret = rcar_pcie_config_access(pcie, PCI_ACCESS_READ,
> bus, devfn, where, val);
> if (ret != PCIBIOS_SUCCESSFUL) {
> @@ -291,11 +286,6 @@ static int rcar_pcie_write_conf(struct p
> int shift, ret;
> u32 data;
>
> - if ((size == 2) && (where & 1))
> - return PCIBIOS_BAD_REGISTER_NUMBER;
> - else if ((size == 4) && (where & 3))
> - return PCIBIOS_BAD_REGISTER_NUMBER;
> -
> ret = rcar_pcie_config_access(pcie, PCI_ACCESS_READ,
> bus, devfn, where, &data);
> if (ret != PCIBIOS_SUCCESSFUL)
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-07-05 17:47 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-27 14:59 [PATCH] pcie-rcar: kill duplicate checks Sergei Shtylyov
2014-06-27 14:59 ` Sergei Shtylyov
2014-06-27 16:31 ` Phil Edworthy
2014-06-27 16:31 ` Phil Edworthy
2014-06-28 0:06 ` Simon Horman
2014-06-28 0:06 ` Simon Horman
2014-07-05 17:47 ` Bjorn Helgaas
2014-07-05 17:47 ` Bjorn Helgaas
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.