* [peterz-queue:core/core 1/1] drivers/of/fdt.c:1255 unflatten_and_copy_device_tree() warn: should '1 << (((__builtin_constant_p((((((7 COPYING CREDITS Documentation Kbuild Kconfig LICENSES MAINTAINERS Makefile README arch block certs crypto drivers fs include init ipc kernel lib mm net samples scripts security sound tools usr virt 4) + 4) + 4) + 4)) - 1)) COPYING CREDITS Documentation Kbuild Kconfig LICENSES MAINTAINERS Makefile README arch block certs crypto drivers fs include init ipc kernel lib m
@ 2020-10-22 16:06 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-10-22 16:06 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 4490 bytes --]
CC: kbuild-all(a)lists.01.org
TO: Jakub Jelinek <jakub@redhat.com>
CC: Peter Zijlstra <peterz@infradead.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git core/core
head: 947447a78a9092ad0a2d2bbd3ab3016862b9968d
commit: 947447a78a9092ad0a2d2bbd3ab3016862b9968d [1/1] ilog2 vs. GCC inlining heuristics
:::::: branch date: 5 hours ago
:::::: commit date: 5 hours ago
config: h8300-randconfig-m031-20201022 (attached as .config)
compiler: h8300-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
New smatch warnings:
drivers/of/fdt.c:1255 unflatten_and_copy_device_tree() warn: should '1 << (((__builtin_constant_p((((((7 * 4) + 4) + 4) + 4)) - 1)) ?((((((((7 * 4) + 4) + 4) + 4)) - 1) < 2) ?0:63 - __builtin_clzll((((((7 * 4) + 4) + 4) + 4)) - 1)):((4 <= 4)) ?__ilog2_u32((((((7 * 4) + 4) + 4) + 4)) - 1):__ilog2_u64((((((7 * 4) + 4) + 4) + 4)) - 1)) + 1)' be a 64 bit type?
Old smatch warnings:
drivers/of/fdt.c:1130 early_init_dt_add_memory_arch() warn: unsigned 'base + size' is never less than zero.
drivers/of/fdt.c:1135 early_init_dt_add_memory_arch() warn: unsigned 'base' is never less than zero.
vim +1255 drivers/of/fdt.c
e6ce1324e4f08b Stephen Neuendorffer 2010-11-18 1231
a8bf7527a2e17c Rob Herring 2013-08-26 1232 /**
a8bf7527a2e17c Rob Herring 2013-08-26 1233 * unflatten_and_copy_device_tree - copy and create tree of device_nodes from flat blob
a8bf7527a2e17c Rob Herring 2013-08-26 1234 *
a8bf7527a2e17c Rob Herring 2013-08-26 1235 * Copies and unflattens the device-tree passed by the firmware, creating the
a8bf7527a2e17c Rob Herring 2013-08-26 1236 * tree of struct device_node. It also fills the "name" and "type"
a8bf7527a2e17c Rob Herring 2013-08-26 1237 * pointers of the nodes so the normal device-tree walking functions
a8bf7527a2e17c Rob Herring 2013-08-26 1238 * can be used. This should only be used when the FDT memory has not been
a8bf7527a2e17c Rob Herring 2013-08-26 1239 * reserved such is the case when the FDT is built-in to the kernel init
a8bf7527a2e17c Rob Herring 2013-08-26 1240 * section. If the FDT memory is reserved already then unflatten_device_tree
a8bf7527a2e17c Rob Herring 2013-08-26 1241 * should be used instead.
a8bf7527a2e17c Rob Herring 2013-08-26 1242 */
a8bf7527a2e17c Rob Herring 2013-08-26 1243 void __init unflatten_and_copy_device_tree(void)
a8bf7527a2e17c Rob Herring 2013-08-26 1244 {
6f041e99fc7ba0 James Hogan 2013-11-21 1245 int size;
6f041e99fc7ba0 James Hogan 2013-11-21 1246 void *dt;
6f041e99fc7ba0 James Hogan 2013-11-21 1247
6f041e99fc7ba0 James Hogan 2013-11-21 1248 if (!initial_boot_params) {
6f041e99fc7ba0 James Hogan 2013-11-21 1249 pr_warn("No valid device tree found, continuing without\n");
6f041e99fc7ba0 James Hogan 2013-11-21 1250 return;
6f041e99fc7ba0 James Hogan 2013-11-21 1251 }
6f041e99fc7ba0 James Hogan 2013-11-21 1252
c972de14971f14 Rob Herring 2014-04-01 1253 size = fdt_totalsize(initial_boot_params);
6f041e99fc7ba0 James Hogan 2013-11-21 1254 dt = early_init_dt_alloc_memory_arch(size,
c972de14971f14 Rob Herring 2014-04-01 @1255 roundup_pow_of_two(FDT_V17_SIZE));
a8bf7527a2e17c Rob Herring 2013-08-26 1256
a8bf7527a2e17c Rob Herring 2013-08-26 1257 if (dt) {
a8bf7527a2e17c Rob Herring 2013-08-26 1258 memcpy(dt, initial_boot_params, size);
a8bf7527a2e17c Rob Herring 2013-08-26 1259 initial_boot_params = dt;
a8bf7527a2e17c Rob Herring 2013-08-26 1260 }
a8bf7527a2e17c Rob Herring 2013-08-26 1261 unflatten_device_tree();
a8bf7527a2e17c Rob Herring 2013-08-26 1262 }
a8bf7527a2e17c Rob Herring 2013-08-26 1263
:::::: The code@line 1255 was first introduced by commit
:::::: c972de14971f1482ab482f0a7abc85679a23326a of/fdt: use libfdt accessors for header data
:::::: TO: Rob Herring <robh@kernel.org>
:::::: CC: Rob Herring <robh@kernel.org>
---
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: 25486 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-10-22 16:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-22 16:06 [peterz-queue:core/core 1/1] drivers/of/fdt.c:1255 unflatten_and_copy_device_tree() warn: should '1 << (((__builtin_constant_p((((((7 COPYING CREDITS Documentation Kbuild Kconfig LICENSES MAINTAINERS Makefile README arch block certs crypto drivers fs include init ipc kernel lib mm net samples scripts security sound tools usr virt 4) + 4) + 4) + 4)) - 1)) COPYING CREDITS Documentation Kbuild Kconfig LICENSES MAINTAINERS Makefile README arch block certs crypto drivers fs include init ipc kernel lib m 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.