[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202210051114.7NzV94C7-lkp@intel.com>
Date: Wed, 5 Oct 2022 11:38:13 +0800
From: kernel test robot <lkp@...el.com>
To: Jason Gunthorpe <jgg@...dia.com>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
Nicolin Chen <nicolinc@...dia.com>, Yi Liu <yi.l.liu@...el.com>
Subject: [jgunthorpe:vfio_iommufd 15/26]
drivers/iommu/iommufd/selftest.c:651:36: warning: comparison between 'enum
<anonymous>' and 'enum <anonymous>'
tree: https://github.com/jgunthorpe/linux vfio_iommufd
head: c639c250f6f5b991f23efa0e76fe5ca689eae450
commit: 1e7593dc23967efedd0530c97e2ccfe0892ebba8 [15/26] iommufd: Add a selftest
config: s390-allmodconfig
compiler: s390-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/jgunthorpe/linux/commit/1e7593dc23967efedd0530c97e2ccfe0892ebba8
git remote add jgunthorpe https://github.com/jgunthorpe/linux
git fetch --no-tags jgunthorpe vfio_iommufd
git checkout 1e7593dc23967efedd0530c97e2ccfe0892ebba8
# 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=s390 SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/container_of.h:5,
from include/linux/list.h:5,
from include/linux/preempt.h:11,
from include/linux/spinlock.h:55,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:7,
from include/linux/slab.h:15,
from drivers/iommu/iommufd/selftest.c:6:
>> drivers/iommu/iommufd/selftest.c:651:36: warning: comparison between 'enum <anonymous>' and 'enum <anonymous>' [-Wenum-compare]
651 | static_assert(MOCK_ACCESS_RW_WRITE == IOMMUFD_ACCESS_RW_WRITE);
| ^~
include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~
drivers/iommu/iommufd/selftest.c:651:1: note: in expansion of macro 'static_assert'
651 | static_assert(MOCK_ACCESS_RW_WRITE == IOMMUFD_ACCESS_RW_WRITE);
| ^~~~~~~~~~~~~
drivers/iommu/iommufd/selftest.c:652:40: warning: comparison between 'enum <anonymous>' and 'enum <anonymous>' [-Wenum-compare]
652 | static_assert(MOCK_ACCESS_RW_SLOW_PATH == __IOMMUFD_ACCESS_RW_SLOW_PATH);
| ^~
include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~
drivers/iommu/iommufd/selftest.c:652:1: note: in expansion of macro 'static_assert'
652 | static_assert(MOCK_ACCESS_RW_SLOW_PATH == __IOMMUFD_ACCESS_RW_SLOW_PATH);
| ^~~~~~~~~~~~~
vim +651 drivers/iommu/iommufd/selftest.c
608
609 static int iommufd_test_access_rw(struct iommufd_ucmd *ucmd,
610 unsigned int access_id, unsigned long iova,
611 size_t length, void __user *ubuf,
612 unsigned int flags)
613 {
614 struct selftest_access *staccess;
615 void *tmp;
616 int rc;
617
618 staccess = iommufd_access_get(access_id);
619 if (IS_ERR(staccess))
620 return PTR_ERR(staccess);
621
622 tmp = kvzalloc(length, GFP_KERNEL_ACCOUNT);
623 if (!tmp) {
624 rc = -ENOMEM;
625 goto out_put;
626 }
627
628 if (flags & MOCK_ACCESS_RW_WRITE) {
629 if (copy_from_user(tmp, ubuf, length)) {
630 rc = -EFAULT;
631 goto out_free;
632 }
633 }
634
635 rc = iommufd_access_rw(staccess->access, iova, tmp, length, flags);
636 if (rc)
637 goto out_free;
638 if (!(flags & MOCK_ACCESS_RW_WRITE)) {
639 if (copy_to_user(ubuf, tmp, length)) {
640 rc = -EFAULT;
641 goto out_free;
642 }
643 }
644
645 out_free:
646 kvfree(tmp);
647 out_put:
648 fput(staccess->file);
649 return rc;
650 }
> 651 static_assert(MOCK_ACCESS_RW_WRITE == IOMMUFD_ACCESS_RW_WRITE);
652 static_assert(MOCK_ACCESS_RW_SLOW_PATH == __IOMMUFD_ACCESS_RW_SLOW_PATH);
653
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (119710 bytes)
Powered by blists - more mailing lists