[radeon-alex:amd-staging-4.12 472/1215] sound/soc/amd/raven/pci-acp3x.c:58:8: error: implicit declaration of function 'pci_enable_msi'
kbuild test robot
fengguang.wu at intel.com
Wed Aug 23 10:47:49 UTC 2017
tree: git://people.freedesktop.org/~agd5f/linux.git amd-staging-4.12
head: aa4ac19d28d34607b90d055439ce421be9e6fc11
commit: ea915b0b0414e1086ba7cc1aaf78f9cd4f746631 [472/1215] ASoC: AMD: enable ACP3x drivers build
config: blackfin-allyesconfig (attached as .config)
compiler: bfin-uclinux-gcc (GCC) 6.2.0
reproduce:
wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout ea915b0b0414e1086ba7cc1aaf78f9cd4f746631
# save the attached .config to linux build tree
make.cross ARCH=blackfin
All errors (new ones prefixed by >>):
sound/soc/amd/raven/pci-acp3x.c: In function 'snd_acp3x_probe':
>> sound/soc/amd/raven/pci-acp3x.c:58:8: error: implicit declaration of function 'pci_enable_msi' [-Werror=implicit-function-declaration]
ret = pci_enable_msi(pci);
^~~~~~~~~~~~~~
>> sound/soc/amd/raven/pci-acp3x.c:122:2: error: implicit declaration of function 'pci_disable_msi' [-Werror=implicit-function-declaration]
pci_disable_msi(pci);
^~~~~~~~~~~~~~~
sound/soc/amd/raven/pci-acp3x.c: At top level:
sound/soc/amd/raven/pci-acp3x.c:159:1: warning: data definition has no type or storage class
module_pci_driver(acp3x_driver);
^~~~~~~~~~~~~~~~~
>> sound/soc/amd/raven/pci-acp3x.c:159:1: error: type defaults to 'int' in declaration of 'module_pci_driver' [-Werror=implicit-int]
sound/soc/amd/raven/pci-acp3x.c:159:1: warning: parameter names (without types) in function declaration
sound/soc/amd/raven/pci-acp3x.c:152:26: warning: 'acp3x_driver' defined but not used [-Wunused-variable]
static struct pci_driver acp3x_driver = {
^~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/pci_enable_msi +58 sound/soc/amd/raven/pci-acp3x.c
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 29
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 30 static int snd_acp3x_probe(struct pci_dev *pci,
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 31 const struct pci_device_id *pci_id)
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 32 {
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 33 int ret;
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 34 u32 addr, val;
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 35 struct acp3x_dev_data *adata;
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 36 struct platform_device_info pdevinfo;
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 37 unsigned int irqflags;
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 38
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 39 if (pci_enable_device(pci)) {
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 40 dev_err(&pci->dev, "pci_enable_device failed\n");
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 41 return -ENODEV;
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 42 }
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 43
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 44 ret = pci_request_regions(pci, "AMD ACP3x audio");
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 45 if (ret < 0) {
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 46 dev_err(&pci->dev, "pci_request_regions failed\n");
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 47 goto disable_pci;
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 48 }
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 49
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 50 adata = devm_kzalloc(&pci->dev, sizeof(struct acp3x_dev_data),
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 51 GFP_KERNEL);
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 52 if (adata == NULL) {
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 53 ret = -ENOMEM;
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 54 goto release_regions;
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 55 }
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 56
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 57 /* check for msi interrupt support */
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 @58 ret = pci_enable_msi(pci);
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 59 if (ret)
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 60 /* msi is not enabled */
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 61 irqflags = IRQF_SHARED;
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 62 else
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 63 /* msi is enabled */
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 64 irqflags = 0;
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 65
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 66 addr = pci_resource_start(pci, 0);
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 67 adata->acp3x_base = ioremap(addr, pci_resource_len(pci, 0));
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 68 if (adata->acp3x_base == NULL) {
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 69 ret = -ENOMEM;
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 70 goto release_regions;
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 71 }
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 72
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 73 pci_set_drvdata(pci, adata);
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 74
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 75 val = rv_readl(adata->acp3x_base + mmACP_I2S_PIN_CONFIG);
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 76 if (val == 0x4) {
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 77 adata->res = devm_kzalloc(&pci->dev,
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 78 sizeof(struct resource) * 2,
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 79 GFP_KERNEL);
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 80 if (adata->res == NULL) {
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 81 ret = -ENOMEM;
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 82 goto unmap_mmio;
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 83 }
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 84
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 85 adata->res[0].name = "acp3x_i2s_iomem";
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 86 adata->res[0].flags = IORESOURCE_MEM;
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 87 adata->res[0].start = addr;
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 88 adata->res[0].end = addr + (ACP3x_REG_END - ACP3x_REG_START);
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 89
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 90 adata->res[1].name = "acp3x_i2s_irq";
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 91 adata->res[1].flags = IORESOURCE_IRQ;
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 92 adata->res[1].start = pci->irq;
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 93 adata->res[1].end = pci->irq;
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 94
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 95 adata->acp3x_audio_mode = ACP3x_I2S_MODE;
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 96
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 97 memset(&pdevinfo, 0, sizeof(pdevinfo));
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 98 pdevinfo.name = "acp3x_rv_i2s";
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 99 pdevinfo.id = 0;
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 100 pdevinfo.parent = &pci->dev;
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 101 pdevinfo.num_res = 2;
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 102 pdevinfo.res = adata->res;
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 103 pdevinfo.data = &irqflags;
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 104 pdevinfo.size_data = sizeof(irqflags);
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 105
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 106 adata->pdev = platform_device_register_full(&pdevinfo);
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 107 if (adata->pdev == NULL) {
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 108 dev_err(&pci->dev, "cannot register %s device\n",
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 109 pdevinfo.name);
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 110 ret = -ENODEV;
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 111 goto unmap_mmio;
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 112 }
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 113 } else {
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 114 dev_err(&pci->dev, "Inavlid ACP audio mode : %d\n", val);
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 115 ret = -ENODEV;
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 116 goto unmap_mmio;
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 117 }
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 118
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 119 return 0;
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 120
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 121 unmap_mmio:
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 @122 pci_disable_msi(pci);
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 123 iounmap(adata->acp3x_base);
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 124 release_regions:
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 125 pci_release_regions(pci);
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 126 disable_pci:
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 127 pci_disable_device(pci);
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 128
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 129 return ret;
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 130 }
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 131
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 132 static void snd_acp3x_remove(struct pci_dev *pci)
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 133 {
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 134 struct acp3x_dev_data *adata = pci_get_drvdata(pci);
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 135
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 136 platform_device_unregister(adata->pdev);
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 137 iounmap(adata->acp3x_base);
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 138
c24c2859 Maruthi Srinivas Bayyavarapu 2017-03-29 139 pci_disable_msi(pci);
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 140 pci_release_regions(pci);
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 141 pci_disable_device(pci);
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 142 }
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 143
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 144 static const struct pci_device_id snd_acp3x_ids[] = {
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 145 { PCI_DEVICE(PCI_VENDOR_ID_AMD, 0x15e2),
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 146 .class = PCI_CLASS_MULTIMEDIA_OTHER << 8,
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 147 .class_mask = 0xffffff },
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 148 { 0, },
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 149 };
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 150 MODULE_DEVICE_TABLE(pci, snd_acp3x_ids);
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 151
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 152 static struct pci_driver acp3x_driver = {
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 153 .name = KBUILD_MODNAME,
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 154 .id_table = snd_acp3x_ids,
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 155 .probe = snd_acp3x_probe,
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 156 .remove = snd_acp3x_remove,
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 157 };
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 158
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 @159 module_pci_driver(acp3x_driver);
eb91fe3e Maruthi Srinivas Bayyavarapu 2017-03-27 160
:::::: The code at line 58 was first introduced by commit
:::::: c24c2859476f7494810cf8ee01f8d92401f60563 ASoC: AMD: create ACP3x PCM platform device
:::::: TO: Maruthi Srinivas Bayyavarapu <Maruthi.Bayyavarapu at amd.com>
:::::: CC: Alex Deucher <alexander.deucher at amd.com>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 44974 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20170823/a0dd079e/attachment-0001.gz>
More information about the dri-devel
mailing list