From: Greg KH <gregkh@suse.de>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: torvalds@linux-foundation.org, linux-kernel@vger.kernel.org,
linux-pci@atrey.karlin.mff.cuni.cz,
pcihpd-discuss@lists.sourceforge.net, "Li,
Shaohua" <shaohua.li@intel.com>,
yanmin.zhang@intel.com
Subject: Re: [GIT PATCH] PCI patches for 2.6.24
Date: Fri, 1 Feb 2008 16:49:16 -0800 [thread overview]
Message-ID: <20080202004916.GA10071@suse.de> (raw)
In-Reply-To: <20080201164206.d96c6ee0.akpm@linux-foundation.org>
On Fri, Feb 01, 2008 at 04:42:06PM -0800, Andrew Morton wrote:
> On Fri, 1 Feb 2008 15:11:47 -0800
> Greg KH <gregkh@suse.de> wrote:
>
> > PCI: PCIE ASPM support
>
> drivers/built-in.o: In function `pci_scan_slot':
> drivers/pci/probe.c:1016: undefined reference to `pcie_aspm_init_link_state'
> drivers/built-in.o: In function `pci_stop_dev':
> drivers/pci/remove.c:36: undefined reference to `pcie_aspm_exit_link_state'
> drivers/built-in.o: In function `pci_set_power_state':
> drivers/pci/pci.c:524: undefined reference to `pcie_aspm_pm_state_change'
> make: *** [.tmp_vmlinux1] Error 1
>
> http://userweb.kernel.org/~akpm/config-vmm.txt
>
>
> Needs this, I guess:
>
>
> --- a/drivers/pci/pcie/Kconfig~fix-gregkh-pci-pci-pcie-aspm-support
> +++ a/drivers/pci/pcie/Kconfig
> @@ -32,7 +32,7 @@ source "drivers/pci/pcie/aer/Kconfig"
> #
> config PCIEASPM
> bool "PCI Express ASPM support(Experimental)"
> - depends on PCI && EXPERIMENTAL
> + depends on PCI && EXPERIMENTAL && PCIEPORTBUS
> default y
> help
> This enables PCI Express ASPM (Active State Power Management) and
> _
Oops, sorry, I'll add that to my queue for the next round.
>
> Also, that ASPM patch unnecessarily adds a pile of macros:
>
> +#ifdef CONFIG_PCIEASPM
> +extern void pcie_aspm_init_link_state(struct pci_dev *pdev);
> +extern void pcie_aspm_exit_link_state(struct pci_dev *pdev);
> +extern void pcie_aspm_pm_state_change(struct pci_dev *pdev);
> +extern void pci_disable_link_state(struct pci_dev *pdev, int state);
> +#else
> +#define pcie_aspm_init_link_state(pdev) do {} while (0)
> +#define pcie_aspm_exit_link_state(pdev) do {} while (0)
> +#define pcie_aspm_pm_state_change(pdev) do {} while (0)
> +#define pci_disable_link_state(pdev, state) do {} while (0)
> +#endif
>
> Please don't do this.
>
> A static inline function is cleaner and provides typechecking. It also
> provides an access to the caller's argument and can avoid unused-varaiable
> warnings.
>
> The only reason to use a macro in this situation is if the caller's
> argument is for some reason not defined if !CONFIG_PCIEASPM.
>
> Greg, please check for this in your reviewing - reject macros *by default*.
> They are inferior.
Ick, missed that, again, my appologies. In cleaning up pci.h I saw a
few places like this, I'll fix that next go-around also.
thanks,
greg k-h
next prev parent reply other threads:[~2008-02-02 0:51 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-01 23:11 [GIT PATCH] PCI patches for 2.6.24 Greg KH
2008-02-02 0:42 ` Andrew Morton
2008-02-02 0:49 ` Greg KH [this message]
2008-02-02 1:07 ` Andrew Morton
2008-02-02 11:13 ` [patch] pci: pci_enable_device_bars() fix (was: [GIT PATCH] PCI patches for 2.6.24) Ingo Molnar
2008-02-02 15:51 ` [patch] pci: pci_enable_device_bars() fix Jeff Garzik
2008-02-02 16:01 ` James Bottomley
2008-02-02 17:08 ` Ingo Molnar
2008-02-02 17:33 ` Jeff Garzik
2008-02-02 17:57 ` Ingo Molnar
2008-02-02 18:49 ` Jeff Garzik
2008-02-02 19:35 ` Ingo Molnar
2008-02-02 20:48 ` Jeff Garzik
2008-02-04 12:57 ` Ingo Molnar
2008-02-04 13:12 ` Andrew Morton
2008-02-04 15:32 ` Jeff Garzik
2008-02-04 15:30 ` Jeff Garzik
2008-02-02 18:08 ` James Bottomley
2008-02-02 19:00 ` Ingo Molnar
2008-02-02 18:44 ` [patch] pci: pci_enable_device_bars() fix (was: [GIT PATCH] PCI patches for 2.6.24) Greg KH
2008-02-02 19:05 ` Ingo Molnar
2008-02-02 20:56 ` [patch] pci: pci_enable_device_bars() fix Jeff Garzik
2008-02-02 23:23 ` Greg KH
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=20080202004916.GA10071@suse.de \
--to=gregkh@suse.de \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@atrey.karlin.mff.cuni.cz \
--cc=pcihpd-discuss@lists.sourceforge.net \
--cc=shaohua.li@intel.com \
--cc=torvalds@linux-foundation.org \
--cc=yanmin.zhang@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