From: David Brown <davidb@codeaurora.org>
To: arm@kernel.org
Cc: Josh Cartwright <joshc@codeaurora.org>,
linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
David Brown <davidb@codeaurora.org>
Subject: [PATCH 1/7] ARM: msm: trout: fix uninit var warning
Date: Fri, 20 Dec 2013 11:09:14 -0800 [thread overview]
Message-ID: <1387566560-23948-2-git-send-email-davidb@codeaurora.org> (raw)
In-Reply-To: <1387566560-23948-1-git-send-email-davidb@codeaurora.org>
From: Josh Cartwright <joshc@codeaurora.org>
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 <joshc@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
---
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 <linux/kernel.h>
#include <linux/init.h>
@@ -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 = {
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
WARNING: multiple messages have this Message-ID (diff)
From: davidb@codeaurora.org (David Brown)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/7] ARM: msm: trout: fix uninit var warning
Date: Fri, 20 Dec 2013 11:09:14 -0800 [thread overview]
Message-ID: <1387566560-23948-2-git-send-email-davidb@codeaurora.org> (raw)
In-Reply-To: <1387566560-23948-1-git-send-email-davidb@codeaurora.org>
From: Josh Cartwright <joshc@codeaurora.org>
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 <joshc@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
---
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 <linux/kernel.h>
#include <linux/init.h>
@@ -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 = {
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
next prev parent reply other threads:[~2013-12-20 19:09 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-20 19:09 [PATCH 0/7] MSM patches for 3.14 David Brown
2013-12-20 19:09 ` David Brown
2013-12-20 19:09 ` David Brown [this message]
2013-12-20 19:09 ` [PATCH 1/7] ARM: msm: trout: fix uninit var warning David Brown
2013-12-20 19:09 ` [PATCH 2/7] ARM: msm: Add support for APQ8074 Dragonboard David Brown
2013-12-20 19:09 ` David Brown
2013-12-20 20:34 ` Arnd Bergmann
2013-12-20 20:34 ` Arnd Bergmann
2013-12-21 6:21 ` Stephen Boyd
2013-12-21 6:21 ` Stephen Boyd
2013-12-20 19:09 ` [PATCH 3/7] defconfig: msm_defconfig: Enable CONFIG_ARCH_MSM8974 David Brown
2013-12-20 19:09 ` David Brown
2013-12-20 19:09 ` David Brown
2013-12-20 19:09 ` [PATCH 4/7] ARM: msm: Simplify ARCH_MSM_DT config David Brown
2013-12-20 19:09 ` David Brown
2013-12-20 19:09 ` [PATCH 5/7] ARM: dts: MSM8974: Add restart node David Brown
2013-12-20 19:09 ` David Brown
2013-12-20 19:09 ` [PATCH 6/7] ARM: dts: MSM8974: Add MMIO architected timer node David Brown
2013-12-20 19:09 ` David Brown
2013-12-20 19:09 ` [PATCH 7/7] ARM: msm_defconfig: Enable restart driver David Brown
2013-12-20 19:09 ` David Brown
2014-01-02 18:31 ` [PATCH 0/7] MSM patches for 3.14 Olof Johansson
2014-01-02 18:31 ` Olof Johansson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1387566560-23948-2-git-send-email-davidb@codeaurora.org \
--to=davidb@codeaurora.org \
--cc=arm@kernel.org \
--cc=joshc@codeaurora.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.