linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c:16:5: warning: no previous prototype for function 'vfio_fsl_mc_irqs_allocate'
@ 2020-11-03  7:54 kernel test robot
  2020-11-03 17:18 ` Diana Craciun OSS
  0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2020-11-03  7:54 UTC (permalink / raw)
  To: Diana Craciun
  Cc: kbuild-all, clang-built-linux, linux-kernel, Alex Williamson,
	Bharat Bhushan, Eric Auger

[-- Attachment #1: Type: text/plain, Size: 3498 bytes --]

Hi Diana,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   b7cbaf59f62f8ab8f157698f9e31642bff525bd0
commit: cc0ee20bd96971c10eba9a83ecf1c0733078a083 vfio/fsl-mc: trigger an interrupt via eventfd
date:   3 weeks ago
config: arm64-randconfig-r026-20201101 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 235dfcf70abca65dba5d80f1a42d1485bab8980c)
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/torvalds/linux.git/commit/?id=cc0ee20bd96971c10eba9a83ecf1c0733078a083
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout cc0ee20bd96971c10eba9a83ecf1c0733078a083
        # 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@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c:16:5: warning: no previous prototype for function 'vfio_fsl_mc_irqs_allocate' [-Wmissing-prototypes]
   int vfio_fsl_mc_irqs_allocate(struct vfio_fsl_mc_device *vdev)
       ^
   drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c:16:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int vfio_fsl_mc_irqs_allocate(struct vfio_fsl_mc_device *vdev)
   ^
   static 
   drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c:121:8: error: implicit declaration of function 'fsl_mc_populate_irq_pool' [-Werror,-Wimplicit-function-declaration]
           ret = fsl_mc_populate_irq_pool(mc_cont,
                 ^
   drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c:122:4: error: use of undeclared identifier 'FSL_MC_IRQ_POOL_MAX_TOTAL_IRQS'
                           FSL_MC_IRQ_POOL_MAX_TOTAL_IRQS);
                           ^
   1 warning and 2 errors generated.

vim +/vfio_fsl_mc_irqs_allocate +16 drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c

    15	
  > 16	int vfio_fsl_mc_irqs_allocate(struct vfio_fsl_mc_device *vdev)
    17	{
    18		struct fsl_mc_device *mc_dev = vdev->mc_dev;
    19		struct vfio_fsl_mc_irq *mc_irq;
    20		int irq_count;
    21		int ret, i;
    22	
    23		/* Device does not support any interrupt */
    24		if (mc_dev->obj_desc.irq_count == 0)
    25			return 0;
    26	
    27		/* interrupts were already allocated for this device */
    28		if (vdev->mc_irqs)
    29			return 0;
    30	
    31		irq_count = mc_dev->obj_desc.irq_count;
    32	
    33		mc_irq = kcalloc(irq_count, sizeof(*mc_irq), GFP_KERNEL);
    34		if (!mc_irq)
    35			return -ENOMEM;
    36	
    37		/* Allocate IRQs */
    38		ret = fsl_mc_allocate_irqs(mc_dev);
    39		if (ret) {
    40			kfree(mc_irq);
    41			return ret;
    42		}
    43	
    44		for (i = 0; i < irq_count; i++) {
    45			mc_irq[i].count = 1;
    46			mc_irq[i].flags = VFIO_IRQ_INFO_EVENTFD;
    47		}
    48	
    49		vdev->mc_irqs = mc_irq;
    50	
    51		return 0;
    52	}
    53	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 43530 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c:16:5: warning: no previous prototype for function 'vfio_fsl_mc_irqs_allocate'
  2020-11-03  7:54 drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c:16:5: warning: no previous prototype for function 'vfio_fsl_mc_irqs_allocate' kernel test robot
@ 2020-11-03 17:18 ` Diana Craciun OSS
  0 siblings, 0 replies; 3+ messages in thread
