From patchwork Mon Feb 18 05:15:36 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 221145 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 14DCC2C007B for ; Mon, 18 Feb 2013 16:33:43 +1100 (EST) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1U7JJQ-0006m2-L0; Mon, 18 Feb 2013 05:30:48 +0000 Received: from emea01-db9-lr-249-154-199-213.outbound.messaging.microsoft.com ([213.199.154.249] helo=db9outboundpool.messaging.microsoft.com) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1U7JJN-0006lE-BB for linux-arm-kernel@lists.infradead.org; Mon, 18 Feb 2013 05:30:45 +0000 Received: from mail33-db9-R.bigfish.com (10.174.16.234) by DB9EHSOBE004.bigfish.com (10.174.14.67) with Microsoft SMTP Server id 14.1.225.23; Mon, 18 Feb 2013 05:15:32 +0000 Received: from mail33-db9 (localhost [127.0.0.1]) by mail33-db9-R.bigfish.com (Postfix) with ESMTP id 558073400D6; Mon, 18 Feb 2013 05:15:32 +0000 (UTC) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-SpamScore: 0 X-BigFish: VS0(zzc89bhzz1f42h1ee6h1de0h1202h1e76h1d1ah1d2ahzz8275dhz2dh87h2a8h668h839h93fhd24he5bhf0ah1288h12a5h12a9h12bdh137ah139eh13b6h1441h1504h1537h162dh1631h1758h1898h18e1h1946h19b5h1155h) X-FB-DOMAIN-IP-MATCH: fail Received: from mail33-db9 (localhost.localdomain [127.0.0.1]) by mail33-db9 (MessageSwitch) id 1361164530473309_2653; Mon, 18 Feb 2013 05:15:30 +0000 (UTC) Received: from DB9EHSMHS007.bigfish.com (unknown [10.174.16.250]) by mail33-db9.bigfish.com (Postfix) with ESMTP id 717333C0047; Mon, 18 Feb 2013 05:15:30 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by DB9EHSMHS007.bigfish.com (10.174.14.17) with Microsoft SMTP Server (TLS) id 14.1.225.23; Mon, 18 Feb 2013 05:15:30 +0000 Received: from az84smr01.freescale.net (10.64.34.197) by 039-SN1MMR1-005.039d.mgd.msft.net (10.84.1.17) with Microsoft SMTP Server (TLS) id 14.2.328.11; Mon, 18 Feb 2013 05:15:28 +0000 Received: from S2101-09.ap.freescale.net ([10.192.185.100]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id r1I5FO3H013496; Sun, 17 Feb 2013 22:15:25 -0700 From: Shawn Guo To: Subject: [PATCH] serial: imx: fix uninitialized variable warning Date: Mon, 18 Feb 2013 13:15:36 +0800 Message-ID: <1361164536-1351-1-git-send-email-shawn.guo@linaro.org> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 X-OriginatorOrg: sigmatel.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130218_003045_495126_08E845EE X-CRM114-Status: UNSURE ( 8.61 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 1.6 (+) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (1.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- 2.5 SUSPICIOUS_RECIPS Similar addresses in recipient list -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 1.0 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS Cc: Greg Kroah-Hartman , Thomas Gleixner , Shawn Guo , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org Commit 677fe55 (serial: imx: Fix recursive locking bug) introduces an uninitialized variable warning as below. CC drivers/tty/serial/imx.o drivers/tty/serial/imx.c: In function ‘imx_console_write’: include/linux/spinlock.h:340:2: warning: ‘flags’ may be used uninitialized in this function [-Wuninitialized] drivers/tty/serial/imx.c:1214:16: note: ‘flags’ was declared here Initialize the variable to suppress the warning. Signed-off-by: Shawn Guo Acked-by: Dirk Behme --- drivers/tty/serial/imx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index adf7611..147c9e1 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -1211,7 +1211,7 @@ imx_console_write(struct console *co, const char *s, unsigned int count) struct imx_port *sport = imx_ports[co->index]; struct imx_port_ucrs old_ucr; unsigned int ucr1; - unsigned long flags; + unsigned long flags = 0; int locked = 1; if (sport->port.sysrq)