* Re: [PATCH v6 2/5] iommu: Implement of_iommu_get_resv_regions()
[not found] <20220705125834.431711-3-thierry.reding@gmail.com>
@ 2022-07-05 17:57 ` kernel test robot
2022-07-05 23:42 ` kernel test robot
1 sibling, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-07-05 17:57 UTC (permalink / raw)
To: Thierry Reding; +Cc: llvm, kbuild-all
Hi Thierry,
I love your patch! Perhaps something to improve:
[auto build test WARNING on robh/for-next]
[also build test WARNING on joro-iommu/next tegra/for-next linus/master v5.19-rc5 next-20220705]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/intel-lab-lkp/linux/commits/Thierry-Reding/iommu-Support-mappings-reservations-in-reserved-memory-regions/20220705-213902
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: hexagon-randconfig-r045-20220703 (https://download.01.org/0day-ci/archive/20220706/202207060108.xlRiAHdT-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 142aca7741d5b06207e87bf4880fbe308c8d6823)
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/intel-lab-lkp/linux/commit/db596b2e55b6ffe12d06373455981deaf8093b4c
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Thierry-Reding/iommu-Support-mappings-reservations-in-reserved-memory-regions/20220705-213902
git checkout db596b2e55b6ffe12d06373455981deaf8093b4c
# 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=hexagon SHELL=/bin/bash drivers/iommu/
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/iommu/of_iommu.c:225:24: warning: variable 'end' set but not used [-Wunused-but-set-variable]
phys_addr_t start, end;
^
>> drivers/iommu/of_iommu.c:220:17: warning: variable 'index' set but not used [-Wunused-but-set-variable]
unsigned int index = 0;
^
2 warnings generated.
vim +/index +220 drivers/iommu/of_iommu.c
176
177 /**
178 * of_iommu_get_resv_regions - reserved region driver helper for device tree
179 * @dev: device for which to get reserved regions
180 * @list: reserved region list
181 *
182 * IOMMU drivers can use this to implement their .get_resv_regions() callback
183 * for memory regions attached to a device tree node. See the reserved-memory
184 * device tree bindings on how to use these:
185 *
186 * Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt
187 */
188 void of_iommu_get_resv_regions(struct device *dev, struct list_head *list)
189 {
190 #if IS_ENABLED(CONFIG_OF_ADDRESS)
191 struct of_phandle_iterator it;
192 int err;
193
194 of_for_each_phandle(&it, err, dev->of_node, "memory-region", NULL, 0) {
195 struct iommu_resv_region *region;
196 struct resource res;
197 const __be32 *maps;
198 int size;
199
200 memset(&res, 0, sizeof(res));
201
202 /*
203 * The "reg" property is optional and can be omitted by reserved-memory regions
204 * that represent reservations in the IOVA space, which are regions that should
205 * not be mapped.
206 */
207 if (of_find_property(it.node, "reg", NULL)) {
208 err = of_address_to_resource(it.node, 0, &res);
209 if (err < 0) {
210 dev_err(dev, "failed to parse memory region %pOF: %d\n",
211 it.node, err);
212 continue;
213 }
214 }
215
216 maps = of_get_property(it.node, "iommu-addresses", &size);
217 if (maps) {
218 const __be32 *end = maps + size / sizeof(__be32);
219 struct device_node *np;
> 220 unsigned int index = 0;
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v6 2/5] iommu: Implement of_iommu_get_resv_regions()
[not found] <20220705125834.431711-3-thierry.reding@gmail.com>
2022-07-05 17:57 ` [PATCH v6 2/5] iommu: Implement of_iommu_get_resv_regions() kernel test robot
@ 2022-07-05 23:42 ` kernel test robot
1 sibling, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-07-05 23:42 UTC (permalink / raw)
To: Thierry Reding; +Cc: llvm, kbuild-all
Hi Thierry,
I love your patch! Perhaps something to improve:
[auto build test WARNING on robh/for-next]
[also build test WARNING on joro-iommu/next tegra/for-next linus/master v5.19-rc5 next-20220705]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/intel-lab-lkp/linux/commits/Thierry-Reding/iommu-Support-mappings-reservations-in-reserved-memory-regions/20220705-213902
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: x86_64-randconfig-a012 (https://download.01.org/0day-ci/archive/20220706/202207060758.u1lk0Hhl-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 142aca7741d5b06207e87bf4880fbe308c8d6823)
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/intel-lab-lkp/linux/commit/db596b2e55b6ffe12d06373455981deaf8093b4c
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Thierry-Reding/iommu-Support-mappings-reservations-in-reserved-memory-regions/20220705-213902
git checkout db596b2e55b6ffe12d06373455981deaf8093b4c
# 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=x86_64 SHELL=/bin/bash drivers/iommu/
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/iommu/of_iommu.c:225:24: warning: variable 'end' set but not used [-Wunused-but-set-variable]
phys_addr_t start, end;
^
>> drivers/iommu/of_iommu.c:220:17: warning: variable 'index' set but not used [-Wunused-but-set-variable]
unsigned int index = 0;
^
2 warnings generated.
vim +/end +225 drivers/iommu/of_iommu.c
176
177 /**
178 * of_iommu_get_resv_regions - reserved region driver helper for device tree
179 * @dev: device for which to get reserved regions
180 * @list: reserved region list
181 *
182 * IOMMU drivers can use this to implement their .get_resv_regions() callback
183 * for memory regions attached to a device tree node. See the reserved-memory
184 * device tree bindings on how to use these:
185 *
186 * Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt
187 */
188 void of_iommu_get_resv_regions(struct device *dev, struct list_head *list)
189 {
190 #if IS_ENABLED(CONFIG_OF_ADDRESS)
191 struct of_phandle_iterator it;
192 int err;
193
194 of_for_each_phandle(&it, err, dev->of_node, "memory-region", NULL, 0) {
195 struct iommu_resv_region *region;
196 struct resource res;
197 const __be32 *maps;
198 int size;
199
200 memset(&res, 0, sizeof(res));
201
202 /*
203 * The "reg" property is optional and can be omitted by reserved-memory regions
204 * that represent reservations in the IOVA space, which are regions that should
205 * not be mapped.
206 */
207 if (of_find_property(it.node, "reg", NULL)) {
208 err = of_address_to_resource(it.node, 0, &res);
209 if (err < 0) {
210 dev_err(dev, "failed to parse memory region %pOF: %d\n",
211 it.node, err);
212 continue;
213 }
214 }
215
216 maps = of_get_property(it.node, "iommu-addresses", &size);
217 if (maps) {
218 const __be32 *end = maps + size / sizeof(__be32);
219 struct device_node *np;
> 220 unsigned int index = 0;
221 u32 phandle;
222 int na, ns;
223
224 while (maps < end) {
> 225 phys_addr_t start, end;
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-07-05 23:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20220705125834.431711-3-thierry.reding@gmail.com>
2022-07-05 17:57 ` [PATCH v6 2/5] iommu: Implement of_iommu_get_resv_regions() kernel test robot
2022-07-05 23:42 ` kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox