From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751843AbcGYGJ7 (ORCPT ); Mon, 25 Jul 2016 02:09:59 -0400 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]:23474 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750844AbcGYGJ6 (ORCPT ); Mon, 25 Jul 2016 02:09:58 -0400 Date: Mon, 25 Jul 2016 14:05:11 +0800 From: Jisheng Zhang To: kbuild test robot , , , , , , Arnd Bergmann CC: , , , Subject: Re: [PATCH] PM / OPP: optimize dev_pm_opp_set_rate() a bit Message-ID: <20160725140511.1639552d@xhacker> In-Reply-To: <20160725131947.644e6166@xhacker> References: <1469191370-1285-1-git-send-email-jszhang@marvell.com> <201607222230.DZObarhu%fengguang.wu@intel.com> <20160725131947.644e6166@xhacker> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-07-25_04:,, signatures=0 X-Proofpoint-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1604210000 definitions=main-1607250080 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? >