mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <fengguang.wu@intel.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org, tipbuild@zytor.com
Subject: [tip:timers/urgent 2/4] kernel/time/tick-common.c:233:3: warning: 'next_event' may be used uninitialized in this function
Date: Sun, 25 Dec 2016 22:04:16 +0800	[thread overview]
Message-ID: <201612252211.CfBi0Pes%fengguang.wu@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 3506 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers/urgent
head:   75f62a4c59d4fce751f8ee71f87955943fd69b74
commit: 64dac5c9e0f5a933e4520f0cb689b7b143925207 [2/4] ktime: Get rid of the union
config: blackfin-BF561-EZKIT-SMP_defconfig (attached as .config)
compiler: bfin-uclinux-gcc (GCC) 6.2.0
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 64dac5c9e0f5a933e4520f0cb689b7b143925207
        # save the attached .config to linux build tree
        make.cross ARCH=blackfin 

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 >>):

   kernel/time/tick-common.c: In function 'tick_setup_device':
>> kernel/time/tick-common.c:233:3: warning: 'next_event' may be used uninitialized in this function [-Wmaybe-uninitialized]
      tick_setup_oneshot(newdev, handler, next_event);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

vim +/next_event +233 kernel/time/tick-common.c

320ab2b0b Rusty Russell     2008-12-13  217  	if (!cpumask_equal(newdev->cpumask, cpumask))
0de26520c Rusty Russell     2008-12-13  218  		irq_set_affinity(newdev->irq, cpumask);
906568c9c Thomas Gleixner   2007-02-16  219  
f8381cba0 Thomas Gleixner   2007-02-16  220  	/*
f8381cba0 Thomas Gleixner   2007-02-16  221  	 * When global broadcasting is active, check if the current
f8381cba0 Thomas Gleixner   2007-02-16  222  	 * device is registered as a placeholder for broadcast mode.
f8381cba0 Thomas Gleixner   2007-02-16  223  	 * This allows us to handle this x86 misfeature in a generic
07bd11729 Thomas Gleixner   2013-07-01  224  	 * way. This function also returns !=0 when we keep the
07bd11729 Thomas Gleixner   2013-07-01  225  	 * current active broadcast state for this CPU.
f8381cba0 Thomas Gleixner   2007-02-16  226  	 */
f8381cba0 Thomas Gleixner   2007-02-16  227  	if (tick_device_uses_broadcast(newdev, cpu))
f8381cba0 Thomas Gleixner   2007-02-16  228  		return;
f8381cba0 Thomas Gleixner   2007-02-16  229  
906568c9c Thomas Gleixner   2007-02-16  230  	if (td->mode == TICKDEV_MODE_PERIODIC)
906568c9c Thomas Gleixner   2007-02-16  231  		tick_setup_periodic(newdev, 0);
79bf2bb33 Thomas Gleixner   2007-02-16  232  	else
79bf2bb33 Thomas Gleixner   2007-02-16 @233  		tick_setup_oneshot(newdev, handler, next_event);
906568c9c Thomas Gleixner   2007-02-16  234  }
906568c9c Thomas Gleixner   2007-02-16  235  
03e13cf5e Thomas Gleixner   2013-04-25  236  void tick_install_replacement(struct clock_event_device *newdev)
03e13cf5e Thomas Gleixner   2013-04-25  237  {
22127e93c Christoph Lameter 2014-08-17  238  	struct tick_device *td = this_cpu_ptr(&tick_cpu_device);
03e13cf5e Thomas Gleixner   2013-04-25  239  	int cpu = smp_processor_id();
03e13cf5e Thomas Gleixner   2013-04-25  240  
03e13cf5e Thomas Gleixner   2013-04-25  241  	clockevents_exchange_device(td->evtdev, newdev);

:::::: The code at line 233 was first introduced by commit
:::::: 79bf2bb335b85db25d27421c798595a2fa2a0e82 [PATCH] tick-management: dyntick / highres functionality

:::::: TO: Thomas Gleixner <tglx@linutronix.de>
:::::: CC: Linus Torvalds <torvalds@woody.linux-foundation.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: 10523 bytes --]

                 reply	other threads:[~2016-12-25 14:05 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=201612252211.CfBi0Pes%fengguang.wu@intel.com \
    --to=fengguang.wu@intel.com \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=tipbuild@zytor.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome