From patchwork Tue Sep 11 01:53:14 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanho Min X-Patchwork-Id: 1434801 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id C264740220 for ; Tue, 11 Sep 2012 01:56:15 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TBFfF-00051p-1n; Tue, 11 Sep 2012 01:53:21 +0000 Received: from mail-wg0-f49.google.com ([74.125.82.49]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TBFfB-00051b-ST for linux-arm-kernel@lists.infradead.org; Tue, 11 Sep 2012 01:53:18 +0000 Received: by wgbdt14 with SMTP id dt14so1632486wgb.18 for ; Mon, 10 Sep 2012 18:53:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=wTv3WF7t+aNlZYloS8nWR+xSNjSya6SPC+4JTQc0Aw8=; b=jseEWf5s1e6zZBg4hE0QERLc7rGRIiKyhUHx98yQPA5tkF3+2j1ljSHO2+bz3fNSsv 5XF44TXBMlowzN28BIcXA1TIhJpLocmcFyw+/YhGzDbIROi0V9GudeHpStVKN7DWgQVX FWPRimwnUTw4RSs6F7R+06F1NEoql+KOm8ofzquLhxjaBD71aAqOHcZJZDAMTbWqFXzG HqgTixgKykg4Nwu5ohm075lP4QzNkFWddh8MID5XHgx63q7+t2FUHrWWCCUIJs9N7xHh lINIpYhFX3fG8kqRJ3C8Gi00m9Av9N0EkwaGbRntP0z1KwGhkFA7MeVQM9TQchqv+8yQ WUww== MIME-Version: 1.0 Received: by 10.216.194.18 with SMTP id l18mr8368746wen.132.1347328394433; Mon, 10 Sep 2012 18:53:14 -0700 (PDT) Received: by 10.194.33.165 with HTTP; Mon, 10 Sep 2012 18:53:14 -0700 (PDT) In-Reply-To: <20120910084025.GP13739@n2100.arm.linux.org.uk> References: <20120910084025.GP13739@n2100.arm.linux.org.uk> Date: Tue, 11 Sep 2012 10:53:14 +0900 Message-ID: Subject: Re: [PATCH] ARM: Fix build warning in do_alignment. From: Chanho Min To: Russell King - ARM Linux X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.5 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.82.49 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (chanho0207[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (chanho0207[at]gmail.com) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Stephen Warren , Nicolas Pitre , linux-kernel@vger.kernel.org, David Howells , H Hartley Sweeten , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org > What it's caused by is do_alignment_t32_to_handler(), and its assignment > through a pointer of this variable. You can see that this is the cause > because the patch below fixes the warning. We couldn't fix the warning with your patch. the patch below fixes it instead. IMHO, gcc can't seems to know that do_alignment_ldmstm never returns TYPE_LDST. So It just warn that do_alignment_finish_ldst is called with the uninitialized value. I know gcc is not smart enough to see all the reasons. So, It is optional. Also, I'm not sure these optional warning should be fixed. Anyway, this is the last build warning in our whole source when using gcc-4.6.3 Thanks Chanho, default: diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c index 9107231..978db1f 100644 --- a/arch/arm/mm/alignment.c +++ b/arch/arm/mm/alignment.c @@ -856,8 +856,10 @@ do_alignment(unsigned long addr, unsigned int fsr, struct pt_regs *regs) case 0x08000000: /* ldm or stm, or thumb-2 32bit instruction */ if (thumb2_32b) handler = do_alignment_t32_to_handler(&instr, regs, &offset); - else + else { + offset.un = 0; handler = do_alignment_ldmstm; + } break;