linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "John W. Linville" <linville@tuxdriver.com>
To: Jon Mason <jdmason@kudzu.us>
Cc: Wey-Yi Guy <wey-yi.w.guy@intel.com>,
	Intel Linux Wireless <ilw@linux.intel.com>,
	linux-wireless@vger.kernel.org
Subject: Re: [PATCH 18/19] iwlwifi: remove unnecessary read of PCI_CAP_ID_EXP
Date: Wed, 29 Jun 2011 15:02:10 -0400	[thread overview]
Message-ID: <20110629190209.GB14425@tuxdriver.com> (raw)
In-Reply-To: <1309196969-16348-1-git-send-email-jdmason@kudzu.us>

On Mon, Jun 27, 2011 at 12:49:29PM -0500, Jon Mason wrote:
> The PCIE capability offset is saved during PCI bus walking.  It will
> remove an unnecessary search in the PCI configuration space if this
> value is referenced instead of reacquiring it.
> 
> Signed-off-by: Jon Mason <jdmason@kudzu.us>
> ---
>  drivers/net/wireless/iwlwifi/iwl-pci.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/net/wireless/iwlwifi/iwl-pci.c b/drivers/net/wireless/iwlwifi/iwl-pci.c
> index 7328fbf..60d9140 100644
> --- a/drivers/net/wireless/iwlwifi/iwl-pci.c
> +++ b/drivers/net/wireless/iwlwifi/iwl-pci.c
> @@ -93,7 +93,7 @@ static u16 iwl_pciexp_link_ctrl(struct iwl_bus *bus)
>  	u16 pci_lnk_ctl;
>  	struct pci_dev *pci_dev = IWL_BUS_GET_PCI_DEV(bus);
>  
> -	pos = pci_find_capability(pci_dev, PCI_CAP_ID_EXP);
> +	pos = pci_pcie_cap(priv->pci_dev);
>  	pci_read_config_word(pci_dev, pos + PCI_EXP_LNKCTL, &pci_lnk_ctl);
>  	return pci_lnk_ctl;
>  }
> -- 
> 1.7.5.4

  CC [M]  drivers/net/wireless/iwlwifi/iwl-pci.o
drivers/net/wireless/iwlwifi/iwl-pci.c: In function ‘iwl_pciexp_link_ctrl’:
drivers/net/wireless/iwlwifi/iwl-pci.c:96:21: error: ‘priv’ undeclared (first use in this function)
drivers/net/wireless/iwlwifi/iwl-pci.c:96:21: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [drivers/net/wireless/iwlwifi/iwl-pci.o] Error 1
make[1]: *** [drivers/net/wireless/iwlwifi] Error 2
make: *** [drivers/net/wireless/] Error 2

Please do make sure to compile patches before sending them to the list.

JOhn
-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

  parent reply	other threads:[~2011-06-29 19:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-27 17:49 [PATCH 18/19] iwlwifi: remove unnecessary read of PCI_CAP_ID_EXP Jon Mason
2011-06-27 18:54 ` wwguy
2011-06-29 19:02 ` John W. Linville [this message]
2011-06-30 14:40   ` Jon Mason
2011-06-30 15:42 ` [PATCH 18/19 v2] " Jon Mason
2011-06-30 15:56   ` wwguy

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=20110629190209.GB14425@tuxdriver.com \
    --to=linville@tuxdriver.com \
    --cc=ilw@linux.intel.com \
    --cc=jdmason@kudzu.us \
    --cc=linux-wireless@vger.kernel.org \
    --cc=wey-yi.w.guy@intel.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).