[Intel-gfx] [PATCH 09/11] drm/i915: Add i915_save/load_pci_state helpers
kernel test robot
lkp at intel.com
Tue Jun 21 19:44:22 UTC 2022
Hi Tilak,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on drm-tip/drm-tip]
url: https://github.com/intel-lab-lkp/linux/commits/Tilak-Tangudu/drm-i915-Add-D3Cold-Off-support-for-runtime-pm/20220621-202453
base: git://anongit.freedesktop.org/drm/drm-tip drm-tip
config: i386-randconfig-a004 (https://download.01.org/0day-ci/archive/20220622/202206220303.UvbFJUZD-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project af6d2a0b6825e71965f3e2701a63c239fa0ad70f)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/ad0aa2eb6293edc066466ecf3b82ce2e4e0a9636
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Tilak-Tangudu/drm-i915-Add-D3Cold-Off-support-for-runtime-pm/20220621-202453
git checkout ad0aa2eb6293edc066466ecf3b82ce2e4e0a9636
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/gpu/drm/i915/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp at intel.com>
All warnings (new ones prefixed by >>):
>> drivers/gpu/drm/i915/i915_driver.c:108:6: warning: no previous prototype for function 'i915_save_pci_state' [-Wmissing-prototypes]
bool i915_save_pci_state(struct pci_dev *pdev)
^
drivers/gpu/drm/i915/i915_driver.c:108:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
bool i915_save_pci_state(struct pci_dev *pdev)
^
static
>> drivers/gpu/drm/i915/i915_driver.c:127:6: warning: no previous prototype for function 'i915_load_pci_state' [-Wmissing-prototypes]
void i915_load_pci_state(struct pci_dev *pdev)
^
drivers/gpu/drm/i915/i915_driver.c:127:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void i915_load_pci_state(struct pci_dev *pdev)
^
static
2 warnings generated.
vim +/i915_save_pci_state +108 drivers/gpu/drm/i915/i915_driver.c
107
> 108 bool i915_save_pci_state(struct pci_dev *pdev)
109 {
110 struct drm_i915_private *i915 = pci_get_drvdata(pdev);
111
112 if (pci_save_state(pdev))
113 return false;
114
115 kfree(i915->pci_state);
116
117 i915->pci_state = pci_store_saved_state(pdev);
118
119 if (!i915->pci_state) {
120 drm_err(&i915->drm, "Failed to store PCI saved state\n");
121 return false;
122 }
123
124 return true;
125 }
126
> 127 void i915_load_pci_state(struct pci_dev *pdev)
128 {
129 struct drm_i915_private *i915 = pci_get_drvdata(pdev);
130 int ret;
131
132 if (!i915->pci_state)
133 return;
134
135 ret = pci_load_saved_state(pdev, i915->pci_state);
136 if (!ret) {
137 pci_restore_state(pdev);
138 } else {
139 drm_warn(&i915->drm, "Failed to load PCI state, err:%d\n", ret);
140 }
141 }
142 static int i915_get_bridge_dev(struct drm_i915_private *dev_priv)
143 {
144 int domain = pci_domain_nr(to_pci_dev(dev_priv->drm.dev)->bus);
145
146 dev_priv->bridge_dev =
147 pci_get_domain_bus_and_slot(domain, 0, PCI_DEVFN(0, 0));
148 if (!dev_priv->bridge_dev) {
149 drm_err(&dev_priv->drm, "bridge device not found\n");
150 return -EIO;
151 }
152 return 0;
153 }
154
--
0-DAY CI Kernel Test Service
https://01.org/lkp
More information about the Intel-gfx
mailing list