From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754630AbcDNJD0 (ORCPT ); Thu, 14 Apr 2016 05:03:26 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:27055 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752833AbcDNJDY (ORCPT ); Thu, 14 Apr 2016 05:03:24 -0400 Date: Thu, 14 Apr 2016 12:03:09 +0300 From: Dan Carpenter To: Arnd Bergmann Cc: Tim Bird , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [patch] ARM: qcom: silence an uninitialized variable warning Message-ID: <20160414090309.GF4247@mwanda> References: <20160413064511.GG8092@mwanda> <201604140353.03595.arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201604140353.03595.arnd@arndb.de> User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: aserv0022.oracle.com [141.146.126.234] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 14, 2016 at 03:53:03AM +0200, Arnd Bergmann wrote: > On Wednesday 13 April 2016, Dan Carpenter wrote: > > It's harmless but, if "enable" isn't set, then we pass uninitialized > > values to qcom_coincell_chgr_config(). The values aren't used, but > > let's silence the warning anyway. > > > > Signed-off-by: Dan Carpenter > > I haven't seen this warning in my tests, which means it probably doesn't show up > in the usual configurations. Are you sure this doesn't just happen with > CONFIG_PROFILE_ALL_BRANCHES, CONFIG_CC_OPTIMIZE_FOR_SIZE or CONFIG_GCOV_PROFILE_ALL, > or with versions of gcc before 4.9? > This is a smatch stuff I'm working on. Realistically, I have to make Smatch warn when we pass uninitialized values to a function. I can't make smatch do the extra analysis to test if the values are used or not. regards, dan carpenter