lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 18 Feb 2010 20:57:52 +0100
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	Kenji Kaneshige <kaneshige.kenji@...fujitsu.com>
Cc:	Jesse Barnes <jbarnes@...tuousgeek.org>,
	"Moore, Robert" <robert.moore@...el.com>,
	Len Brown <lenb@...nel.org>,
	ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
	pm list <linux-pm@...ts.linux-foundation.org>,
	Linux PCI <linux-pci@...r.kernel.org>,
	Shaohua Li <shaohua.li@...el.com>,
	Bjorn Helgaas <bjorn.helgaas@...com>,
	Oliver Neukum <oliver@...kum.org>,
	Matthew Garrett <mjg@...hat.com>,
	LKML <linux-kernel@...r.kernel.org>,
	Gary Hade <garyhade@...ibm.com>
Subject: Re: [PATCH 2/8] PCI PM: PCIe PME root port service driver (rev. 5)

On Thursday 18 February 2010, Kenji Kaneshige wrote:
> Hi,
> 
> I'm sorry for the delayed comments.
> 
> > +
> > +/**
> > + * pcie_pme_interrupt_enable - Enable/disable PCIe PME interrupt generation.
> > + * @dev: PCIe root port or event collector.
> > + * @enable: Enable or disable the interrupt.
> > + */
> > +static void pcie_pme_interrupt_enable(struct pci_dev *dev, bool enable)
> > +{
> > +	int rtctl_pos;
> > +	u16 rtctl;
> > +
> > +	rtctl_pos = pci_find_capability(dev, PCI_CAP_ID_EXP) + PCI_EXP_RTCTL;
> 
> How about
> 
> 	rtctl_pos = pci_pcie_cap(dev) + PCI_EXP_RTCTL;
> 
> ?
> 
> The pci_pcie_cap() returns PCIe capability offset saved in struct pci_dev.
> By using this, we can avoid redundant search in PCI configuration space.

While I agree with the comment, I'd prefer to change this with a separate
patch, unless the entire patchset misses the merge window.

Rafael
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