From patchwork Fri Dec 20 19:09:14 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Brown X-Patchwork-Id: 3391111 Return-Path: X-Original-To: patchwork-linux-arm-msm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1620EC0D4A for ; Fri, 20 Dec 2013 19:11:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4BCAB206F9 for ; Fri, 20 Dec 2013 19:11:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4842C20124 for ; Fri, 20 Dec 2013 19:11:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964770Ab3LTTKo (ORCPT ); Fri, 20 Dec 2013 14:10:44 -0500 Received: from smtp.codeaurora.org ([198.145.11.231]:37414 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753543Ab3LTTJd (ORCPT ); Fri, 20 Dec 2013 14:09:33 -0500 Received: from smtp.codeaurora.org (localhost [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id E71C813EF1E; Fri, 20 Dec 2013 19:09:32 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 486) id DA82113EF2B; Fri, 20 Dec 2013 19:09:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from codeaurora.org (i-global252.qualcomm.com [199.106.103.252]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: davidb@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 6472913EF1E; Fri, 20 Dec 2013 19:09:32 +0000 (UTC) From: David Brown To: arm@kernel.org Cc: Josh Cartwright , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, David Brown Subject: [PATCH 1/7] ARM: msm: trout: fix uninit var warning Date: Fri, 20 Dec 2013 11:09:14 -0800 Message-Id: <1387566560-23948-2-git-send-email-davidb@codeaurora.org> X-Mailer: git-send-email 1.8.4.2 In-Reply-To: <1387566560-23948-1-git-send-email-davidb@codeaurora.org> References: <1387566560-23948-1-git-send-email-davidb@codeaurora.org> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Josh Cartwright Fix the following warning when !CONFIG_MMC: arch/arm/mach-msm/board-trout.c: In function 'trout_init': arch/arm/mach-msm/board-trout.c:67:6: warning: unused variable 'rc' [-Wunused-variable] int rc; ^ Also, while we're here, rework explicit printk(KERN_CRIT..) to use pr_crit. Signed-off-by: Josh Cartwright Signed-off-by: David Brown --- arch/arm/mach-msm/board-trout.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-msm/board-trout.c b/arch/arm/mach-msm/board-trout.c index ccf6621..015d544 100644 --- a/arch/arm/mach-msm/board-trout.c +++ b/arch/arm/mach-msm/board-trout.c @@ -13,6 +13,7 @@ * GNU General Public License for more details. * */ +#define pr_fmt(fmt) "%s: " fmt, __func__ #include #include @@ -68,12 +69,11 @@ static void __init trout_init(void) platform_add_devices(devices, ARRAY_SIZE(devices)); -#ifdef CONFIG_MMC - rc = trout_init_mmc(system_rev); - if (rc) - printk(KERN_CRIT "%s: MMC init failure (%d)\n", __func__, rc); -#endif - + if (IS_ENABLED(CONFIG_MMC)) { + rc = trout_init_mmc(system_rev); + if (rc) + pr_crit("MMC init failure (%d)\n", rc); + } } static struct map_desc trout_io_desc[] __initdata = {