* drivers/vfio/vfio_iommu_type1.c:2147:35: warning: cast to smaller integer type 'enum iommu_cap' from 'void *'
@ 2022-08-10 3:25 kernel test robot
2022-08-12 14:12 ` Jason Gunthorpe
0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2022-08-10 3:25 UTC (permalink / raw)
To: Robin Murphy
Cc: llvm, kbuild-all, linux-kernel, Alex Williamson, Kevin Tian,
Jason Gunthorpe
Hi Robin,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d4252071b97d2027d246f6a82cbee4d52f618b47
commit: eed20c782aea57b7efb42af2905dc381268b21e9 vfio/type1: Simplify bus_type determination
date: 6 weeks ago
config: arm64-randconfig-r034-20220810 (https://download.01.org/0day-ci/archive/20220810/202208101119.7unZx9dJ-lkp@intel.com/config)
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 5f1c7e2cc5a3c07cbc2412e851a7283c1841f520)
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=eed20c782aea57b7efb42af2905dc381268b21e9
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout eed20c782aea57b7efb42af2905dc381268b21e9
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/vfio/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/vfio/vfio_iommu_type1.c:2147:35: warning: cast to smaller integer type 'enum iommu_cap' from 'void *' [-Wvoid-pointer-to-enum-cast]
return device_iommu_capable(dev, (enum iommu_cap)data);
^~~~~~~~~~~~~~~~~~~~
1 warning generated.
vim +2147 drivers/vfio/vfio_iommu_type1.c
2143
2144 /* Redundantly walks non-present capabilities to simplify caller */
2145 static int vfio_iommu_device_capable(struct device *dev, void *data)
2146 {
> 2147 return device_iommu_capable(dev, (enum iommu_cap)data);
2148 }
2149
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: drivers/vfio/vfio_iommu_type1.c:2147:35: warning: cast to smaller integer type 'enum iommu_cap' from 'void *'
2022-08-10 3:25 drivers/vfio/vfio_iommu_type1.c:2147:35: warning: cast to smaller integer type 'enum iommu_cap' from 'void *' kernel test robot
@ 2022-08-12 14:12 ` Jason Gunthorpe
0 siblings, 0 replies; 3+ messages in thread
From: Jason Gunthorpe @ 2022-08-12 14:12 UTC (permalink / raw)
To: kernel test robot
Cc: Robin Murphy, llvm, kbuild-all, linux-kernel, Alex Williamson,
Kevin Tian
On Wed, Aug 10, 2022 at 11:25:15AM +0800, kernel test robot wrote:
> Hi Robin,
>
> FYI, the error/warning still remains.
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: d4252071b97d2027d246f6a82cbee4d52f618b47
> commit: eed20c782aea57b7efb42af2905dc381268b21e9 vfio/type1: Simplify bus_type determination
> date: 6 weeks ago
> config: arm64-randconfig-r034-20220810 (https://download.01.org/0day-ci/archive/20220810/202208101119.7unZx9dJ-lkp@intel.com/config)
> compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 5f1c7e2cc5a3c07cbc2412e851a7283c1841f520)
> 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=eed20c782aea57b7efb42af2905dc381268b21e9
> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> git fetch --no-tags linus master
> git checkout eed20c782aea57b7efb42af2905dc381268b21e9
> # save the config file
> mkdir build_dir && cp config build_dir/.config
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/vfio/
>
> If you fix the issue, kindly add following tag where applicable
> Reported-by: kernel test robot <lkp@intel.com>
>
> All warnings (new ones prefixed by >>):
>
> >> drivers/vfio/vfio_iommu_type1.c:2147:35: warning: cast to smaller integer type 'enum iommu_cap' from 'void *' [-Wvoid-pointer-to-enum-cast]
> return device_iommu_capable(dev, (enum iommu_cap)data);
> ^~~~~~~~~~~~~~~~~~~~
> 1 warning generated.
>
>
> vim +2147 drivers/vfio/vfio_iommu_type1.c
>
> 2143
> 2144 /* Redundantly walks non-present capabilities to simplify caller */
> 2145 static int vfio_iommu_device_capable(struct device *dev, void *data)
> 2146 {
> > 2147 return device_iommu_capable(dev, (enum iommu_cap)data);
This wants to be written as
return device_iommu_capable(dev, (uintptr_t)data);
Jason
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: drivers/vfio/vfio_iommu_type1.c:2147:35: warning: cast to smaller integer type 'enum iommu_cap' from 'void *'
@ 2022-08-12 14:12 ` Jason Gunthorpe
0 siblings, 0 replies; 3+ messages in thread
From: Jason Gunthorpe @ 2022-08-12 14:12 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2381 bytes --]
On Wed, Aug 10, 2022 at 11:25:15AM +0800, kernel test robot wrote:
> Hi Robin,
>
> FYI, the error/warning still remains.
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: d4252071b97d2027d246f6a82cbee4d52f618b47
> commit: eed20c782aea57b7efb42af2905dc381268b21e9 vfio/type1: Simplify bus_type determination
> date: 6 weeks ago
> config: arm64-randconfig-r034-20220810 (https://download.01.org/0day-ci/archive/20220810/202208101119.7unZx9dJ-lkp(a)intel.com/config)
> compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 5f1c7e2cc5a3c07cbc2412e851a7283c1841f520)
> 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=eed20c782aea57b7efb42af2905dc381268b21e9
> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> git fetch --no-tags linus master
> git checkout eed20c782aea57b7efb42af2905dc381268b21e9
> # save the config file
> mkdir build_dir && cp config build_dir/.config
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/vfio/
>
> If you fix the issue, kindly add following tag where applicable
> Reported-by: kernel test robot <lkp@intel.com>
>
> All warnings (new ones prefixed by >>):
>
> >> drivers/vfio/vfio_iommu_type1.c:2147:35: warning: cast to smaller integer type 'enum iommu_cap' from 'void *' [-Wvoid-pointer-to-enum-cast]
> return device_iommu_capable(dev, (enum iommu_cap)data);
> ^~~~~~~~~~~~~~~~~~~~
> 1 warning generated.
>
>
> vim +2147 drivers/vfio/vfio_iommu_type1.c
>
> 2143
> 2144 /* Redundantly walks non-present capabilities to simplify caller */
> 2145 static int vfio_iommu_device_capable(struct device *dev, void *data)
> 2146 {
> > 2147 return device_iommu_capable(dev, (enum iommu_cap)data);
This wants to be written as
return device_iommu_capable(dev, (uintptr_t)data);
Jason
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-08-12 14:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-10 3:25 drivers/vfio/vfio_iommu_type1.c:2147:35: warning: cast to smaller integer type 'enum iommu_cap' from 'void *' kernel test robot
2022-08-12 14:12 ` Jason Gunthorpe
2022-08-12 14:12 ` Jason Gunthorpe
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.