linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Helgaas <bhelgaas@google.com>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Cc: horms@verge.net.au, linux-pci@vger.kernel.org,
	linux-sh@vger.kernel.org, phil.edworthy@renesas.com
Subject: Re: [PATCH] pcie-rcar: kill duplicate checks
Date: Sat, 5 Jul 2014 11:47:42 -0600	[thread overview]
Message-ID: <20140705174742.GD26618@google.com> (raw)
In-Reply-To: <201406271859.13626.sergei.shtylyov@cogentembedded.com>

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)

      parent reply	other threads:[~2014-07-05 17:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-27 14:59 [PATCH] pcie-rcar: kill duplicate checks Sergei Shtylyov
2014-06-27 16:31 ` Phil Edworthy
2014-06-28  0:06   ` Simon Horman
2014-07-05 17:47 ` Bjorn Helgaas [this message]

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=20140705174742.GD26618@google.com \
    --to=bhelgaas@google.com \
    --cc=horms@verge.net.au \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=phil.edworthy@renesas.com \
    --cc=sergei.shtylyov@cogentembedded.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 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).