Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754401AbYJAIfy (ORCPT ); Wed, 1 Oct 2008 04:35:54 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752085AbYJAIfq (ORCPT ); Wed, 1 Oct 2008 04:35:46 -0400 Received: from mx2.mail.elte.hu ([157.181.151.9]:51883 "EHLO mx2.mail.elte.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752759AbYJAIfp (ORCPT ); Wed, 1 Oct 2008 04:35:45 -0400 Date: Wed, 1 Oct 2008 10:35:32 +0200 From: Ingo Molnar To: Steven Noonan Cc: linux-kernel@vger.kernel.org, drzeus@drzeus.cx Subject: Re: [PATCH -tip] sdhci: 'scratch' may be used uninitialized Message-ID: <20081001083532.GE31009@elte.hu> References: <20081001080048.GB25832@elte.hu> <1222848842-10798-1-git-send-email-steven@uplinklabs.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) X-ELTE-VirusStatus: clean X-ELTE-SpamScore: -1.5 X-ELTE-SpamLevel: X-ELTE-SpamCheck: no X-ELTE-SpamVersion: ELTE 2.0 X-ELTE-SpamCheck-Details: score=-1.5 required=5.9 tests=BAYES_00 autolearn=no SpamAssassin version=3.2.3 -1.5 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0007] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1212 Lines: 28 * Steven Noonan wrote: > On Wed, Oct 1, 2008 at 1:14 AM, Steven Noonan wrote: > > - u32 scratch; > > + u32 uninitialized_var(scratch); > > A bit of a further explanation: > > The variable 'scratch' is always initialized before it's used. The > conditional which is responsible for initialization of 'scratch' will > always evaluate 'true' when the first loop iteration occurs, and thus, > it's properly initialized. GCC doesn't see this, of course, so using > the uninitialized_var() macro seems to work for silencing this case. another small workflow suggestion: when you add explanation for the changelog it's better to just include the updated patch (dont worry about the duplication) - that way maintainers dont have to cut&slice the patch and the description toghether. [which is not just a matter of wasting time, but if you do tons of patch juggling, it becomes a real risk factor.] Ingo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/