[Linux-kernel-mentees] [PATCH] PCI: Add support for LTR

kernel test robot lkp at intel.com
Fri Aug 21 21:56:07 UTC 2020


Hi Puranjay,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on v5.8]
[cannot apply to pci/next pm/linux-next v5.9-rc1 next-20200821]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Puranjay-Mohan/PCI-Add-support-for-LTR/20200822-031519
base:    bcf876870b95592b52519ed4aafcf9d95999bc9c
config: x86_64-randconfig-s022-20200820 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.2-191-g10164920-dirty
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>

All errors (new ones prefixed by >>):

   drivers/pci/pci-acpi.c: In function 'pci_acpi_evaluate_ltr_latency':
>> drivers/pci/pci-acpi.c:1236:6: error: 'struct pci_dev' has no member named 'max_snoop_latency'
    1236 |   dev->max_snoop_latency = (u16)elements[1].integer.value |
         |      ^~
>> drivers/pci/pci-acpi.c:1238:6: error: 'struct pci_dev' has no member named 'max_nosnoop_latency'
    1238 |   dev->max_nosnoop_latency = (u16)elements[3].integer.value |
         |      ^~

# https://github.com/0day-ci/linux/commit/2aef8c301151afccc59ac8c0ad321f4e0f77d453
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Puranjay-Mohan/PCI-Add-support-for-LTR/20200822-031519
git checkout 2aef8c301151afccc59ac8c0ad321f4e0f77d453
vim +1236 drivers/pci/pci-acpi.c

  1215	
  1216	/* pci_acpi_evaluate_ltr_latency
  1217	 *
  1218	 * @dev - the pci_dev to evaluate and save latencies
  1219	 */
  1220	void pci_acpi_evaluate_ltr_latency(struct pci_dev *dev)
  1221	{
  1222		union acpi_object *obj, *elements;
  1223		struct acpi_device *handle;
  1224	
  1225		handle = ACPI_HANDLE(&dev->dev);
  1226		if (!handle)
  1227			return;
  1228	
  1229		obj = acpi_evaluate_dsm(handle, &pci_acpi_dsm_guid, 0x2,
  1230					DSM_PCI_LTR_MAX_LATENCY, NULL);
  1231		if (!obj)
  1232			return;
  1233	
  1234		if (obj->type == ACPI_TYPE_PACKAGE && obj->package.count == 4) {
  1235			elements = obj->package.elements;
> 1236			dev->max_snoop_latency = (u16)elements[1].integer.value |
  1237					((u16)elements[0].integer.value << PCI_LTR_SCALE_SHIFT);
> 1238			dev->max_nosnoop_latency = (u16)elements[3].integer.value |
  1239					((u16)elements[2].integer.value << PCI_LTR_SCALE_SHIFT);
  1240		}
  1241		ACPI_FREE(obj);
  1242	}
  1243	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 29866 bytes
Desc: not available
URL: <http://lists.linuxfoundation.org/pipermail/linux-kernel-mentees/attachments/20200822/fe2820dc/attachment-0001.gz>


More information about the Linux-kernel-mentees mailing list