Thread (15 messages) 15 messages, 7 authors, 2022-10-21

Re: [PATCH] PCI: Remove unnecessary of_irq.h includes

From: kernel test robot <hidden>
Date: 2022-10-20 08:10:36
Also in: linux-riscv, linux-tegra, lkml

Hi Bjorn,

I love your patch! Yet something to improve:

[auto build test ERROR on helgaas-pci/next]
[also build test ERROR on xilinx-xlnx/master rockchip/for-next linus/master v6.1-rc1 next-20221020]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Bjorn-Helgaas/PCI-Remove-unnecessary-of_irq-h-includes/20221020-100633
base:   https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next
patch link:    https://lore.kernel.org/r/20221019195452.37606-1-helgaas%40kernel.org
patch subject: [PATCH] PCI: Remove unnecessary of_irq.h includes
config: ia64-randconfig-r026-20221020
compiler: ia64-linux-gcc (GCC) 12.1.0
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/273a24b16a40ffd6a64c6c55aecbfae00a1cd996
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Bjorn-Helgaas/PCI-Remove-unnecessary-of_irq-h-includes/20221020-100633
        git checkout 273a24b16a40ffd6a64c6c55aecbfae00a1cd996
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=ia64 SHELL=/bin/bash drivers/pci/controller/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot [off-list ref]

All error/warnings (new ones prefixed by >>):

   drivers/pci/controller/pcie-altera-msi.c: In function 'altera_irq_domain_alloc':
quoted
drivers/pci/controller/pcie-altera-msi.c:116:40: error: invalid use of undefined type 'struct irq_domain'
     116 |         struct altera_msi *msi = domain->host_data;
         |                                        ^~
