LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: changbin.du@intel.com
Cc: kbuild-all@01.org, yamada.masahiro@socionext.com,
michal.lkml@markovi.net, tglx@linutronix.de, mingo@redhat.com,
akpm@linux-foundation.org, rostedt@goodmis.org,
rdunlap@infradead.org, x86@kernel.org, lgirdwood@gmail.com,
broonie@kernel.org, arnd@arndb.de, linux-kbuild@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
Changbin Du <changbin.du@intel.com>
Subject: Re: [PATCH v4 3/4] kernel hacking: new config CC_OPTIMIZE_FOR_DEBUGGING to apply GCC -Og optimization
Date: Fri, 11 May 2018 04:59:18 +0800 [thread overview]
Message-ID: <201805110234.FUlJejFr%fengguang.wu@intel.com> (raw)
In-Reply-To: <1525855396-7908-4-git-send-email-changbin.du@intel.com>
[-- Attachment #1: Type: text/plain, Size: 10140 bytes --]
Hi Changbin,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v4.17-rc4 next-20180510]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/changbin-du-intel-com/kernel-hacking-GCC-optimization-for-better-debug-experience-Og/20180509-213955
config: x86_64-randconfig-s1-05100951 (attached as .config)
compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings
All warnings (new ones prefixed by >>):
drivers//net/wireless/zydas/zd1201.c: In function 'zd1201_get_freq':
>> drivers//net/wireless/zydas/zd1201.c:939:10: warning: 'channel' may be used uninitialized in this function [-Wmaybe-uninitialized]
freq->m = channel;
~~~~~~~~^~~~~~~~~
drivers//net/wireless/zydas/zd1201.c: In function 'zd1201_get_mode':
>> drivers//net/wireless/zydas/zd1201.c:1016:2: warning: 'porttype' may be used uninitialized in this function [-Wmaybe-uninitialized]
switch(porttype) {
^~~~~~
drivers//net/wireless/zydas/zd1201.c: In function 'zd1201_get_rate':
>> drivers//net/wireless/zydas/zd1201.c:1282:2: warning: 'rate' may be used uninitialized in this function [-Wmaybe-uninitialized]
switch(rate) {
^~~~~~
drivers//net/wireless/zydas/zd1201.c: In function 'zd1201_get_rts':
>> drivers//net/wireless/zydas/zd1201.c:1334:13: warning: 'rtst' may be used uninitialized in this function [-Wmaybe-uninitialized]
rts->value = rtst;
~~~~~~~~~~~^~~~~~
drivers//net/wireless/zydas/zd1201.c: In function 'zd1201_get_frag':
>> drivers//net/wireless/zydas/zd1201.c:1372:14: warning: 'fragt' may be used uninitialized in this function [-Wmaybe-uninitialized]
frag->value = fragt;
~~~~~~~~~~~~^~~~~~~
drivers//net/wireless/zydas/zd1201.c: In function 'zd1201_set_power':
>> drivers//net/wireless/zydas/zd1201.c:1503:28: warning: 'duration' may be used uninitialized in this function [-Wmaybe-uninitialized]
level = vwrq->value * 4 / duration;
~~~~~~~~~~~~~~~~^~~~~~~~~~
drivers//net/wireless/zydas/zd1201.c: In function 'zd1201_get_power':
drivers//net/wireless/zydas/zd1201.c:1542:27: warning: 'duration' may be used uninitialized in this function [-Wmaybe-uninitialized]
vwrq->value = duration * level / 4;
~~~~~~~~~^~~~~~~
>> drivers//net/wireless/zydas/zd1201.c:1547:15: warning: 'level' may be used uninitialized in this function [-Wmaybe-uninitialized]
if (enabled && level)
~~~~~~~~^~~~~~~~
>> drivers//net/wireless/zydas/zd1201.c:1547:6: warning: 'enabled' may be used uninitialized in this function [-Wmaybe-uninitialized]
if (enabled && level)
^
drivers//net/wireless/zydas/zd1201.c: In function 'zd1201_get_hostauth':
>> drivers//net/wireless/zydas/zd1201.c:1631:13: warning: 'hostauth' may be used uninitialized in this function [-Wmaybe-uninitialized]
rrq->value = hostauth;
~~~~~~~~~~~^~~~~~~~~~
drivers//net/wireless/zydas/zd1201.c: In function 'zd1201_get_maxassoc':
>> drivers//net/wireless/zydas/zd1201.c:1681:13: warning: 'maxassoc' may be used uninitialized in this function [-Wmaybe-uninitialized]
rrq->value = maxassoc;
~~~~~~~~~~~^~~~~~~~~~
--
drivers/rtc/rtc-da9052.c: In function 'da9052_read_alarm':
>> drivers/rtc/rtc-da9052.c:25:3: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
dev_err(rtc->da9052->dev, "%s: " fmt, __func__, ##__VA_ARGS__)
^~~~~~~
In file included from drivers/rtc/rtc-da9052.c:21:0:
include/linux/mfd/da9052/da9052.h:157:6: note: 'ret' was declared here
int ret;
^~~
>> drivers/rtc/rtc-da9052.c:25:3: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
dev_err(rtc->da9052->dev, "%s: " fmt, __func__, ##__VA_ARGS__)
^~~~~~~
In file included from drivers/rtc/rtc-da9052.c:21:0:
include/linux/mfd/da9052/da9052.h:157:6: note: 'ret' was declared here
int ret;
^~~
drivers/rtc/rtc-da9052.c: In function 'da9052_rtc_read_time':
>> drivers/rtc/rtc-da9052.c:25:3: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
dev_err(rtc->da9052->dev, "%s: " fmt, __func__, ##__VA_ARGS__)
^~~~~~~
In file included from drivers/rtc/rtc-da9052.c:21:0:
include/linux/mfd/da9052/da9052.h:157:6: note: 'ret' was declared here
int ret;
^~~
>> drivers/rtc/rtc-da9052.c:25:3: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
dev_err(rtc->da9052->dev, "%s: " fmt, __func__, ##__VA_ARGS__)
^~~~~~~
In file included from drivers/rtc/rtc-da9052.c:21:0:
include/linux/mfd/da9052/da9052.h:157:6: note: 'ret' was declared here
int ret;
^~~
--
net/bluetooth/mgmt.c: In function 'read_local_oob_ext_data_complete':
>> net/bluetooth/mgmt.c:5669:27: warning: 'r256' may be used uninitialized in this function [-Wmaybe-uninitialized]
u8 *h192, *r192, *h256, *r256;
^~~~
--
In file included from drivers//net/wireless/zydas/zd1211rw/zd_usb.c:28:0:
drivers//net/wireless/zydas/zd1211rw/zd_usb.c: In function 'eject_installer':
>> include/linux/usb.h:1922:23: warning: 'bulk_out_ep' may be used uninitialized in this function [-Wmaybe-uninitialized]
((PIPE_BULK << 30) | __create_pipe(dev, endpoint))
^~~~~~~~~~~~~
drivers//net/wireless/zydas/zd1211rw/zd_usb.c:1278:5: note: 'bulk_out_ep' was declared here
u8 bulk_out_ep;
^~~~~~~~~~~
--
drivers/slimbus/messaging.c: In function 'slim_do_transfer':
>> drivers/slimbus/messaging.c:126:4: warning: 'tid' may be used uninitialized in this function [-Wmaybe-uninitialized]
idr_remove(&ctrl->tid_idr, tid);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
drivers//staging/comedi/drivers/serial2002.c: In function 'serial2002_setup_subdevs':
>> drivers//staging/comedi/drivers/serial2002.c:497:7: warning: 'cfg' may be used uninitialized in this function [-Wmaybe-uninitialized]
if (serial2002_setup_subdevice(s, cfg, range, mapping, kind))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
In file included from drivers/net/wireless/zydas/zd1211rw/zd_usb.c:28:0:
drivers/net/wireless/zydas/zd1211rw/zd_usb.c: In function 'eject_installer':
>> include/linux/usb.h:1922:23: warning: 'bulk_out_ep' may be used uninitialized in this function [-Wmaybe-uninitialized]
((PIPE_BULK << 30) | __create_pipe(dev, endpoint))
^~~~~~~~~~~~~
drivers/net/wireless/zydas/zd1211rw/zd_usb.c:1278:5: note: 'bulk_out_ep' was declared here
u8 bulk_out_ep;
^~~~~~~~~~~
--
drivers//regulator/max8925-regulator.c: In function 'max8925_regulator_probe':
>> drivers//regulator/max8925-regulator.c:315:3: warning: 'ri' may be used uninitialized in this function [-Wmaybe-uninitialized]
dev_err(&pdev->dev, "failed to register regulator %s\n",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ri->desc.name);
~~~~~~~~~~~~~~
--
drivers//bcma/sprom.c: In function 'bcma_sprom_get':
>> drivers//bcma/sprom.c:642:3: warning: 'sprom' may be used uninitialized in this function [-Wmaybe-uninitialized]
kfree(sprom);
^~~~~~~~~~~~
--
drivers//block/rbd.c: In function 'rbd_v2_snap_id_by_name':
>> drivers//block/rbd.c:4797:25: warning: 'snap_id' may be used uninitialized in this function [-Wmaybe-uninitialized]
return found ? snap_id : CEPH_NOSNAP;
drivers//block/rbd.c: In function 'rbd_dev_image_id':
>> drivers//block/rbd.c:5349:27: warning: 'image_id' may be used uninitialized in this function [-Wmaybe-uninitialized]
rbd_dev->spec->image_id = image_id;
~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
--
drivers//firmware/qemu_fw_cfg.c: In function 'fw_cfg_build_symlink':
>> drivers//firmware/qemu_fw_cfg.c:557:9: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
return ret;
^~~
..
vim +/seq +33 include/linux/compiler.h
1f0d69a9 Steven Rostedt 2008-11-12 22
d45ae1f7 Steven Rostedt (VMware 2017-01-17 23) #define __branch_check__(x, expect, is_constant) ({ \
1f0d69a9 Steven Rostedt 2008-11-12 24 int ______r; \
134e6a03 Steven Rostedt (VMware 2017-01-19 25) static struct ftrace_likely_data \
1f0d69a9 Steven Rostedt 2008-11-12 26 __attribute__((__aligned__(4))) \
45b79749 Steven Rostedt 2008-11-21 27 __attribute__((section("_ftrace_annotated_branch"))) \
1f0d69a9 Steven Rostedt 2008-11-12 28 ______f = { \
134e6a03 Steven Rostedt (VMware 2017-01-19 29) .data.func = __func__, \
134e6a03 Steven Rostedt (VMware 2017-01-19 30) .data.file = __FILE__, \
134e6a03 Steven Rostedt (VMware 2017-01-19 31) .data.line = __LINE__, \
1f0d69a9 Steven Rostedt 2008-11-12 32 }; \
d45ae1f7 Steven Rostedt (VMware 2017-01-17 @33) ______r = __builtin_expect(!!(x), expect); \
d45ae1f7 Steven Rostedt (VMware 2017-01-17 34) ftrace_likely_update(&______f, ______r, \
d45ae1f7 Steven Rostedt (VMware 2017-01-17 35) expect, is_constant); \
1f0d69a9 Steven Rostedt 2008-11-12 36 ______r; \
1f0d69a9 Steven Rostedt 2008-11-12 37 })
1f0d69a9 Steven Rostedt 2008-11-12 38
:::::: The code at line 33 was first introduced by commit
:::::: d45ae1f7041ac52ade6c5ec76d96bbed765d67aa tracing: Process constants for (un)likely() profiler
:::::: TO: Steven Rostedt (VMware) <rostedt@goodmis.org>
:::::: CC: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 35922 bytes --]
next prev parent reply other threads:[~2018-05-10 21:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-09 8:43 [PATCH v4 0/4] kernel hacking: GCC optimization for better debug experience (-Og) changbin.du
2018-05-09 8:43 ` [PATCH v4 1/4] x86/mm: surround level4_kernel_pgt with #ifdef CONFIG_X86_5LEVEL...#endif changbin.du
2018-05-09 8:43 ` [PATCH v4 2/4] kernel hacking: new config NO_AUTO_INLINE to disable compiler auto-inline optimizations changbin.du
2018-05-09 18:29 ` kbuild test robot
2018-05-09 20:04 ` kbuild test robot
2018-05-09 8:43 ` [PATCH v4 3/4] kernel hacking: new config CC_OPTIMIZE_FOR_DEBUGGING to apply GCC -Og optimization changbin.du
2018-05-10 20:59 ` kbuild test robot [this message]
2018-05-11 3:18 ` kbuild test robot
2018-05-09 8:43 ` [PATCH v4 4/4] asm-generic: fix build error in fix_to_virt with CONFIG_CC_OPTIMIZE_FOR_DEBUGGING changbin.du
2018-05-09 12:52 ` Steven Rostedt
2018-05-10 12:29 ` Du, Changbin
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=201805110234.FUlJejFr%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=broonie@kernel.org \
--cc=changbin.du@intel.com \
--cc=kbuild-all@01.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.lkml@markovi.net \
--cc=mingo@redhat.com \
--cc=rdunlap@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=yamada.masahiro@socionext.com \
--subject='Re: [PATCH v4 3/4] kernel hacking: new config CC_OPTIMIZE_FOR_DEBUGGING to apply GCC -Og optimization' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).