[arm-platforms:irq/mstar 1/2] drivers/irqchip/irq-mst-intc.c:158:1: warning: no previous prototype for function 'mst_intc_of_init'

kernel test robot lkp at intel.com
Mon Oct 12 03:56:31 EDT 2020


tree:   https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git irq/mstar
head:   6d8af863b89da6bdce013db2216b432b4016042e
commit: ad4c938c92af91302e363b1842c82f1cc4a6c4fd [1/2] irqchip/irq-mst: Add MStar interrupt controller support
config: arm64-randconfig-r032-20201012 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 9e72d3eaf38f217698f72cb8fdc969a6e72dad3a)
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
        # install arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/commit/?id=ad4c938c92af91302e363b1842c82f1cc4a6c4fd
        git remote add arm-platforms https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git
        git fetch --no-tags arm-platforms irq/mstar
        git checkout ad4c938c92af91302e363b1842c82f1cc4a6c4fd
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 

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

All warnings (new ones prefixed by >>):

>> drivers/irqchip/irq-mst-intc.c:158:1: warning: no previous prototype for function 'mst_intc_of_init' [-Wmissing-prototypes]
   mst_intc_of_init(struct device_node *dn, struct device_node *parent)
   ^
   drivers/irqchip/irq-mst-intc.c:157:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int __init
   ^
   static 
   1 warning generated.

vim +/mst_intc_of_init +158 drivers/irqchip/irq-mst-intc.c

   156	
   157	int __init
 > 158	mst_intc_of_init(struct device_node *dn, struct device_node *parent)
   159	{
   160		struct irq_domain *domain, *domain_parent;
   161		struct mst_intc_chip_data *cd;
   162		u32 irq_start, irq_end;
   163	
   164		domain_parent = irq_find_host(parent);
   165		if (!domain_parent) {
   166			pr_err("mst-intc: interrupt-parent not found\n");
   167			return -EINVAL;
   168		}
   169	
   170		if (of_property_read_u32_index(dn, "mstar,irqs-map-range", 0, &irq_start) ||
   171		    of_property_read_u32_index(dn, "mstar,irqs-map-range", 1, &irq_end))
   172			return -EINVAL;
   173	
   174		cd = kzalloc(sizeof(*cd), GFP_KERNEL);
   175		if (!cd)
   176			return -ENOMEM;
   177	
   178		cd->base = of_iomap(dn, 0);
   179		if (!cd->base) {
   180			kfree(cd);
   181			return -ENOMEM;
   182		}
   183	
   184		cd->no_eoi = of_property_read_bool(dn, "mstar,intc-no-eoi");
   185		raw_spin_lock_init(&cd->lock);
   186		cd->irq_start = irq_start;
   187		cd->nr_irqs = irq_end - irq_start + 1;
   188		domain = irq_domain_add_hierarchy(domain_parent, 0, cd->nr_irqs, dn,
   189						  &mst_intc_domain_ops, cd);
   190		if (!domain) {
   191			iounmap(cd->base);
   192			kfree(cd);
   193			return -ENOMEM;
   194		}
   195	
   196		return 0;
   197	}
   198	

---
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: 39250 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20201012/747eb781/attachment-0001.gz>


More information about the linux-arm-kernel mailing list