From: Diana Craciun OSS @ 2020-11-03 17:18 UTC (permalink / raw)
  To: kernel test robot
  Cc: kbuild-all, clang-built-linux, linux-kernel, Alex Williamson,
	Bharat Bhushan, Eric Auger

Hi,

The warning is fixed by this patch: 
https://www.spinics.net/lists/kvm/msg227575.html

The errors are caused by the fact that the vfio fsl-mc patches have a 
dependency on the fsl-mc bus series. For this particular error the 
missing patch is: bus/fsl-mc: Export IRQ pool handling functions to be 
used by VFIO. But the entire series should be merged before the 
vfio-fsl-mc patches.

I have verified compilation with clang on the master branch and there 
are no errors.

Diana


On 11/3/2020 9:54 AM, kernel test robot wrote:
> Hi Diana,
> 
> FYI, the error/warning still remains.
> 
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   b7cbaf59f62f8ab8f157698f9e31642bff525bd0
> commit: cc0ee20bd96971c10eba9a83ecf1c0733078a083 vfio/fsl-mc: trigger an interrupt via eventfd
> date:   3 weeks ago
> config: arm64-randconfig-r026-20201101 (attached as .config)
> compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 235dfcf70abca65dba5d80f1a42d1485bab8980c)
> 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/torvalds/linux.git/commit/?id=cc0ee20bd96971c10eba9a83ecf1c0733078a083
>          git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>          git fetch --no-tags linus master
>          git checkout cc0ee20bd96971c10eba9a83ecf1c0733078a083
>          # 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@intel.com>
> 
> All warnings (new ones prefixed by >>):
> 
>>> drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c:16:5: warning: no previous prototype for function 'vfio_fsl_mc_irqs_allocate' [-Wmissing-prototypes]
>     int vfio_fsl_mc_irqs_allocate(struct vfio_fsl_mc_device *vdev)
>         ^
>     drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c:16:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
>     int vfio_fsl_mc_irqs_allocate(struct vfio_fsl_mc_device *vdev)
>     ^
>     static
>     drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c:121:8: error: implicit declaration of function 'fsl_mc_populate_irq_pool' [-Werror,-Wimplicit-function-declaration]
>             ret = fsl_mc_populate_irq_pool(mc_cont,
>                   ^
>     drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c:122:4: error: use of undeclared identifier 'FSL_MC_IRQ_POOL_MAX_TOTAL_IRQS'
>                             FSL_MC_IRQ_POOL_MAX_TOTAL_IRQS);
>                             ^
>     1 warning and 2 errors generated.
> 
> vim +/vfio_fsl_mc_irqs_allocate +16 drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c
> 
>      15	
>    > 16	int vfio_fsl_mc_irqs_allocate(struct vfio_fsl_mc_device *vdev)
>      17	{
>      18		struct fsl_mc_device *mc_dev = vdev->mc_dev;
>      19		struct vfio_fsl_mc_irq *mc_irq;
>      20		int irq_count;
>      21		int ret, i;
>      22	
>      23		/* Device does not support any interrupt */
>      24		if (mc_dev->obj_desc.irq_count == 0)
>      25			return 0;
>      26	
>      27		/* interrupts were already allocated for this device */
>      28		if (vdev->mc_irqs)
>      29			return 0;
>      30	
>      31		irq_count = mc_dev->obj_desc.irq_count;
>      32	
>      33		mc_irq = kcalloc(irq_count, sizeof(*mc_irq), GFP_KERNEL);
>      34		if (!mc_irq)
>      35			return -ENOMEM;
>      36	
>      37		/* Allocate IRQs */
>      38		ret = fsl_mc_allocate_irqs(mc_dev);
>      39		if (ret) {
>      40			kfree(mc_irq);
>      41			return ret;
>      42		}
>      43	
>      44		for (i = 0; i < irq_count; i++) {
>      45			mc_irq[i].count = 1;
>      46			mc_irq[i].flags = VFIO_IRQ_INFO_EVENTFD;
>      47		}
>      48	
>      49		vdev->mc_irqs = mc_irq;
>      50	
>      51		return 0;
>      52	}
>      53	
> 
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c:16:5: warning: no previous prototype for function 'vfio_fsl_mc_irqs_allocate'
@ 2020-10-24  1:15 kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2020-10-24  1:15 UTC (permalink / raw)
  To: Diana Craciun
  Cc: kbuild-all, clang-built-linux, linux-kernel, Alex Williamson,
	Bharat Bhushan, Eric Auger

