From: rmallon@gmail.com (Ryan Mallon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 11/21] ARM: at91/PMC: move assignment out of printf
Date: Fri, 24 Feb 2012 08:50:44 +1100 [thread overview]
Message-ID: <4F46B4B4.3050707@gmail.com> (raw)
In-Reply-To: <940192e3c651eb6b97b42cb4c28e9e8471675cd2.1330006537.git.nicolas.ferre@atmel.com>
On 24/02/12 01:25, Nicolas Ferre wrote:
> We move the assignment of values of register out of the
> seq_printf() calls: It is obviously more readable.
>
> Reported-by: Ryan Mallon <rmallon@gmail.com>
> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Thanks:
Acked-by: Ryan Mallon <rmallon@gmail.com>
> ---
> arch/arm/mach-at91/clock.c | 15 ++++++++++-----
> 1 files changed, 10 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arm/mach-at91/clock.c b/arch/arm/mach-at91/clock.c
> index d1b4e07..9ab8627 100644
> --- a/arch/arm/mach-at91/clock.c
> +++ b/arch/arm/mach-at91/clock.c
> @@ -432,19 +432,24 @@ static int at91_clk_show(struct seq_file *s, void *unused)
> u32 scsr, pcsr, uckr = 0, sr;
> struct clk *clk;
>
> - seq_printf(s, "SCSR = %8x\n", scsr = at91_sys_read(AT91_PMC_SCSR));
> - seq_printf(s, "PCSR = %8x\n", pcsr = at91_sys_read(AT91_PMC_PCSR));
> + scsr = at91_sys_read(AT91_PMC_SCSR);
> + pcsr = at91_sys_read(AT91_PMC_PCSR);
> + sr = at91_sys_read(AT91_PMC_SR);
> + seq_printf(s, "SCSR = %8x\n", scsr);
> + seq_printf(s, "PCSR = %8x\n", pcsr);
> seq_printf(s, "MOR = %8x\n", at91_sys_read(AT91_CKGR_MOR));
> seq_printf(s, "MCFR = %8x\n", at91_sys_read(AT91_CKGR_MCFR));
> seq_printf(s, "PLLA = %8x\n", at91_sys_read(AT91_CKGR_PLLAR));
> if (cpu_has_pllb())
> seq_printf(s, "PLLB = %8x\n", at91_sys_read(AT91_CKGR_PLLBR));
> - if (cpu_has_utmi())
> - seq_printf(s, "UCKR = %8x\n", uckr = at91_sys_read(AT91_CKGR_UCKR));
> + if (cpu_has_utmi()) {
> + uckr = at91_sys_read(AT91_CKGR_UCKR);
> + seq_printf(s, "UCKR = %8x\n", uckr);
> + }
> seq_printf(s, "MCKR = %8x\n", at91_sys_read(AT91_PMC_MCKR));
> if (cpu_has_upll())
> seq_printf(s, "USB = %8x\n", at91_sys_read(AT91_PMC_USB));
> - seq_printf(s, "SR = %8x\n", sr = at91_sys_read(AT91_PMC_SR));
> + seq_printf(s, "SR = %8x\n", sr);
>
> seq_printf(s, "\n");
>
WARNING: multiple messages have this Message-ID (diff)
From: Ryan Mallon <rmallon@gmail.com>
To: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: plagnioj@jcrosoft.com, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux@arm.linux.org.uk,
arnd@arndb.de
Subject: Re: [PATCH v3 11/21] ARM: at91/PMC: move assignment out of printf
Date: Fri, 24 Feb 2012 08:50:44 +1100 [thread overview]
Message-ID: <4F46B4B4.3050707@gmail.com> (raw)
In-Reply-To: <940192e3c651eb6b97b42cb4c28e9e8471675cd2.1330006537.git.nicolas.ferre@atmel.com>
On 24/02/12 01:25, Nicolas Ferre wrote:
> We move the assignment of values of register out of the
> seq_printf() calls: It is obviously more readable.
>
> Reported-by: Ryan Mallon <rmallon@gmail.com>
> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Thanks:
Acked-by: Ryan Mallon <rmallon@gmail.com>
> ---
> arch/arm/mach-at91/clock.c | 15 ++++++++++-----
> 1 files changed, 10 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arm/mach-at91/clock.c b/arch/arm/mach-at91/clock.c
> index d1b4e07..9ab8627 100644
> --- a/arch/arm/mach-at91/clock.c
> +++ b/arch/arm/mach-at91/clock.c
> @@ -432,19 +432,24 @@ static int at91_clk_show(struct seq_file *s, void *unused)
> u32 scsr, pcsr, uckr = 0, sr;
> struct clk *clk;
>
> - seq_printf(s, "SCSR = %8x\n", scsr = at91_sys_read(AT91_PMC_SCSR));
> - seq_printf(s, "PCSR = %8x\n", pcsr = at91_sys_read(AT91_PMC_PCSR));
> + scsr = at91_sys_read(AT91_PMC_SCSR);
> + pcsr = at91_sys_read(AT91_PMC_PCSR);
> + sr = at91_sys_read(AT91_PMC_SR);
> + seq_printf(s, "SCSR = %8x\n", scsr);
> + seq_printf(s, "PCSR = %8x\n", pcsr);
> seq_printf(s, "MOR = %8x\n", at91_sys_read(AT91_CKGR_MOR));
> seq_printf(s, "MCFR = %8x\n", at91_sys_read(AT91_CKGR_MCFR));
> seq_printf(s, "PLLA = %8x\n", at91_sys_read(AT91_CKGR_PLLAR));
> if (cpu_has_pllb())
> seq_printf(s, "PLLB = %8x\n", at91_sys_read(AT91_CKGR_PLLBR));
> - if (cpu_has_utmi())
> - seq_printf(s, "UCKR = %8x\n", uckr = at91_sys_read(AT91_CKGR_UCKR));
> + if (cpu_has_utmi()) {
> + uckr = at91_sys_read(AT91_CKGR_UCKR);
> + seq_printf(s, "UCKR = %8x\n", uckr);
> + }
> seq_printf(s, "MCKR = %8x\n", at91_sys_read(AT91_PMC_MCKR));
> if (cpu_has_upll())
> seq_printf(s, "USB = %8x\n", at91_sys_read(AT91_PMC_USB));
> - seq_printf(s, "SR = %8x\n", sr = at91_sys_read(AT91_PMC_SR));
> + seq_printf(s, "SR = %8x\n", sr);
>
> seq_printf(s, "\n");
>
next prev parent reply other threads:[~2012-02-23 21:50 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-23 14:25 [PATCH v3 00/21] at91 first cleanup series for 3.4 Nicolas Ferre
2012-02-23 14:25 ` Nicolas Ferre
2012-02-23 14:25 ` [PATCH v3 01/21] ARM: at91: factorise duplicated at91sam9 idle Nicolas Ferre
2012-02-23 14:25 ` Nicolas Ferre
2012-02-23 14:25 ` [PATCH v3 02/21] ARM: at91/at91x40: remove use of at91_sys_read/write Nicolas Ferre
2012-02-23 14:25 ` Nicolas Ferre
2012-02-23 14:25 ` [PATCH v3 03/21] ARM: at91: make matrix register base soc independent Nicolas Ferre
2012-02-23 14:25 ` Nicolas Ferre
2012-02-23 14:25 ` [PATCH v3 04/21] ARM: at91: make ST (System Timer) " Nicolas Ferre
2012-02-23 14:25 ` Nicolas Ferre
2012-02-23 14:25 ` [PATCH v3 05/21] ARM: at91/ST: remove not needed casts Nicolas Ferre
2012-02-23 14:25 ` Nicolas Ferre
2012-02-23 14:25 ` [PATCH v3 06/21] ARM: at91/pm_slowclock: rename register to named define Nicolas Ferre
2012-02-23 14:25 ` Nicolas Ferre
2012-02-23 14:25 ` [PATCH v3 07/21] ARM: at91/pm_slowclock: function slow_clock() accepts parameters Nicolas Ferre
2012-02-23 14:25 ` Nicolas Ferre
2012-02-23 14:25 ` [PATCH v3 08/21] ARM: at91: move at91rm9200 sdramc defines to at91rm9200_sdramc.h Nicolas Ferre
2012-02-23 14:25 ` Nicolas Ferre
2012-02-23 14:25 ` [PATCH v3 09/21] ARM: at91: make sdram/ddr register base soc independent Nicolas Ferre
2012-02-23 14:25 ` Nicolas Ferre
2012-02-23 14:25 ` [PATCH v3 10/21] ARM: at91/pm_slowclock: add runtime detection of memory contoller Nicolas Ferre
2012-02-23 14:25 ` Nicolas Ferre
2012-02-23 14:25 ` [PATCH v3 11/21] ARM: at91/PMC: move assignment out of printf Nicolas Ferre
2012-02-23 14:25 ` Nicolas Ferre
2012-02-23 21:50 ` Ryan Mallon [this message]
2012-02-23 21:50 ` Ryan Mallon
2012-02-23 14:25 ` [PATCH v3 12/21] ARM: at91/PMC: make register base soc independent Nicolas Ferre
2012-02-23 14:25 ` Nicolas Ferre
2012-02-23 14:25 ` [PATCH v3 13/21] ARM: at91/rtc-at91sam9: each SoC can select the RTT device to use Nicolas Ferre
2012-02-23 14:25 ` Nicolas Ferre
2012-02-23 14:25 ` [PATCH v3 14/21] ARM: at91:rtc/rtc-at91sam9: ioremap register bank Nicolas Ferre
2012-02-23 14:25 ` Nicolas Ferre
2012-02-23 14:25 ` [PATCH v3 15/21] ARM: at91/rtc-at91sam9: pass the GPBR to use via resources Nicolas Ferre
2012-02-23 14:25 ` Nicolas Ferre
2012-02-23 14:26 ` [PATCH v3 16/21] ARM: at91: finally drop at91_sys_read/write Nicolas Ferre
2012-02-23 14:26 ` Nicolas Ferre
2012-02-23 21:48 ` Ryan Mallon
2012-02-23 21:48 ` Ryan Mallon
2012-02-23 14:26 ` [PATCH v3 17/21] ARM: at91: merge SRAM Memory banks thanks to mirroring Nicolas Ferre
2012-02-23 14:26 ` Nicolas Ferre
2012-02-23 21:47 ` Ryan Mallon
2012-02-23 21:47 ` Ryan Mallon
2012-02-24 16:54 ` Jean-Christophe PLAGNIOL-VILLARD
2012-02-24 16:54 ` Jean-Christophe PLAGNIOL-VILLARD
2012-02-26 22:45 ` Ryan Mallon
2012-02-26 22:45 ` Ryan Mallon
2012-02-23 14:26 ` [PATCH v3 18/21] Atmel: move console default platform_device to serial driver Nicolas Ferre
2012-02-23 14:26 ` Nicolas Ferre
2012-02-23 14:26 ` [PATCH v3 19/21] ARM: at91/board-dt: drop default console Nicolas Ferre
2012-02-23 14:26 ` Nicolas Ferre
2012-02-23 14:26 ` [PATCH v3 20/21] ARM: at91: add at91sam9g25ek.dts in Makefile.boot Nicolas Ferre
2012-02-23 14:26 ` Nicolas Ferre
2012-02-23 14:26 ` [PATCH v3 21/21] ARM: at91: properly sort dtb files " Nicolas Ferre
2012-02-23 14:26 ` Nicolas Ferre
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=4F46B4B4.3050707@gmail.com \
--to=rmallon@gmail.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 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.