All of lore.kernel.org
 help / color / mirror / Atom feed
* [opencloudos:linux-5.4/lts/5.4.119-20.0009.spr 1/1] drivers/iommu/arm-smmu.c:1537:1: warning: label 'out_unlock' defined but not used
@ 2024-12-04 12:48 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-12-04 12:48 UTC (permalink / raw)
  To: kaixuxia, frankjpliu, kasong, sagazchen, kernelxing, aurelianliu,
	deshengwu, flyingpeng, jingqunli, jason.zeng, lin.x.wang,
	yingbao.jia, pei.p.jia
  Cc: oe-kbuild-all

tree:   https://gitee.com/OpenCloudOS/OpenCloudOS-Kernel.git linux-5.4/lts/5.4.119-20.0009.spr
head:   f1811f6442501fe34d2339158aed4f85a64f0398
commit: 3e38de275a876dcf09eb478610a9055366496bc9 [1/1] iommu: remove DOMAIN_ATTR_NESTING
config: arm64-randconfig-001-20241203 (https://download.01.org/0day-ci/archive/20241204/202412042012.pvbwUPM5-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241204/202412042012.pvbwUPM5-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202412042012.pvbwUPM5-lkp@intel.com/

All warnings (new ones prefixed by >>):

         |                                                           ^~
   drivers/iommu/arm-smmu.c:112:27: note: in expansion of macro '__fwspec_cfg'
     112 | #define fwspec_smmu(fw)  (__fwspec_cfg(fw)->smmu)
         |                           ^~~~~~~~~~~~
   drivers/iommu/arm-smmu.c:1076:40: note: in expansion of macro 'fwspec_smmu'
    1076 |         struct arm_smmu_device *smmu = fwspec_smmu(fwspec);
         |                                        ^~~~~~~~~~~
   drivers/iommu/arm-smmu.c:1077:49: error: 'struct iommu_fwspec' has no member named 'iommu_priv'
    1077 |         struct arm_smmu_master_cfg *cfg = fwspec->iommu_priv;
         |                                                 ^~
   drivers/iommu/arm-smmu.c:111:59: error: 'struct iommu_fwspec' has no member named 'iommu_priv'
     111 | #define __fwspec_cfg(fw) ((struct arm_smmu_master_cfg *)fw->iommu_priv)
         |                                                           ^~
   drivers/iommu/arm-smmu.c:114:46: note: in expansion of macro '__fwspec_cfg'
     114 |         (i >= fw->num_ids ? INVALID_SMENDX : __fwspec_cfg(fw)->smendx[i])
         |                                              ^~~~~~~~~~~~
   drivers/iommu/arm-smmu.c:116:27: note: in expansion of macro 'fwspec_smendx'
     116 |         for (i = 0; idx = fwspec_smendx(fw, i), i < fw->num_ids; ++i)
         |                           ^~~~~~~~~~~~~
   drivers/iommu/arm-smmu.c:1081:9: note: in expansion of macro 'for_each_cfg_sme'
    1081 |         for_each_cfg_sme(fwspec, i, idx) {
         |         ^~~~~~~~~~~~~~~~
   drivers/iommu/arm-smmu.c:116:47: warning: left-hand operand of comma expression has no effect [-Wunused-value]
     116 |         for (i = 0; idx = fwspec_smendx(fw, i), i < fw->num_ids; ++i)
         |                                               ^
   drivers/iommu/arm-smmu.c:1081:9: note: in expansion of macro 'for_each_cfg_sme'
    1081 |         for_each_cfg_sme(fwspec, i, idx) {
         |         ^~~~~~~~~~~~~~~~
   drivers/iommu/arm-smmu.c: In function 'arm_smmu_domain_add_master':
   drivers/iommu/arm-smmu.c:111:59: error: 'struct iommu_fwspec' has no member named 'iommu_priv'
     111 | #define __fwspec_cfg(fw) ((struct arm_smmu_master_cfg *)fw->iommu_priv)
         |                                                           ^~
   drivers/iommu/arm-smmu.c:114:46: note: in expansion of macro '__fwspec_cfg'
     114 |         (i >= fw->num_ids ? INVALID_SMENDX : __fwspec_cfg(fw)->smendx[i])
         |                                              ^~~~~~~~~~~~
   drivers/iommu/arm-smmu.c:116:27: note: in expansion of macro 'fwspec_smendx'
     116 |         for (i = 0; idx = fwspec_smendx(fw, i), i < fw->num_ids; ++i)
         |                           ^~~~~~~~~~~~~
   drivers/iommu/arm-smmu.c:1103:9: note: in expansion of macro 'for_each_cfg_sme'
    1103 |         for_each_cfg_sme(fwspec, i, idx) {
         |         ^~~~~~~~~~~~~~~~
   drivers/iommu/arm-smmu.c:116:47: warning: left-hand operand of comma expression has no effect [-Wunused-value]
     116 |         for (i = 0; idx = fwspec_smendx(fw, i), i < fw->num_ids; ++i)
         |                                               ^
   drivers/iommu/arm-smmu.c:1103:9: note: in expansion of macro 'for_each_cfg_sme'
    1103 |         for_each_cfg_sme(fwspec, i, idx) {
         |         ^~~~~~~~~~~~~~~~
   drivers/iommu/arm-smmu.c: In function 'arm_smmu_attach_dev':
   drivers/iommu/arm-smmu.c:1134:20: error: 'struct iommu_fwspec' has no member named 'iommu_priv'
    1134 |         if (!fwspec->iommu_priv)
         |                    ^~
   drivers/iommu/arm-smmu.c:111:59: error: 'struct iommu_fwspec' has no member named 'iommu_priv'
     111 | #define __fwspec_cfg(fw) ((struct arm_smmu_master_cfg *)fw->iommu_priv)
         |                                                           ^~
   drivers/iommu/arm-smmu.c:112:27: note: in expansion of macro '__fwspec_cfg'
     112 | #define fwspec_smmu(fw)  (__fwspec_cfg(fw)->smmu)
         |                           ^~~~~~~~~~~~
   drivers/iommu/arm-smmu.c:1137:16: note: in expansion of macro 'fwspec_smmu'
    1137 |         smmu = fwspec_smmu(fwspec);
         |                ^~~~~~~~~~~
   drivers/iommu/arm-smmu.c: In function 'arm_smmu_add_device':
   drivers/iommu/arm-smmu.c:1379:15: error: 'struct iommu_fwspec' has no member named 'iommu_priv'
    1379 |         fwspec->iommu_priv = cfg;
         |               ^~
   drivers/iommu/arm-smmu.c: In function 'arm_smmu_remove_device':
   drivers/iommu/arm-smmu.c:1417:22: error: 'struct iommu_fwspec' has no member named 'iommu_priv'
    1417 |         cfg  = fwspec->iommu_priv;
         |                      ^~
   drivers/iommu/arm-smmu.c:1430:21: error: 'struct iommu_fwspec' has no member named 'iommu_priv'
    1430 |         kfree(fwspec->iommu_priv);
         |                     ^~
   drivers/iommu/arm-smmu.c: In function 'arm_smmu_device_group':
   drivers/iommu/arm-smmu.c:111:59: error: 'struct iommu_fwspec' has no member named 'iommu_priv'
     111 | #define __fwspec_cfg(fw) ((struct arm_smmu_master_cfg *)fw->iommu_priv)
         |                                                           ^~
   drivers/iommu/arm-smmu.c:112:27: note: in expansion of macro '__fwspec_cfg'
     112 | #define fwspec_smmu(fw)  (__fwspec_cfg(fw)->smmu)
         |                           ^~~~~~~~~~~~
   drivers/iommu/arm-smmu.c:1437:40: note: in expansion of macro 'fwspec_smmu'
    1437 |         struct arm_smmu_device *smmu = fwspec_smmu(fwspec);
         |                                        ^~~~~~~~~~~
   drivers/iommu/arm-smmu.c:111:59: error: 'struct iommu_fwspec' has no member named 'iommu_priv'
     111 | #define __fwspec_cfg(fw) ((struct arm_smmu_master_cfg *)fw->iommu_priv)
         |                                                           ^~
   drivers/iommu/arm-smmu.c:114:46: note: in expansion of macro '__fwspec_cfg'
     114 |         (i >= fw->num_ids ? INVALID_SMENDX : __fwspec_cfg(fw)->smendx[i])
         |                                              ^~~~~~~~~~~~
   drivers/iommu/arm-smmu.c:116:27: note: in expansion of macro 'fwspec_smendx'
     116 |         for (i = 0; idx = fwspec_smendx(fw, i), i < fw->num_ids; ++i)
         |                           ^~~~~~~~~~~~~
   drivers/iommu/arm-smmu.c:1441:9: note: in expansion of macro 'for_each_cfg_sme'
    1441 |         for_each_cfg_sme(fwspec, i, idx) {
         |         ^~~~~~~~~~~~~~~~
   drivers/iommu/arm-smmu.c:116:47: warning: left-hand operand of comma expression has no effect [-Wunused-value]
     116 |         for (i = 0; idx = fwspec_smendx(fw, i), i < fw->num_ids; ++i)
         |                                               ^
   drivers/iommu/arm-smmu.c:1441:9: note: in expansion of macro 'for_each_cfg_sme'
    1441 |         for_each_cfg_sme(fwspec, i, idx) {
         |         ^~~~~~~~~~~~~~~~
   drivers/iommu/arm-smmu.c: In function 'arm_smmu_domain_set_attr':
>> drivers/iommu/arm-smmu.c:1537:1: warning: label 'out_unlock' defined but not used [-Wunused-label]
    1537 | out_unlock:
         | ^~~~~~~~~~
   drivers/iommu/arm-smmu.c: At top level:
   drivers/iommu/arm-smmu.c:1587:35: error: initialization of 'int (*)(struct iommu_domain *, long unsigned int,  phys_addr_t,  size_t,  int,  gfp_t)' {aka 'int (*)(struct iommu_domain *, long unsigned int,  long long unsigned int,  long unsigned int,  int,  unsigned int)'} from incompatible pointer type 'int (*)(struct iommu_domain *, long unsigned int,  phys_addr_t,  size_t,  int)' {aka 'int (*)(struct iommu_domain *, long unsigned int,  long long unsigned int,  long unsigned int,  int)'} [-Werror=incompatible-pointer-types]
    1587 |         .map                    = arm_smmu_map,
         |                                   ^~~~~~~~~~~~
   drivers/iommu/arm-smmu.c:1587:35: note: (near initialization for 'arm_smmu_ops.map')
   drivers/iommu/arm-smmu.c:1592:10: error: 'struct iommu_ops' has no member named 'add_device'
    1592 |         .add_device             = arm_smmu_add_device,
         |          ^~~~~~~~~~
   drivers/iommu/arm-smmu.c:1592:35: error: initialization of 'struct iommu_device * (*)(struct device *)' from incompatible pointer type 'int (*)(struct device *)' [-Werror=incompatible-pointer-types]
    1592 |         .add_device             = arm_smmu_add_device,
         |                                   ^~~~~~~~~~~~~~~~~~~
   drivers/iommu/arm-smmu.c:1592:35: note: (near initialization for 'arm_smmu_ops.probe_device')
   drivers/iommu/arm-smmu.c:1593:10: error: 'struct iommu_ops' has no member named 'remove_device'; did you mean 'probe_device'?
    1593 |         .remove_device          = arm_smmu_remove_device,
         |          ^~~~~~~~~~~~~
         |          probe_device
   cc1: some warnings being treated as errors


vim +/out_unlock +1537 drivers/iommu/arm-smmu.c

3e38de275a876dc Christoph Hellwig 2021-04-01  1509  
c752ce45b213de8 Will Deacon       2014-06-25  1510  static int arm_smmu_domain_set_attr(struct iommu_domain *domain,
c752ce45b213de8 Will Deacon       2014-06-25  1511  				    enum iommu_attr attr, void *data)
c752ce45b213de8 Will Deacon       2014-06-25  1512  {
518f7136244c167 Will Deacon       2014-11-14  1513  	int ret = 0;
1d672638fca24db Joerg Roedel      2015-03-26  1514  	struct arm_smmu_domain *smmu_domain = to_smmu_domain(domain);
c752ce45b213de8 Will Deacon       2014-06-25  1515  
518f7136244c167 Will Deacon       2014-11-14  1516  	mutex_lock(&smmu_domain->init_mutex);
518f7136244c167 Will Deacon       2014-11-14  1517  
44f6876a00e83df Robin Murphy      2018-09-20  1518  	switch(domain->type) {
44f6876a00e83df Robin Murphy      2018-09-20  1519  	case IOMMU_DOMAIN_UNMANAGED:
c752ce45b213de8 Will Deacon       2014-06-25  1520  		switch (attr) {
c752ce45b213de8 Will Deacon       2014-06-25  1521  		default:
518f7136244c167 Will Deacon       2014-11-14  1522  			ret = -ENODEV;
c752ce45b213de8 Will Deacon       2014-06-25  1523  		}
44f6876a00e83df Robin Murphy      2018-09-20  1524  		break;
44f6876a00e83df Robin Murphy      2018-09-20  1525  	case IOMMU_DOMAIN_DMA:
44f6876a00e83df Robin Murphy      2018-09-20  1526  		switch (attr) {
44f6876a00e83df Robin Murphy      2018-09-20  1527  		case DOMAIN_ATTR_DMA_USE_FLUSH_QUEUE:
44f6876a00e83df Robin Murphy      2018-09-20  1528  			smmu_domain->non_strict = *(int *)data;
44f6876a00e83df Robin Murphy      2018-09-20  1529  			break;
44f6876a00e83df Robin Murphy      2018-09-20  1530  		default:
44f6876a00e83df Robin Murphy      2018-09-20  1531  			ret = -ENODEV;
44f6876a00e83df Robin Murphy      2018-09-20  1532  		}
44f6876a00e83df Robin Murphy      2018-09-20  1533  		break;
44f6876a00e83df Robin Murphy      2018-09-20  1534  	default:
44f6876a00e83df Robin Murphy      2018-09-20  1535  		ret = -EINVAL;
44f6876a00e83df Robin Murphy      2018-09-20  1536  	}
518f7136244c167 Will Deacon       2014-11-14 @1537  out_unlock:
518f7136244c167 Will Deacon       2014-11-14  1538  	mutex_unlock(&smmu_domain->init_mutex);
518f7136244c167 Will Deacon       2014-11-14  1539  	return ret;
c752ce45b213de8 Will Deacon       2014-06-25  1540  }
c752ce45b213de8 Will Deacon       2014-06-25  1541  

:::::: The code at line 1537 was first introduced by commit
:::::: 518f7136244c167538f732691be589959310b295 iommu/arm-smmu: make use of generic LPAE allocator

:::::: TO: Will Deacon <will.deacon@arm.com>
:::::: CC: Will Deacon <will.deacon@arm.com>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-12-04 12:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-04 12:48 [opencloudos:linux-5.4/lts/5.4.119-20.0009.spr 1/1] drivers/iommu/arm-smmu.c:1537:1: warning: label 'out_unlock' defined but not used 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.