From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [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
Date: Fri, 23 Oct 2020 00:06:07 +0800 [thread overview]
Message-ID: <202010230002.9g7AMlta-lkp@intel.com> (raw)
[-- 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 --]
reply other threads:[~2020-10-22 16:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202010230002.9g7AMlta-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.