All of lore.kernel.org
 help / color / mirror / Atom feed
* [thierryreding:for-5.19/work 141/141] drivers/iommu/of_iommu.c:227:52: warning: variable 'end' set but not used
@ 2022-04-26 21:18 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-04-26 21:18 UTC (permalink / raw)
  To: Thierry Reding; +Cc: kbuild-all, linux-kernel

tree:   https://github.com/thierryreding/linux for-5.19/work
head:   a39ec325554470289e8384e30d06a22960d1dd7b
commit: a39ec325554470289e8384e30d06a22960d1dd7b [141/141] WIP
config: mips-allyesconfig (https://download.01.org/0day-ci/archive/20220427/202204270529.C7DsYjUI-lkp@intel.com/config)
compiler: mips-linux-gcc (GCC) 11.3.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/thierryreding/linux/commit/a39ec325554470289e8384e30d06a22960d1dd7b
        git remote add thierryreding https://github.com/thierryreding/linux
        git fetch --no-tags thierryreding for-5.19/work
        git checkout a39ec325554470289e8384e30d06a22960d1dd7b
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash drivers/

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/of_iommu.c: In function 'of_iommu_get_resv_regions':
>> drivers/iommu/of_iommu.c:227:52: warning: variable 'end' set but not used [-Wunused-but-set-variable]
     227 |                                 phys_addr_t start, end;
         |                                                    ^~~


vim +/end +227 drivers/iommu/of_iommu.c

   178	
   179	/**
   180	 * of_iommu_get_resv_regions - reserved region driver helper for device tree
   181	 * @dev: device for which to get reserved regions
   182	 * @list: reserved region list
   183	 *
   184	 * IOMMU drivers can use this to implement their .get_resv_regions() callback
   185	 * for memory regions attached to a device tree node. See the reserved-memory
   186	 * device tree bindings on how to use these:
   187	 *
   188	 *   Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt
   189	 */
   190	void of_iommu_get_resv_regions(struct device *dev, struct list_head *list)
   191	{
   192	#if IS_ENABLED(CONFIG_OF_ADDRESS)
   193		struct of_phandle_iterator it;
   194		int err;
   195	
   196		of_for_each_phandle(&it, err, dev->of_node, "memory-region", NULL, 0) {
   197			struct iommu_resv_region *region;
   198			struct resource res;
   199			const __be32 *maps;
   200			int size;
   201	
   202			memset(&res, 0, sizeof(res));
   203	
   204			/*
   205			 * The "reg" property is optional and can be omitted by reserved-memory regions
   206			 * that represent reservations in the IOVA space, which are regions that should
   207			 * not be mapped.
   208			 */
   209			if (of_find_property(it.node, "reg", NULL)) {
   210				err = of_address_to_resource(it.node, 0, &res);
   211				if (err < 0) {
   212					dev_err(dev, "failed to parse memory region %pOF: %d\n",
   213						it.node, err);
   214					continue;
   215				}
   216			}
   217	
   218			maps = of_get_property(it.node, "iommu-addresses", &size);
   219			if (maps) {
   220				const __be32 *end = maps + size / sizeof(__be32);
   221				struct device_node *np;
   222				unsigned int index = 0;
   223				u32 phandle;
   224				int na, ns;
   225	
   226				while (maps < end) {
 > 227					phys_addr_t start, end;

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

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

only message in thread, other threads:[~2022-04-26 21:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-26 21:18 [thierryreding:for-5.19/work 141/141] drivers/iommu/of_iommu.c:227:52: warning: variable 'end' set 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.