Linux PCI Non-Transparent Bridge framework and drivers
 help / color / mirror / Atom feed
From: "Jiang, Dave" <dave.jiang@intel.com>
To: "Allen.Hubbe@emc.com" <Allen.Hubbe@emc.com>,
	"linux-ntb@googlegroups.com" <linux-ntb@googlegroups.com>
Cc: "jdmason@kudzu.us" <jdmason@kudzu.us>
Subject: Re: [PATCH 2/2] NTB: ntb_hw_intel: use local variable pdev
Date: Fri, 22 Jul 2016 16:20:05 +0000	[thread overview]
Message-ID: <1469204382.52273.4.camel@intel.com> (raw)
In-Reply-To: <1d852b3f868e6cbca583d7b8b277f49790978192.1469194609.git.Allen.Hubbe@emc.com>


On Fri, 2016-07-22 at 09:38 -0400, Allen Hubbe wrote:
> Clean up duplicated expression by replacing it with the equivalent
> local
> varible pdev.
> 
> Signed-off-by: Allen Hubbe <Allen.Hubbe@emc.com>
Acked-by: Dave Jiang <dave.jiang@intel.com>

> ---
>  drivers/ntb/hw/intel/ntb_hw_intel.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/ntb/hw/intel/ntb_hw_intel.c
> b/drivers/ntb/hw/intel/ntb_hw_intel.c
> index 5efd03705e5c..0d5c29ae51de 100644
> --- a/drivers/ntb/hw/intel/ntb_hw_intel.c
> +++ b/drivers/ntb/hw/intel/ntb_hw_intel.c
> @@ -706,7 +706,7 @@ static ssize_t ndev_debugfs_read(struct file
> *filp, char __user *ubuf,
>  				 "LMT45 -\t\t\t%#018llx\n", u.v64);
>  	}
>  
> -	if (pdev_is_xeon(ndev->ntb.pdev)) {
> +	if (pdev_is_xeon(pdev)) {
>  		if (ntb_topo_is_b2b(ndev->ntb.topo)) {
>  			off += scnprintf(buf + off, buf_size - off,
>  					 "\nNTB Outgoing B2B
> XLAT:\n");
> @@ -787,22 +787,22 @@ static ssize_t ndev_debugfs_read(struct file
> *filp, char __user *ubuf,
>  		off += scnprintf(buf + off, buf_size - off,
>  				 "\nXEON NTB Hardware Errors:\n");
>  
> -		if (!pci_read_config_word(ndev->ntb.pdev,
> +		if (!pci_read_config_word(pdev,
>  					  XEON_DEVSTS_OFFSET,
> &u.v16))
>  			off += scnprintf(buf + off, buf_size - off,
>  					 "DEVSTS -\t\t%#06x\n",
> u.v16);
>  
> -		if (!pci_read_config_word(ndev->ntb.pdev,
> +		if (!pci_read_config_word(pdev,
>  					  XEON_LINK_STATUS_OFFSET,
> &u.v16))
>  			off += scnprintf(buf + off, buf_size - off,
>  					 "LNKSTS -\t\t%#06x\n",
> u.v16);
>  
> -		if (!pci_read_config_dword(ndev->ntb.pdev,
> +		if (!pci_read_config_dword(pdev,
>  					   XEON_UNCERRSTS_OFFSET,
> &u.v32))
>  			off += scnprintf(buf + off, buf_size - off,
>  					 "UNCERRSTS -\t\t%#06x\n",
> u.v32);
>  
> -		if (!pci_read_config_dword(ndev->ntb.pdev,
> +		if (!pci_read_config_dword(pdev,
>  					   XEON_CORERRSTS_OFFSET,
> &u.v32))
>  			off += scnprintf(buf + off, buf_size - off,
>  					 "CORERRSTS -\t\t%#06x\n",
> u.v32);
> -- 
> 2.7.2
> 

  reply	other threads:[~2016-07-22 16:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-22 13:38 [PATCH 1/2] NTB: ntb_hw_intel: show BAR size in debugfs info Allen Hubbe
2016-07-22 13:38 ` [PATCH 2/2] NTB: ntb_hw_intel: use local variable pdev Allen Hubbe
2016-07-22 16:20   ` Jiang, Dave [this message]
2016-07-22 16:19 ` [PATCH 1/2] NTB: ntb_hw_intel: show BAR size in debugfs info Jiang, Dave
2016-08-05 14:35   ` Jon Mason

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=1469204382.52273.4.camel@intel.com \
    --to=dave.jiang@intel.com \
    --cc=Allen.Hubbe@emc.com \
    --cc=jdmason@kudzu.us \
    --cc=linux-ntb@googlegroups.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