PCI: Export pcie_set_mps() and pcie_get_mps()

Export pcie_get_mps() and pcie_set_mps() functions so drivers can use
them to simplify code.

Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
tile/PCI: use cached pci_dev->pcie_mpss to simplify code

The PCI core caches the "PCIe Max Payload Size Supported" in
pci_dev->pcie_mpss, so use that instead of pcie_capability_read_dword().

Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
IB/qib: Use pci_is_root_bus() to check whether it is a root bus

Use pci_is_root_bus() instead of "if (bus->parent)" statement
for better readability.

Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
IB/qib: Use pcie_set_mps() and pcie_get_mps() to simplify code

Refactor qib_tune_pcie_caps().  Use pcie_get_mps(), pcie_set_mps(),
pcie_get_readrq(), and pcie_set_readrq() to simplify the code.  The PCI
core caches the "PCIe Max Payload Size Supported" in pci_dev->pcie_mpss,
so use that instead of pcie_capability_read_word().  Remove the unused
val2fld() and fld2val().

Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
IB/qib: Drop qib_tune_pcie_caps() and qib_tune_pcie_coalesce() return values

The callers of qib_tune_pcie_caps() and qib_tune_pcie_coalesce() don't
check the return values, so this patch drops the return values altogether.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
staging: et131x: Use pci_dev->pcie_mpss and pcie_set_readrq() to simplify code

The PCI core caches the "PCIe Max Payload Size Supported" in
pci_dev->pcie_mpss, so use that instead of pcie_capability_read_dword().
Also use pcie_set_readrq() instead of pcie_capability_clear_and_set_word()
to simplify code.

Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Mark Einon <mark.einon@gmail.com>
drm/radeon: use pcie_get_readrq() and pcie_set_readrq() to simplify code

Use pcie_get_readrq() and pcie_set_readrq() functions to simplify code.

Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
PCI: exynos: Add missing clk_disable_unprepare() on error path

Add the missing clk_disable_unprepare() before return
from exynos_pcie_probe() in the error handling case.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Jingoo Han <jg1.han@samsung.com>
PCI: convert bus code to use bus_groups

The bus_attrs field of struct bus_type is going away soon, dev_groups
should be used instead.  This converts the PCI bus code to use the
correct field.

Cc: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
PCI: convert bus code to use drv_groups

The drv_attrs field of struct bus_type is going away soon, drv_groups
should be used instead.  This converts the PCI bus code to use the
correct field.

Cc: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
PCI: convert bus code to use dev_groups

The dev_attrs field of struct bus_type is going away soon, dev_groups
should be used instead.  This converts the PCI bus code to use the
correct field.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
PCI: Make pci_bus_attrs, pci_dev_attrs, dev_rescan_attr, dev_remove_attr, vga_attr static

Local variables used only in this file are made static.

[bhelgaas: also make pci_dev_attrs[] static (from Fengguang)]
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
PCI: Make pci_dev_pm_ops static

pci_dev_pm_ops is local to pci-driver.c.  Make it static.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
cris/PCI: Remove unused pci_mem_start

Remove unused 'pci_mem_start' variable.

Signed-off-by: Myron Stowe <myron.stowe@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
CC: Mikael Starvik <starvik@axis.com>
CC: Jesper Nilsson <jesper.nilsson@axis.com>
mn10300/PCI: Remove unused pci_mem_start

Remove unused 'pci_mem_start' variable.

Signed-off-by: Myron Stowe <myron.stowe@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: David Howells <dhowells@redhat.com>
CC: Koichi Yasutake <yasutake.koichi@jp.panasonic.com>
PCI: Add pci_dev_show_local_cpu() to simplify code

local_cpus_show() and local_cpulist_show() are almost the same.
This adds a new helper function, pci_dev_show_local_cpu(), to simplify
code.

The same strategy is already used by cpuaffinity_show() and
cpulistaffinity_show().

Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
PCI/PM: Remove pci_pm_complete()

88d26136 ("PM: Prevent runtime suspend during system resume") removed the
pm_runtime_put_sync() from pci_pm_complete() to PM core code
device_complete().

Here the pci_pm_complete() is doing the same work which can be done in
device_complete(), so we can remove it directly.

Signed-off-by: Liu Chuansheng <chuansheng.liu@intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Documentation/kbuild/kconfig.txt: 'make listnewconfig' replaces: yes "" | make oldconfig

Signed-off-by: Regid Ichira <regid23@nt1.in>
Acked-by: Rob Landley <rob@landley.net>
[yann.morin.1998@free.fr: fix trailing whitespace, commit subject]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
kconfig: add short explanation to SYMBOL_WRITE

replace the question mark in the comment after SYMBOL_WRITE with an explanation

Signed-off-by: Martin Walch <walch.martin@web.de>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
kconfig: fix trivial typos and update mconf documentation

This fixes lots of typos in comments and strings.

It also updates the documentation strings in mconf to reflect the changes in
the user interface from the two commits

6364fd0cb1e4c7f72b974613e0cf5744ae4d2cb2
  menuconfig: Add Save/Load buttons
1bdbac478a858d2aa73a6784c7c2e09de0f6d06b
  menuconfig: Get rid of the top-level entries for "Load an Alternate/Save an Alternate"

And it updates the layout of the example search result, i. e. moves down the
"Defined at" and "Depends on" lines and adds a symbol state ([=n]) to the
symbol in the "Selected by" line.

Furthermore, the help texts now should fit in 80 columns again when viewed
in mconf.

Signed-off-by: Martin Walch <walch.martin@web.de>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Reviewed-by: Wang YanQing <udknight@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>