[radeon-alex:amd-staging-4.15 388/829] sound/soc//amd/raven/pci-acp3x.c:159:1: error: type defaults to 'int' in declaration of 'module_pci_driver'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   git://people.freedesktop.org/~agd5f/linux.git amd-staging-4.15
head:   8a2a2ac361e69f4ad68f9a675a8b86dcfe9d82a4
commit: d5fe2b46627629c30a513761bf03093314ac7b18 [388/829] ASoC: AMD: enable ACP3x drivers build
config: mn10300-allyesconfig (attached as .config)
compiler: am33_2.0-linux-gcc (GCC) 7.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout d5fe2b46627629c30a513761bf03093314ac7b18
        # save the attached .config to linux build tree
        make.cross ARCH=mn10300 

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'; did you mean 'pci_enable_sriov'? [-Werror=implicit-function-declaration]
     ret = pci_enable_msi(pci);
           ^~~~~~~~~~~~~~
           pci_enable_sriov
   sound/soc//amd/raven/pci-acp3x.c:122:2: error: implicit declaration of function 'pci_disable_msi'; did you mean 'pci_disable_sriov'? [-Werror=implicit-function-declaration]
     pci_disable_msi(pci);
     ^~~~~~~~~~~~~~~
     pci_disable_sriov
   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 +159 sound/soc//amd/raven/pci-acp3x.c

