From: nm@ti.com (Menon, Nishanth)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 2/2] arm: omap: gpmc-smsc911x: minor style fixes
Date: Tue, 26 Apr 2011 16:08:28 -0500 [thread overview]
Message-ID: <BANLkTim-cu5_-pt5VxBunjqLWiHyHuo2xg@mail.gmail.com> (raw)
In-Reply-To: <1303835156-14516-1-git-send-email-grinberg@compulab.co.il>
On Tue, Apr 26, 2011 at 11:25, Igor Grinberg <grinberg@compulab.co.il> wrote:
>
> replace "printk(KERN_ERR" by "pr_err("
> and fix needlessly multi-lined #ifdef
>
> Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Acked-by: Nishanth Menon <nm@ti.com>
Regards,
Nishanth Menon
> ---
> v2: ? ? added pr_fmt so the pr_*() calls would be cleaner (thanks Nishanth)
> ? ? ? ?Nishanth, this time it does not affect the n-o-l,
> ? ? ? ?but it is indeed cleaner
>
>
> ?arch/arm/mach-omap2/gpmc-smsc911x.c ? ? ? ? ? ? | ? 14 +++++++-------
> ?arch/arm/plat-omap/include/plat/gpmc-smsc911x.h | ? ?3 +--
> ?2 files changed, 8 insertions(+), 9 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/gpmc-smsc911x.c b/arch/arm/mach-omap2/gpmc-smsc911x.c
> index d30293a..e09374a 100644
> --- a/arch/arm/mach-omap2/gpmc-smsc911x.c
> +++ b/arch/arm/mach-omap2/gpmc-smsc911x.c
> @@ -10,6 +10,7 @@
> ?* it under the terms of the GNU General Public License version 2 as
> ?* published by the Free Software Foundation.
> ?*/
> +#define pr_fmt(fmt) "%s: " fmt, __func__
>
> ?#include <linux/kernel.h>
> ?#include <linux/platform_device.h>
> @@ -55,7 +56,7 @@ void __init gpmc_smsc911x_init(struct omap_smsc911x_platform_data *board_data)
> ? ? ? ?gpmc_cfg = board_data;
>
> ? ? ? ?if (gpmc_cs_request(gpmc_cfg->cs, SZ_16M, &cs_mem_base) < 0) {
> - ? ? ? ? ? ? ? printk(KERN_ERR "Failed to request GPMC mem for smsc911x\n");
> + ? ? ? ? ? ? ? pr_err("Failed to request GPMC mem region\n");
> ? ? ? ? ? ? ? ?return;
> ? ? ? ?}
>
> @@ -63,8 +64,7 @@ void __init gpmc_smsc911x_init(struct omap_smsc911x_platform_data *board_data)
> ? ? ? ?gpmc_smsc911x_resources[0].end = cs_mem_base + 0xff;
>
> ? ? ? ?if (gpio_request(gpmc_cfg->gpio_irq, "smsc911x irq") < 0) {
> - ? ? ? ? ? ? ? printk(KERN_ERR "Failed to request GPIO%d for smsc911x IRQ\n",
> - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? gpmc_cfg->gpio_irq);
> + ? ? ? ? ? ? ? pr_err("Failed to request IRQ GPIO%d\n", gpmc_cfg->gpio_irq);
> ? ? ? ? ? ? ? ?goto free1;
> ? ? ? ?}
>
> @@ -74,8 +74,8 @@ void __init gpmc_smsc911x_init(struct omap_smsc911x_platform_data *board_data)
> ? ? ? ?if (gpio_is_valid(gpmc_cfg->gpio_reset)) {
> ? ? ? ? ? ? ? ?ret = gpio_request(gpmc_cfg->gpio_reset, "smsc911x reset");
> ? ? ? ? ? ? ? ?if (ret) {
> - ? ? ? ? ? ? ? ? ? ? ? printk(KERN_ERR "Failed to request GPIO%d for smsc911x reset\n",
> - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? gpmc_cfg->gpio_reset);
> + ? ? ? ? ? ? ? ? ? ? ? pr_err("Failed to request reset GPIO%d\n",
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?gpmc_cfg->gpio_reset);
> ? ? ? ? ? ? ? ? ? ? ? ?goto free2;
> ? ? ? ? ? ? ? ?}
>
> @@ -92,7 +92,7 @@ void __init gpmc_smsc911x_init(struct omap_smsc911x_platform_data *board_data)
> ? ? ? ? ? ? ? ? gpmc_smsc911x_resources, ARRAY_SIZE(gpmc_smsc911x_resources),
> ? ? ? ? ? ? ? ? &gpmc_smsc911x_config, sizeof(gpmc_smsc911x_config));
> ? ? ? ?if (!pdev) {
> - ? ? ? ? ? ? ? printk(KERN_ERR "Unable to register smsc911x device\n");
> + ? ? ? ? ? ? ? pr_err("Unable to register platform device\n");
> ? ? ? ? ? ? ? ?gpio_free(gpmc_cfg->gpio_reset);
> ? ? ? ? ? ? ? ?goto free2;
> ? ? ? ?}
> @@ -104,5 +104,5 @@ free2:
> ?free1:
> ? ? ? ?gpmc_cs_free(gpmc_cfg->cs);
>
> - ? ? ? printk(KERN_ERR "Could not initialize smsc911x\n");
> + ? ? ? pr_err("Could not initialize smsc911x device\n");
> ?}
> diff --git a/arch/arm/plat-omap/include/plat/gpmc-smsc911x.h b/arch/arm/plat-omap/include/plat/gpmc-smsc911x.h
> index d3f1579..ea6c9c8 100644
> --- a/arch/arm/plat-omap/include/plat/gpmc-smsc911x.h
> +++ b/arch/arm/plat-omap/include/plat/gpmc-smsc911x.h
> @@ -21,8 +21,7 @@ struct omap_smsc911x_platform_data {
> ? ? ? ?u32 ? ? flags;
> ?};
>
> -#if defined(CONFIG_SMSC911X) || \
> - ? ? ? defined(CONFIG_SMSC911X_MODULE)
> +#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
>
> ?extern void gpmc_smsc911x_init(struct omap_smsc911x_platform_data *d);
>
> --
> 1.7.3.4
>
next prev parent reply other threads:[~2011-04-26 21:08 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-21 14:50 [PATCH 1/2] arm: omap: fix bug with multiple smsc911x devices Igor Grinberg
2011-04-21 14:50 ` [PATCH 2/2] arm: omap: gpmc-smsc911x: minor style fixes Igor Grinberg
2011-04-26 13:45 ` Menon, Nishanth
2011-04-26 14:40 ` Igor Grinberg
2011-04-26 14:49 ` Menon, Nishanth
2011-04-26 15:48 ` Igor Grinberg
2011-04-26 16:25 ` [PATCH v2 " Igor Grinberg
2011-04-26 21:08 ` Menon, Nishanth [this message]
2011-05-03 7:42 ` Tony Lindgren
2011-04-22 12:51 ` [PATCH 1/2] arm: omap: fix bug with multiple smsc911x devices Mike Rapoport
2011-04-24 8:27 ` [PATCH v2 " Igor Grinberg
2011-05-03 6:27 ` Igor Grinberg
2011-05-03 7:37 ` Tony Lindgren
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=BANLkTim-cu5_-pt5VxBunjqLWiHyHuo2xg@mail.gmail.com \
--to=nm@ti.com \
--cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).