quoted
drivers/pci/controller/pcie-altera-msi.c:133:9: error: implicit declaration of function 'irq_domain_set_info' [-Werror=implicit-function-declaration]
     133 |         irq_domain_set_info(domain, virq, bit, &altera_msi_bottom_irq_chip,
         |         ^~~~~~~~~~~~~~~~~~~
   drivers/pci/controller/pcie-altera-msi.c:134:35: error: invalid use of undefined type 'struct irq_domain'
     134 |                             domain->host_data, handle_simple_irq,
         |                                   ^~
   drivers/pci/controller/pcie-altera-msi.c: In function 'altera_irq_domain_free':
quoted
drivers/pci/controller/pcie-altera-msi.c:147:30: error: implicit declaration of function 'irq_domain_get_irq_data'; did you mean 'irq_desc_get_irq_data'? [-Werror=implicit-function-declaration]
     147 |         struct irq_data *d = irq_domain_get_irq_data(domain, virq);
         |                              ^~~~~~~~~~~~~~~~~~~~~~~
         |                              irq_desc_get_irq_data
quoted
drivers/pci/controller/pcie-altera-msi.c:147:30: warning: initialization of 'struct irq_data *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
   drivers/pci/controller/pcie-altera-msi.c: At top level:
quoted
drivers/pci/controller/pcie-altera-msi.c:166:21: error: variable 'msi_domain_ops' has initializer but incomplete type
     166 | static const struct irq_domain_ops msi_domain_ops = {
         |                     ^~~~~~~~~~~~~~
quoted
drivers/pci/controller/pcie-altera-msi.c:167:10: error: 'const struct irq_domain_ops' has no member named 'alloc'
     167 |         .alloc  = altera_irq_domain_alloc,
         |          ^~~~~
quoted
drivers/pci/controller/pcie-altera-msi.c:167:19: warning: excess elements in struct initializer
     167 |         .alloc  = altera_irq_domain_alloc,
         |                   ^~~~~~~~~~~~~~~~~~~~~~~
   drivers/pci/controller/pcie-altera-msi.c:167:19: note: (near initialization for 'msi_domain_ops')
quoted
drivers/pci/controller/pcie-altera-msi.c:168:10: error: 'const struct irq_domain_ops' has no member named 'free'
     168 |         .free   = altera_irq_domain_free,
         |          ^~~~
   drivers/pci/controller/pcie-altera-msi.c:168:19: warning: excess elements in struct initializer
     168 |         .free   = altera_irq_domain_free,
         |                   ^~~~~~~~~~~~~~~~~~~~~~
   drivers/pci/controller/pcie-altera-msi.c:168:19: note: (near initialization for 'msi_domain_ops')
   drivers/pci/controller/pcie-altera-msi.c: In function 'altera_allocate_domains':
quoted
drivers/pci/controller/pcie-altera-msi.c:173:40: error: implicit declaration of function 'of_node_to_fwnode'; did you mean 'of_node_to_nid'? [-Werror=implicit-function-declaration]
     173 |         struct fwnode_handle *fwnode = of_node_to_fwnode(msi->pdev->dev.of_node);
         |                                        ^~~~~~~~~~~~~~~~~
         |                                        of_node_to_nid
quoted
drivers/pci/controller/pcie-altera-msi.c:173:40: warning: initialization of 'struct fwnode_handle *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
drivers/pci/controller/pcie-altera-msi.c:175:29: error: implicit declaration of function 'irq_domain_add_linear' [-Werror=implicit-function-declaration]
     175 |         msi->inner_domain = irq_domain_add_linear(NULL, msi->num_of_vectors,
         |                             ^~~~~~~~~~~~~~~~~~~~~
quoted
drivers/pci/controller/pcie-altera-msi.c:175:27: warning: assignment to 'struct irq_domain *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     175 |         msi->inner_domain = irq_domain_add_linear(NULL, msi->num_of_vectors,
         |                           ^
quoted
drivers/pci/controller/pcie-altera-msi.c:186:17: error: implicit declaration of function 'irq_domain_remove' [-Werror=implicit-function-declaration]
     186 |                 irq_domain_remove(msi->inner_domain);
         |                 ^~~~~~~~~~~~~~~~~
   drivers/pci/controller/pcie-altera-msi.c: At top level:
quoted
drivers/pci/controller/pcie-altera-msi.c:166:36: error: storage size of 'msi_domain_ops' isn't known
     166 | static const struct irq_domain_ops msi_domain_ops = {
         |                                    ^~~~~~~~~~~~~~
   cc1: some warnings being treated as errors
--
   drivers/pci/controller/pcie-microchip-host.c: In function 'mc_irq_msi_domain_alloc':
quoted
drivers/pci/controller/pcie-microchip-host.c:473:38: error: invalid use of undefined type 'struct irq_domain'
     473 |         struct mc_pcie *port = domain->host_data;
         |                                      ^~
quoted
drivers/pci/controller/pcie-microchip-host.c:489:9: error: implicit declaration of function 'irq_domain_set_info' [-Werror=implicit-function-declaration]
     489 |         irq_domain_set_info(domain, virq, bit, &mc_msi_bottom_irq_chip,
         |         ^~~~~~~~~~~~~~~~~~~
   drivers/pci/controller/pcie-microchip-host.c:490:35: error: invalid use of undefined type 'struct irq_domain'
     490 |                             domain->host_data, handle_edge_irq, NULL, NULL);
         |                                   ^~
   drivers/pci/controller/pcie-microchip-host.c: In function 'mc_irq_msi_domain_free':
quoted
drivers/pci/controller/pcie-microchip-host.c:505:30: error: implicit declaration of function 'irq_domain_get_irq_data'; did you mean 'irq_desc_get_irq_data'? [-Werror=implicit-function-declaration]
     505 |         struct irq_data *d = irq_domain_get_irq_data(domain, virq);
         |                              ^~~~~~~~~~~~~~~~~~~~~~~
         |                              irq_desc_get_irq_data
quoted
drivers/pci/controller/pcie-microchip-host.c:505:30: warning: initialization of 'struct irq_data *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
   drivers/pci/controller/pcie-microchip-host.c: At top level:
quoted
drivers/pci/controller/pcie-microchip-host.c:519:21: error: variable 'msi_domain_ops' has initializer but incomplete type
     519 | static const struct irq_domain_ops msi_domain_ops = {
         |                     ^~~~~~~~~~~~~~
quoted
drivers/pci/controller/pcie-microchip-host.c:520:10: error: 'const struct irq_domain_ops' has no member named 'alloc'
     520 |         .alloc  = mc_irq_msi_domain_alloc,
         |          ^~~~~
quoted
drivers/pci/controller/pcie-microchip-host.c:520:19: warning: excess elements in struct initializer
     520 |         .alloc  = mc_irq_msi_domain_alloc,
         |                   ^~~~~~~~~~~~~~~~~~~~~~~
   drivers/pci/controller/pcie-microchip-host.c:520:19: note: (near initialization for 'msi_domain_ops')
quoted
drivers/pci/controller/pcie-microchip-host.c:521:10: error: 'const struct irq_domain_ops' has no member named 'free'
     521 |         .free   = mc_irq_msi_domain_free,
         |          ^~~~
   drivers/pci/controller/pcie-microchip-host.c:521:19: warning: excess elements in struct initializer
     521 |         .free   = mc_irq_msi_domain_free,
         |                   ^~~~~~~~~~~~~~~~~~~~~~
   drivers/pci/controller/pcie-microchip-host.c:521:19: note: (near initialization for 'msi_domain_ops')
   drivers/pci/controller/pcie-microchip-host.c: In function 'mc_allocate_msi_domains':
quoted
drivers/pci/controller/pcie-microchip-host.c:540:40: error: implicit declaration of function 'of_node_to_fwnode'; did you mean 'of_node_to_nid'? [-Werror=implicit-function-declaration]
     540 |         struct fwnode_handle *fwnode = of_node_to_fwnode(dev->of_node);
         |                                        ^~~~~~~~~~~~~~~~~
         |                                        of_node_to_nid
quoted
drivers/pci/controller/pcie-microchip-host.c:540:40: warning: initialization of 'struct fwnode_handle *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
drivers/pci/controller/pcie-microchip-host.c:545:27: error: implicit declaration of function 'irq_domain_add_linear' [-Werror=implicit-function-declaration]
     545 |         msi->dev_domain = irq_domain_add_linear(NULL, msi->num_vectors,
         |                           ^~~~~~~~~~~~~~~~~~~~~
quoted
drivers/pci/controller/pcie-microchip-host.c:545:25: warning: assignment to 'struct irq_domain *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     545 |         msi->dev_domain = irq_domain_add_linear(NULL, msi->num_vectors,
         |                         ^
quoted
drivers/pci/controller/pcie-microchip-host.c:556:17: error: implicit declaration of function 'irq_domain_remove' [-Werror=implicit-function-declaration]
     556 |                 irq_domain_remove(msi->dev_domain);
         |                 ^~~~~~~~~~~~~~~~~
   drivers/pci/controller/pcie-microchip-host.c: In function 'mc_pcie_intx_map':
   drivers/pci/controller/pcie-microchip-host.c:644:38: error: invalid use of undefined type 'struct irq_domain'
     644 |         irq_set_chip_data(irq, domain->host_data);
         |                                      ^~
   drivers/pci/controller/pcie-microchip-host.c: At top level:
quoted
drivers/pci/controller/pcie-microchip-host.c:649:21: error: variable 'intx_domain_ops' has initializer but incomplete type
     649 | static const struct irq_domain_ops intx_domain_ops = {
         |                     ^~~~~~~~~~~~~~
quoted
drivers/pci/controller/pcie-microchip-host.c:650:10: error: 'const struct irq_domain_ops' has no member named 'map'
     650 |         .map = mc_pcie_intx_map,
         |          ^~~
   drivers/pci/controller/pcie-microchip-host.c:650:16: warning: excess elements in struct initializer
     650 |         .map = mc_pcie_intx_map,
         |                ^~~~~~~~~~~~~~~~
   drivers/pci/controller/pcie-microchip-host.c:650:16: note: (near initialization for 'intx_domain_ops')
   drivers/pci/controller/pcie-microchip-host.c: In function 'mc_event_handler':
quoted
drivers/pci/controller/pcie-microchip-host.c:727:14: warning: assignment to 'struct irq_data *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     727 |         data = irq_domain_get_irq_data(port->event_domain, irq);
         |              ^
   drivers/pci/controller/pcie-microchip-host.c: In function 'mc_pcie_event_map':
   drivers/pci/controller/pcie-microchip-host.c:841:38: error: invalid use of undefined type 'struct irq_domain'
     841 |         irq_set_chip_data(irq, domain->host_data);
         |                                      ^~
   drivers/pci/controller/pcie-microchip-host.c: At top level:
quoted
drivers/pci/controller/pcie-microchip-host.c:846:21: error: variable 'event_domain_ops' has initializer but incomplete type
     846 | static const struct irq_domain_ops event_domain_ops = {
         |                     ^~~~~~~~~~~~~~
   drivers/pci/controller/pcie-microchip-host.c:847:10: error: 'const struct irq_domain_ops' has no member named 'map'
     847 |         .map = mc_pcie_event_map,
         |          ^~~
   drivers/pci/controller/pcie-microchip-host.c:847:16: warning: excess elements in struct initializer
     847 |         .map = mc_pcie_event_map,
         |                ^~~~~~~~~~~~~~~~~
   drivers/pci/controller/pcie-microchip-host.c:847:16: note: (near initialization for 'event_domain_ops')
   drivers/pci/controller/pcie-microchip-host.c: In function 'mc_pcie_init_irq_domains':
   drivers/pci/controller/pcie-microchip-host.c:902:28: warning: assignment to 'struct irq_domain *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     902 |         port->event_domain = irq_domain_add_linear(pcie_intc_node, NUM_EVENTS,
         |                            ^
quoted
drivers/pci/controller/pcie-microchip-host.c:910:9: error: implicit declaration of function 'irq_domain_update_bus_token' [-Werror=implicit-function-declaration]
     910 |         irq_domain_update_bus_token(port->event_domain, DOMAIN_BUS_NEXUS);
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
quoted
drivers/pci/controller/pcie-microchip-host.c:910:57: error: 'DOMAIN_BUS_NEXUS' undeclared (first use in this function)
     910 |         irq_domain_update_bus_token(port->event_domain, DOMAIN_BUS_NEXUS);
         |                                                         ^~~~~~~~~~~~~~~~
   drivers/pci/controller/pcie-microchip-host.c:910:57: note: each undeclared identifier is reported only once for each function it appears in
   drivers/pci/controller/pcie-microchip-host.c:912:27: warning: assignment to 'struct irq_domain *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     912 |         port->intx_domain = irq_domain_add_linear(pcie_intc_node, PCI_NUM_INTX,
         |                           ^
quoted
drivers/pci/controller/pcie-microchip-host.c:920:56: error: 'DOMAIN_BUS_WIRED' undeclared (first use in this function)
     920 |         irq_domain_update_bus_token(port->intx_domain, DOMAIN_BUS_WIRED);
         |                                                        ^~~~~~~~~~~~~~~~
   drivers/pci/controller/pcie-microchip-host.c: In function 'mc_platform_init':
   drivers/pci/controller/pcie-microchip-host.c:1033:29: error: implicit declaration of function 'irq_create_mapping' [-Werror=implicit-function-declaration]
    1033 |                 event_irq = irq_create_mapping(port->event_domain, i);
         |                             ^~~~~~~~~~~~~~~~~~
   drivers/pci/controller/pcie-microchip-host.c: At top level:
   drivers/pci/controller/pcie-microchip-host.c:519:36: error: storage size of 'msi_domain_ops' isn't known
     519 | static const struct irq_domain_ops msi_domain_ops = {
         |                                    ^~~~~~~~~~~~~~
   drivers/pci/controller/pcie-microchip-host.c:649:36: error: storage size of 'intx_domain_ops' isn't known
     649 | static const struct irq_domain_ops intx_domain_ops = {
         |                                    ^~~~~~~~~~~~~~~
   drivers/pci/controller/pcie-microchip-host.c:846:36: error: storage size of 'event_domain_ops' isn't known
     846 | static const struct irq_domain_ops event_domain_ops = {
         |                                    ^~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +116 drivers/pci/controller/pcie-altera-msi.c

af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  112  
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  113  static int altera_irq_domain_alloc(struct irq_domain *domain, unsigned int virq,
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  114  				   unsigned int nr_irqs, void *args)
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  115  {
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23 @116  	struct altera_msi *msi = domain->host_data;
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  117  	unsigned long bit;
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  118  	u32 mask;
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  119  
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  120  	WARN_ON(nr_irqs != 1);
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  121  	mutex_lock(&msi->lock);
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  122  
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  123  	bit = find_first_zero_bit(msi->used, msi->num_of_vectors);
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  124  	if (bit >= msi->num_of_vectors) {
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  125  		mutex_unlock(&msi->lock);
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  126  		return -ENOSPC;
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  127  	}
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  128  
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  129  	set_bit(bit, msi->used);
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  130  
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  131  	mutex_unlock(&msi->lock);
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  132  
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23 @133  	irq_domain_set_info(domain, virq, bit, &altera_msi_bottom_irq_chip,
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  134  			    domain->host_data, handle_simple_irq,
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  135  			    NULL, NULL);
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  136  
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  137  	mask = msi_readl(msi, MSI_INTMASK);
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  138  	mask |= 1 << bit;
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  139  	msi_writel(msi, mask, MSI_INTMASK);
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  140  
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  141  	return 0;
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  142  }
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  143  
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  144  static void altera_irq_domain_free(struct irq_domain *domain,
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  145  				   unsigned int virq, unsigned int nr_irqs)
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  146  {
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23 @147  	struct irq_data *d = irq_domain_get_irq_data(domain, virq);
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  148  	struct altera_msi *msi = irq_data_get_irq_chip_data(d);
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  149  	u32 mask;
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  150  
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  151  	mutex_lock(&msi->lock);
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  152  
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  153  	if (!test_bit(d->hwirq, msi->used)) {
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  154  		dev_err(&msi->pdev->dev, "trying to free unused MSI#%lu\n",
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  155  			d->hwirq);
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  156  	} else {
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  157  		__clear_bit(d->hwirq, msi->used);
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  158  		mask = msi_readl(msi, MSI_INTMASK);
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  159  		mask &= ~(1 << d->hwirq);
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  160  		msi_writel(msi, mask, MSI_INTMASK);
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  161  	}
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  162  
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  163  	mutex_unlock(&msi->lock);
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  164  }
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  165  
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23 @166  static const struct irq_domain_ops msi_domain_ops = {
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23 @167  	.alloc	= altera_irq_domain_alloc,
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23 @168  	.free	= altera_irq_domain_free,
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  169  };
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  170  
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  171  static int altera_allocate_domains(struct altera_msi *msi)
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  172  {
3c87b791880a2e drivers/pci/host/pcie-altera-msi.c Linus Torvalds 2015-11-06 @173  	struct fwnode_handle *fwnode = of_node_to_fwnode(msi->pdev->dev.of_node);
3c87b791880a2e drivers/pci/host/pcie-altera-msi.c Linus Torvalds 2015-11-06  174  
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23 @175  	msi->inner_domain = irq_domain_add_linear(NULL, msi->num_of_vectors,
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  176  					     &msi_domain_ops, msi);
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  177  	if (!msi->inner_domain) {
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  178  		dev_err(&msi->pdev->dev, "failed to create IRQ domain\n");
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  179  		return -ENOMEM;
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  180  	}
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  181  
3c87b791880a2e drivers/pci/host/pcie-altera-msi.c Linus Torvalds 2015-11-06  182  	msi->msi_domain = pci_msi_create_irq_domain(fwnode,
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  183  				&altera_msi_domain_info, msi->inner_domain);
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  184  	if (!msi->msi_domain) {
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  185  		dev_err(&msi->pdev->dev, "failed to create MSI domain\n");
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23 @186  		irq_domain_remove(msi->inner_domain);
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  187  		return -ENOMEM;
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  188  	}
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  189  
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  190  	return 0;
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  191  }
af1169b48b179c drivers/pci/host/pcie-altera-msi.c Ley Foon Tan   2015-10-23  192  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help