* [frank-w-bpi-r2-4.14:5.14-hdmilarb 45/45] drivers/iommu/iommu.c:929:72: warning: cast to smaller integer type 'unsigned int' from 'struct iommu_group *'
@ 2021-07-14 18:27 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-07-14 18:27 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 3750 bytes --]
tree: https://github.com/frank-w/BPI-R2-4.14 5.14-hdmilarb
head: a11fbee1b23c2d5f7c177ced2043eb54c53a5d50
commit: a11fbee1b23c2d5f7c177ced2043eb54c53a5d50 [45/45] iommu: add debug
config: x86_64-randconfig-b001-20210714 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 8d69635ed9ecf36fd0ca85906bfde17949671cbe)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/frank-w/BPI-R2-4.14/commit/a11fbee1b23c2d5f7c177ced2043eb54c53a5d50
git remote add frank-w-bpi-r2-4.14 https://github.com/frank-w/BPI-R2-4.14
git fetch --no-tags frank-w-bpi-r2-4.14 5.14-hdmilarb
git checkout a11fbee1b23c2d5f7c177ced2043eb54c53a5d50
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
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/iommu/iommu.c:929:72: warning: cast to smaller integer type 'unsigned int' from 'struct iommu_group *' [-Wpointer-to-int-cast]
printk(KERN_ALERT "DEBUG: Passed %s %d 0x%08x\n",__FUNCTION__,__LINE__,(unsigned int)group);
^~~~~~~~~~~~~~~~~~~
>> drivers/iommu/iommu.c:926:22: warning: ISO C90 forbids mixing declarations and code [-Wdeclaration-after-statement]
struct iommu_group *group = dev->iommu_group;
^
2 warnings generated.
vim +929 drivers/iommu/iommu.c
915
916 /**
917 * iommu_group_remove_device - remove a device from it's current group
918 * @dev: device to be removed
919 *
920 * This function is called by an iommu driver to remove the device from
921 * it's current group. This decrements the iommu group reference count.
922 */
923 void iommu_group_remove_device(struct device *dev)
924 {
925 printk(KERN_ALERT "DEBUG: Passed %s %d \n",__FUNCTION__,__LINE__);
> 926 struct iommu_group *group = dev->iommu_group;
927 struct group_device *tmp_device, *device = NULL;
928
> 929 printk(KERN_ALERT "DEBUG: Passed %s %d 0x%08x\n",__FUNCTION__,__LINE__,(unsigned int)group);
930 //dev_info(dev, "Removing from iommu group %d\n", group->id);
931
932 /* Pre-notify listeners that a device is being removed. */
933 blocking_notifier_call_chain(&group->notifier,
934 IOMMU_GROUP_NOTIFY_DEL_DEVICE, dev);
935 printk(KERN_ALERT "DEBUG: Passed %s %d \n",__FUNCTION__,__LINE__);
936 mutex_lock(&group->mutex);
937 list_for_each_entry(tmp_device, &group->devices, list) {
938 if (tmp_device->dev == dev) {
939 device = tmp_device;
940 list_del(&device->list);
941 break;
942 }
943 }
944 mutex_unlock(&group->mutex);
945
946 if (!device)
947 return;
948
949 sysfs_remove_link(group->devices_kobj, device->name);
950 sysfs_remove_link(&dev->kobj, "iommu_group");
951
952 trace_remove_device_from_group(group->id, dev);
953
954 kfree(device->name);
955 kfree(device);
956 dev->iommu_group = NULL;
957 kobject_put(group->devices_kobj);
958 }
959 EXPORT_SYMBOL_GPL(iommu_group_remove_device);
960
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 48852 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-07-14 18:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-14 18:27 [frank-w-bpi-r2-4.14:5.14-hdmilarb 45/45] drivers/iommu/iommu.c:929:72: warning: cast to smaller integer type 'unsigned int' from 'struct iommu_group *' kernel test robot
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.