d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27   29  
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27   30  static int snd_acp3x_probe(struct pci_dev *pci,
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27   31  			   const struct pci_device_id *pci_id)
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27   32  {
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27   33  	int ret;
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29   34  	u32 addr, val;
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27   35  	struct acp3x_dev_data *adata;
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29   36  	struct platform_device_info pdevinfo;
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29   37  	unsigned int irqflags;
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27   38  
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27   39  	if (pci_enable_device(pci)) {
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27   40  		dev_err(&pci->dev, "pci_enable_device failed\n");
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27   41  		return -ENODEV;
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27   42  	}
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27   43  
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27   44  	ret = pci_request_regions(pci, "AMD ACP3x audio");
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27   45  	if (ret < 0) {
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27   46  		dev_err(&pci->dev, "pci_request_regions failed\n");
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27   47  		goto disable_pci;
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27   48  	}
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27   49  
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27   50  	adata = devm_kzalloc(&pci->dev, sizeof(struct acp3x_dev_data),
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27   51  				GFP_KERNEL);
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27   52  	if (adata == NULL) {
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27   53  		ret = -ENOMEM;
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27   54  		goto release_regions;
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27   55  	}
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27   56  
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29   57  	/* check for msi interrupt support */
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29   58  	ret = pci_enable_msi(pci);
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29   59  	if (ret)
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29   60  		/* msi is not enabled */
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29   61  		irqflags = IRQF_SHARED;
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29   62  	else
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29   63  		/* msi is enabled */
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29   64  		irqflags = 0;
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29   65  
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27   66  	addr = pci_resource_start(pci, 0);
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27   67  	adata->acp3x_base = ioremap(addr, pci_resource_len(pci, 0));
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27   68  	if (adata->acp3x_base == NULL) {
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27   69  		ret = -ENOMEM;
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27   70  		goto release_regions;
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27   71  	}
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27   72  
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27   73  	pci_set_drvdata(pci, adata);
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27   74  
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29   75  	val = rv_readl(adata->acp3x_base + mmACP_I2S_PIN_CONFIG);
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29   76  	if (val == 0x4) {
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29   77  		adata->res = devm_kzalloc(&pci->dev,
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29   78  				sizeof(struct resource) * 2,
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29   79  				GFP_KERNEL);
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29   80  		if (adata->res == NULL) {
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29   81  			ret = -ENOMEM;
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29   82  			goto unmap_mmio;
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29   83  		}
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29   84  
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29   85  		adata->res[0].name = "acp3x_i2s_iomem";
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29   86  		adata->res[0].flags = IORESOURCE_MEM;
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29   87  		adata->res[0].start = addr;
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29   88  		adata->res[0].end = addr + (ACP3x_REG_END - ACP3x_REG_START);
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29   89  
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29   90  		adata->res[1].name = "acp3x_i2s_irq";
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29   91  		adata->res[1].flags = IORESOURCE_IRQ;
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29   92  		adata->res[1].start = pci->irq;
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29   93  		adata->res[1].end = pci->irq;
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29   94  
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29   95  		adata->acp3x_audio_mode = ACP3x_I2S_MODE;
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29   96  
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29   97  		memset(&pdevinfo, 0, sizeof(pdevinfo));
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29   98  		pdevinfo.name = "acp3x_rv_i2s";
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29   99  		pdevinfo.id = 0;
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29  100  		pdevinfo.parent = &pci->dev;
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29  101  		pdevinfo.num_res = 2;
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29  102  		pdevinfo.res = adata->res;
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29  103  		pdevinfo.data = &irqflags;
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29  104  		pdevinfo.size_data = sizeof(irqflags);
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29  105  
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29  106  		adata->pdev = platform_device_register_full(&pdevinfo);
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29  107  		if (adata->pdev == NULL) {
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29  108  			dev_err(&pci->dev, "cannot register %s device\n",
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29  109  				pdevinfo.name);
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29  110  			ret = -ENODEV;
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29  111  			goto unmap_mmio;
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29  112  		}
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29  113  	} else {
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29  114  		dev_err(&pci->dev, "Inavlid ACP audio mode : %d\n", val);
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29  115  		ret = -ENODEV;
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29  116  		goto unmap_mmio;
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29  117  	}
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29  118  
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27  119  	return 0;
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27  120  
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29  121  unmap_mmio:
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29 @122  	pci_disable_msi(pci);
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29  123  	iounmap(adata->acp3x_base);
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27  124  release_regions:
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27  125  	pci_release_regions(pci);
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27  126  disable_pci:
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27  127  	pci_disable_device(pci);
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27  128  
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27  129  	return ret;
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27  130  }
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27  131  
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27  132  static void snd_acp3x_remove(struct pci_dev *pci)
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27  133  {
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27  134  	struct acp3x_dev_data *adata = pci_get_drvdata(pci);
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27  135  
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29  136  	platform_device_unregister(adata->pdev);
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27  137  	iounmap(adata->acp3x_base);
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29  138  
1da04bb5 Maruthi Srinivas Bayyavarapu 2017-03-29  139  	pci_disable_msi(pci);
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27  140  	pci_release_regions(pci);
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27  141  	pci_disable_device(pci);
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27  142  }
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27  143  
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27  144  static const struct pci_device_id snd_acp3x_ids[] = {
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27  145  	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, 0x15e2),
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27  146  	.class = PCI_CLASS_MULTIMEDIA_OTHER << 8,
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27  147  	.class_mask = 0xffffff },
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27  148  	{ 0, },
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27  149  };
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27  150  MODULE_DEVICE_TABLE(pci, snd_acp3x_ids);
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27  151  
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27  152  static struct pci_driver acp3x_driver  = {
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27  153  	.name = KBUILD_MODNAME,
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27  154  	.id_table = snd_acp3x_ids,
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27  155  	.probe = snd_acp3x_probe,
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27  156  	.remove = snd_acp3x_remove,
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27  157  };
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27  158  
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27 @159  module_pci_driver(acp3x_driver);
d7f22cdb Maruthi Srinivas Bayyavarapu 2017-03-27  160  

:::::: The code at line 159 was first introduced by commit
:::::: d7f22cdb21cb5e2b9dab65b38921bd309fb5fafc ASoC: AMD: add ACP3.0 PCI driver

:::::: TO: Maruthi Srinivas Bayyavarapu <Maruthi.Bayyavarapu@xxxxxxx>
:::::: CC: Alex Deucher <alexander.deucher@xxxxxxx>

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

Attachment: .config.gz
Description: application/gzip

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux