All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jisheng Zhang <jszhang@marvell.com>
To: kbuild test robot <lkp@intel.com>,
	vireshk@kernel.org, nm@ti.com, sboyd@codeaurora.org,
	rjw@rjwysocki.net, gregkh@linuxfoundation.org,
	Arnd Bergmann <arnd@arndb.de>
Cc: kbuild-all@01.org, linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] PM / OPP: optimize dev_pm_opp_set_rate() a bit
Date: Mon, 25 Jul 2016 14:05:11 +0800	[thread overview]
Message-ID: <20160725140511.1639552d@xhacker> (raw)
In-Reply-To: <20160725131947.644e6166@xhacker>

On Mon, 25 Jul 2016 13:19:47 +0800 Jisheng Zhang wrote:

> Dear all,
> 
> On Fri, 22 Jul 2016 22:30:53 +0800 kbuild test robot wrote:
> 
> > Hi,
> > 
> > [auto build test WARNING on pm/linux-next]
> > [also build test WARNING on v4.7-rc7 next-20160722]
> > [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/Jisheng-Zhang/PM-OPP-optimize-dev_pm_opp_set_rate-a-bit/20160722-205339
> > base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
> > config: x86_64-allmodconfig (attached as .config)
> > compiler: gcc-6 (Debian 6.1.1-9) 6.1.1 20160705
> > 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/base/power/opp/core.c: In function 'dev_pm_opp_set_rate':  
> > >> drivers/base/power/opp/core.c:666:3: warning: 'ou_volt_max' may be used uninitialized in this function [-Wmaybe-uninitialized]    
> >       _set_opp_voltage(dev, reg, ou_volt, ou_volt_min, ou_volt_max);
> >       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
> > >> drivers/base/power/opp/core.c:666:3: warning: 'ou_volt_min' may be used uninitialized in this function [-Wmaybe-uninitialized]
> > >> drivers/base/power/opp/core.c:666:3: warning: 'ou_volt' may be used uninitialized in this function [-Wmaybe-uninitialized]    
> 
> These warnings seem weired. We only use them when !IS_ERR(old_opp), and we
> should already set them if !IS_ERR(old_opp). Another weired thing is if
> we add something, printk e.g in _find_freq_ceil(), then these warnings disappear

Hmm, it looks that gcc will inline _find_freq_ceil(), then gcc can't
detect that ou_volt* are already set. Mark _find_freq_ceil() noinline would fix
the warnings

Thanks,
Jisheng

> 
> Could you please kindly give some suggestions about how to fix these warnings?
> 

WARNING: multiple messages have this Message-ID (diff)
From: jszhang@marvell.com (Jisheng Zhang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] PM / OPP: optimize dev_pm_opp_set_rate() a bit
Date: Mon, 25 Jul 2016 14:05:11 +0800	[thread overview]
Message-ID: <20160725140511.1639552d@xhacker> (raw)
In-Reply-To: <20160725131947.644e6166@xhacker>

On Mon, 25 Jul 2016 13:19:47 +0800 Jisheng Zhang wrote:

> Dear all,
> 
> On Fri, 22 Jul 2016 22:30:53 +0800 kbuild test robot wrote:
> 
> > Hi,
> > 
> > [auto build test WARNING on pm/linux-next]
> > [also build test WARNING on v4.7-rc7 next-20160722]
> > [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/Jisheng-Zhang/PM-OPP-optimize-dev_pm_opp_set_rate-a-bit/20160722-205339
> > base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
> > config: x86_64-allmodconfig (attached as .config)
> > compiler: gcc-6 (Debian 6.1.1-9) 6.1.1 20160705
> > 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/base/power/opp/core.c: In function 'dev_pm_opp_set_rate':  
> > >> drivers/base/power/opp/core.c:666:3: warning: 'ou_volt_max' may be used uninitialized in this function [-Wmaybe-uninitialized]    
> >       _set_opp_voltage(dev, reg, ou_volt, ou_volt_min, ou_volt_max);
> >       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
> > >> drivers/base/power/opp/core.c:666:3: warning: 'ou_volt_min' may be used uninitialized in this function [-Wmaybe-uninitialized]
> > >> drivers/base/power/opp/core.c:666:3: warning: 'ou_volt' may be used uninitialized in this function [-Wmaybe-uninitialized]    
> 
> These warnings seem weired. We only use them when !IS_ERR(old_opp), and we
> should already set them if !IS_ERR(old_opp). Another weired thing is if
> we add something, printk e.g in _find_freq_ceil(), then these warnings disappear

Hmm, it looks that gcc will inline _find_freq_ceil(), then gcc can't
detect that ou_volt* are already set. Mark _find_freq_ceil() noinline would fix
the warnings

Thanks,
Jisheng

> 
> Could you please kindly give some suggestions about how to fix these warnings?
> 

WARNING: multiple messages have this Message-ID (diff)
From: Jisheng Zhang <jszhang@marvell.com>
To: kbuild test robot <lkp@intel.com>, <vireshk@kernel.org>,
	<nm@ti.com>, <sboyd@codeaurora.org>, <rjw@rjwysocki.net>,
	<gregkh@linuxfoundation.org>, Arnd Bergmann <arnd@arndb.de>
Cc: <kbuild-all@01.org>, <linux-pm@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] PM / OPP: optimize dev_pm_opp_set_rate() a bit
Date: Mon, 25 Jul 2016 14:05:11 +0800	[thread overview]
Message-ID: <20160725140511.1639552d@xhacker> (raw)
In-Reply-To: <20160725131947.644e6166@xhacker>

On Mon, 25 Jul 2016 13:19:47 +0800 Jisheng Zhang wrote:

> Dear all,
> 
> On Fri, 22 Jul 2016 22:30:53 +0800 kbuild test robot wrote:
> 
> > Hi,
> > 
> > [auto build test WARNING on pm/linux-next]
> > [also build test WARNING on v4.7-rc7 next-20160722]
> > [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/Jisheng-Zhang/PM-OPP-optimize-dev_pm_opp_set_rate-a-bit/20160722-205339
> > base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
> > config: x86_64-allmodconfig (attached as .config)
> > compiler: gcc-6 (Debian 6.1.1-9) 6.1.1 20160705
> > 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/base/power/opp/core.c: In function 'dev_pm_opp_set_rate':  
> > >> drivers/base/power/opp/core.c:666:3: warning: 'ou_volt_max' may be used uninitialized in this function [-Wmaybe-uninitialized]    
> >       _set_opp_voltage(dev, reg, ou_volt, ou_volt_min, ou_volt_max);
> >       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
> > >> drivers/base/power/opp/core.c:666:3: warning: 'ou_volt_min' may be used uninitialized in this function [-Wmaybe-uninitialized]
> > >> drivers/base/power/opp/core.c:666:3: warning: 'ou_volt' may be used uninitialized in this function [-Wmaybe-uninitialized]    
> 
> These warnings seem weired. We only use them when !IS_ERR(old_opp), and we
> should already set them if !IS_ERR(old_opp). Another weired thing is if
> we add something, printk e.g in _find_freq_ceil(), then these warnings disappear

Hmm, it looks that gcc will inline _find_freq_ceil(), then gcc can't
detect that ou_volt* are already set. Mark _find_freq_ceil() noinline would fix
the warnings

Thanks,
Jisheng

> 
> Could you please kindly give some suggestions about how to fix these warnings?
> 

  reply	other threads:[~2016-07-25  6:05 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-22 12:42 [PATCH] PM / OPP: optimize dev_pm_opp_set_rate() a bit Jisheng Zhang
2016-07-22 12:42 ` Jisheng Zhang
2016-07-22 12:42 ` Jisheng Zhang
2016-07-22 14:30 ` kbuild test robot
2016-07-22 14:30   ` kbuild test robot
2016-07-22 14:30   ` kbuild test robot
2016-07-25  5:19   ` Jisheng Zhang
2016-07-25  5:19     ` Jisheng Zhang
2016-07-25  5:19     ` Jisheng Zhang
2016-07-25  6:05     ` Jisheng Zhang [this message]
2016-07-25  6:05       ` Jisheng Zhang
2016-07-25  6:05       ` Jisheng Zhang
2016-07-22 16:21 ` Viresh Kumar
2016-07-22 16:21   ` Viresh Kumar
2016-07-25  5:12   ` Jisheng Zhang
2016-07-25  5:12     ` Jisheng Zhang
2016-07-25  5:12     ` Jisheng Zhang

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=20160725140511.1639552d@xhacker \
    --to=jszhang@marvell.com \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=kbuild-all@01.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=nm@ti.com \
    --cc=rjw@rjwysocki.net \
    --cc=sboyd@codeaurora.org \
    --cc=vireshk@kernel.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.