Re: [PATCH v1] platform/x86: intel_pmc_core: Introduce PMC_DEVICE() macro

From: kbuild test robot
Date: Thu Dec 14 2017 - 16:22:35 EST


Hi Andy,

I love your patch! Yet something to improve:

[auto build test ERROR on platform-drivers-x86/for-next]
[also build test ERROR on v4.15-rc3 next-20171214]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Andy-Shevchenko/platform-x86-intel_pmc_core-Introduce-PMC_DEVICE-macro/20171215-040644
base: git://git.infradead.org/users/dvhart/linux-platform-drivers-x86.git for-next
config: x86_64-randconfig-x007-201750 (attached as .config)
compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64

All errors (new ones prefixed by >>):

In file included from drivers/platform/x86/intel_pmc_core.c:26:0:
include/linux/pci.h:817:2: error: field name not in record or union initializer
.vendor = PCI_VENDOR_ID_##vend, .device = (dev), \
^
drivers/platform/x86/intel_pmc_core.c:122:30: note: in expansion of macro 'PCI_VDEVICE'
#define PMC_DEVICE(id, data) PCI_VDEVICE(INTEL, id), (kernel_ulong_t)data }
^~~~~~~~~~~
drivers/platform/x86/intel_pmc_core.c:125:2: note: in expansion of macro 'PMC_DEVICE'
PMC_DEVICE(SPT_PMC_PCI_DEVICE_ID, &spt_reg_map),
^~~~~~~~~~
include/linux/pci.h:817:2: note: (near initialization for 'pmc_pci_ids')
.vendor = PCI_VENDOR_ID_##vend, .device = (dev), \
^
drivers/platform/x86/intel_pmc_core.c:122:30: note: in expansion of macro 'PCI_VDEVICE'
#define PMC_DEVICE(id, data) PCI_VDEVICE(INTEL, id), (kernel_ulong_t)data }
^~~~~~~~~~~
drivers/platform/x86/intel_pmc_core.c:125:2: note: in expansion of macro 'PMC_DEVICE'
PMC_DEVICE(SPT_PMC_PCI_DEVICE_ID, &spt_reg_map),
^~~~~~~~~~
include/linux/pci.h:817:34: error: field name not in record or union initializer
.vendor = PCI_VENDOR_ID_##vend, .device = (dev), \
^
drivers/platform/x86/intel_pmc_core.c:122:30: note: in expansion of macro 'PCI_VDEVICE'
#define PMC_DEVICE(id, data) PCI_VDEVICE(INTEL, id), (kernel_ulong_t)data }
^~~~~~~~~~~
drivers/platform/x86/intel_pmc_core.c:125:2: note: in expansion of macro 'PMC_DEVICE'
PMC_DEVICE(SPT_PMC_PCI_DEVICE_ID, &spt_reg_map),
^~~~~~~~~~
include/linux/pci.h:817:34: note: (near initialization for 'pmc_pci_ids')
.vendor = PCI_VENDOR_ID_##vend, .device = (dev), \
^
drivers/platform/x86/intel_pmc_core.c:122:30: note: in expansion of macro 'PCI_VDEVICE'
#define PMC_DEVICE(id, data) PCI_VDEVICE(INTEL, id), (kernel_ulong_t)data }
^~~~~~~~~~~
drivers/platform/x86/intel_pmc_core.c:125:2: note: in expansion of macro 'PMC_DEVICE'
PMC_DEVICE(SPT_PMC_PCI_DEVICE_ID, &spt_reg_map),
^~~~~~~~~~
include/linux/pci.h:818:2: error: field name not in record or union initializer
.subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID, 0, 0
^
drivers/platform/x86/intel_pmc_core.c:122:30: note: in expansion of macro 'PCI_VDEVICE'
#define PMC_DEVICE(id, data) PCI_VDEVICE(INTEL, id), (kernel_ulong_t)data }
^~~~~~~~~~~
drivers/platform/x86/intel_pmc_core.c:125:2: note: in expansion of macro 'PMC_DEVICE'
PMC_DEVICE(SPT_PMC_PCI_DEVICE_ID, &spt_reg_map),
^~~~~~~~~~
include/linux/pci.h:818:2: note: (near initialization for 'pmc_pci_ids')
.subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID, 0, 0
^
drivers/platform/x86/intel_pmc_core.c:122:30: note: in expansion of macro 'PCI_VDEVICE'
#define PMC_DEVICE(id, data) PCI_VDEVICE(INTEL, id), (kernel_ulong_t)data }
^~~~~~~~~~~
drivers/platform/x86/intel_pmc_core.c:125:2: note: in expansion of macro 'PMC_DEVICE'
PMC_DEVICE(SPT_PMC_PCI_DEVICE_ID, &spt_reg_map),
^~~~~~~~~~
include/linux/pci.h:818:27: error: field name not in record or union initializer
.subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID, 0, 0
^
drivers/platform/x86/intel_pmc_core.c:122:30: note: in expansion of macro 'PCI_VDEVICE'
#define PMC_DEVICE(id, data) PCI_VDEVICE(INTEL, id), (kernel_ulong_t)data }
^~~~~~~~~~~
drivers/platform/x86/intel_pmc_core.c:125:2: note: in expansion of macro 'PMC_DEVICE'
PMC_DEVICE(SPT_PMC_PCI_DEVICE_ID, &spt_reg_map),
^~~~~~~~~~
include/linux/pci.h:818:27: note: (near initialization for 'pmc_pci_ids')
.subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID, 0, 0
^
drivers/platform/x86/intel_pmc_core.c:122:30: note: in expansion of macro 'PCI_VDEVICE'
#define PMC_DEVICE(id, data) PCI_VDEVICE(INTEL, id), (kernel_ulong_t)data }
^~~~~~~~~~~
drivers/platform/x86/intel_pmc_core.c:125:2: note: in expansion of macro 'PMC_DEVICE'
PMC_DEVICE(SPT_PMC_PCI_DEVICE_ID, &spt_reg_map),
^~~~~~~~~~
>> drivers/platform/x86/intel_pmc_core.c:122:54: error: initializer element is not computable at load time
#define PMC_DEVICE(id, data) PCI_VDEVICE(INTEL, id), (kernel_ulong_t)data }
^
drivers/platform/x86/intel_pmc_core.c:125:2: note: in expansion of macro 'PMC_DEVICE'
PMC_DEVICE(SPT_PMC_PCI_DEVICE_ID, &spt_reg_map),
^~~~~~~~~~
drivers/platform/x86/intel_pmc_core.c:122:54: note: (near initialization for 'pmc_pci_ids[3].subdevice')
#define PMC_DEVICE(id, data) PCI_VDEVICE(INTEL, id), (kernel_ulong_t)data }
^
drivers/platform/x86/intel_pmc_core.c:125:2: note: in expansion of macro 'PMC_DEVICE'
PMC_DEVICE(SPT_PMC_PCI_DEVICE_ID, &spt_reg_map),
^~~~~~~~~~
drivers/platform/x86/intel_pmc_core.c:124:51: warning: missing braces around initializer [-Wmissing-braces]
static const struct pci_device_id pmc_pci_ids[] = {
^
drivers/platform/x86/intel_pmc_core.c:126:2: error: expected identifier or '(' before '{' token
{}
^
drivers/platform/x86/intel_pmc_core.c:127:1: error: expected identifier or '(' before '}' token
};
^

vim +122 drivers/platform/x86/intel_pmc_core.c

121
> 122 #define PMC_DEVICE(id, data) PCI_VDEVICE(INTEL, id), (kernel_ulong_t)data }
123

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: application/gzip