[-- Attachment #1: Type: text/plain, Size: 3448 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   b76f733c3ff83089cf1e3f9ae233533649f999b3
commit: cc0ee20bd96971c10eba9a83ecf1c0733078a083 vfio/fsl-mc: trigger an interrupt via eventfd
date:   11 days ago
config: arm64-randconfig-r001-20201024 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 77cbf2595331b11018c2cffb76eb5b8db69f4577)
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/torvalds/linux.git/commit/?id=cc0ee20bd96971c10eba9a83ecf1c0733078a083
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout cc0ee20bd96971c10eba9a83ecf1c0733078a083
        # 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@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c:16:5: warning: no previous prototype for function 'vfio_fsl_mc_irqs_allocate' [-Wmissing-prototypes]
   int vfio_fsl_mc_irqs_allocate(struct vfio_fsl_mc_device *vdev)
       ^
   drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c:16:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int vfio_fsl_mc_irqs_allocate(struct vfio_fsl_mc_device *vdev)
   ^
   static 
   drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c:121:8: error: implicit declaration of function 'fsl_mc_populate_irq_pool' [-Werror,-Wimplicit-function-declaration]
           ret = fsl_mc_populate_irq_pool(mc_cont,
                 ^
   drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c:122:4: error: use of undeclared identifier 'FSL_MC_IRQ_POOL_MAX_TOTAL_IRQS'
                           FSL_MC_IRQ_POOL_MAX_TOTAL_IRQS);
                           ^
   1 warning and 2 errors generated.

vim +/vfio_fsl_mc_irqs_allocate +16 drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c

    15	
  > 16	int vfio_fsl_mc_irqs_allocate(struct vfio_fsl_mc_device *vdev)
    17	{
    18		struct fsl_mc_device *mc_dev = vdev->mc_dev;
    19		struct vfio_fsl_mc_irq *mc_irq;
    20		int irq_count;
    21		int ret, i;
    22	
    23		/* Device does not support any interrupt */
    24		if (mc_dev->obj_desc.irq_count == 0)
    25			return 0;
    26	
    27		/* interrupts were already allocated for this device */
    28		if (vdev->mc_irqs)
    29			return 0;
    30	
    31		irq_count = mc_dev->obj_desc.irq_count;
    32	
    33		mc_irq = kcalloc(irq_count, sizeof(*mc_irq), GFP_KERNEL);
    34		if (!mc_irq)
    35			return -ENOMEM;
    36	
    37		/* Allocate IRQs */
    38		ret = fsl_mc_allocate_irqs(mc_dev);
    39		if (ret) {
    40			kfree(mc_irq);
    41			return ret;
    42		}
    43	
    44		for (i = 0; i < irq_count; i++) {
    45			mc_irq[i].count = 1;
    46			mc_irq[i].flags = VFIO_IRQ_INFO_EVENTFD;
    47		}
    48	
    49		vdev->mc_irqs = mc_irq;
    50	
    51		return 0;
    52	}
    53	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 36681 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-11-03 17:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-03  7:54 drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c:16:5: warning: no previous prototype for function 'vfio_fsl_mc_irqs_allocate' kernel test robot
2020-11-03 17:18 ` Diana Craciun OSS
  -- strict thread matches above, loose matches on Subject: below --
2020-10-24  1:15 kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).