linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: rmallon@gmail.com (Ryan Mallon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 04/18] ARM: at91: make ST (System Timer) soc independent
Date: Mon, 20 Feb 2012 14:16:48 +1100	[thread overview]
Message-ID: <4F41BB20.8000901@gmail.com> (raw)
In-Reply-To: <20120220030234.GE29599@game.jcrosoft.org>

On 20/02/12 14:02, Jean-Christophe PLAGNIOL-VILLARD wrote:

> On 12:52 Mon 20 Feb     , Ryan Mallon wrote:
>> On 20/02/12 12:38, Jean-Christophe PLAGNIOL-VILLARD wrote:
>>
>>> On 11:22 Mon 20 Feb     , Ryan Mallon wrote:
>>>> On 18/02/12 04:49, Nicolas Ferre wrote:
>>>>
>>>>> From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
>>>>>
>>>>> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
>>>>> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
>>>>> ---
>>>>>  arch/arm/mach-at91/at91rm9200.c              |    4 +-
>>>>>  arch/arm/mach-at91/at91rm9200_time.c         |   37 ++++++++++++++++----------
>>>>>  arch/arm/mach-at91/generic.h                 |    1 +
>>>>>  arch/arm/mach-at91/include/mach/at91_st.h    |   32 +++++++++++++++-------
>>>>>  arch/arm/mach-at91/include/mach/at91rm9200.h |    2 +-
>>>>>  drivers/watchdog/at91rm9200_wdt.c            |    8 +++---
>>>>>  6 files changed, 53 insertions(+), 31 deletions(-)
>>>>>
>>>>> diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c
>>>>
>>>> Hi Jean, Nicolas,
>>>>
>>>> Patch looks mostly good, couple of points below.
>>>>
>>>> ~Ryan
>>>>
>>>> <snip>
>>>>
>>>>>  	/* Cancel any pending alarm; flush any pending IRQ */
>>>>> -	at91_sys_write(AT91_ST_RTAR, alm);
>>>>> -	(void) at91_sys_read(AT91_ST_SR);
>>>>> +	at91_st_write(AT91_ST_RTAR, alm);
>>>>> +	(void) at91_st_read(AT91_ST_SR);
>>>>
>>>>
>>>> Can we please remove the (void) casting of the return value when making
>>>> this change, especially since at91_st_read is now a macro which doesn't
>>>> even have a return value. Same in a few other places.
>>> modification done by script and it's no the scope of this patch
>>
>>
>> That isn't an excuse to leave incorrect code there. It is a simple fix.
> no (void) in c means you don't care of the return so basically it's right


Because of the way the __raw_writel is defined you are casting the
result of an assignment, basically you are doing this:

   int foo, bar;

  (void)(foo = bar);

Which is pointless. Don't make excuses for silly, redundant code. Fix
it, please.

~Ryan

  reply	other threads:[~2012-02-20  3:16 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-17 17:49 [PATCH 00/18] at91 first cleanup series for 3.4 Nicolas Ferre
2012-02-17 17:49 ` [PATCH 01/18] ARM: at91: factorise duplicated at91sam9 idle Nicolas Ferre
2012-02-17 17:49 ` [PATCH 02/18] ARM: at91/at91x40: remove use of at91_sys_read/write Nicolas Ferre
2012-02-17 17:49 ` [PATCH 03/18] ARM: at91: make matrix register base soc independent Nicolas Ferre
2012-02-17 17:49 ` [PATCH 04/18] ARM: at91: make ST (System Timer) " Nicolas Ferre
2012-02-20  0:22   ` Ryan Mallon
2012-02-20  1:38     ` Jean-Christophe PLAGNIOL-VILLARD
2012-02-20  1:52       ` Ryan Mallon
2012-02-20  3:02         ` Jean-Christophe PLAGNIOL-VILLARD
2012-02-20  3:16           ` Ryan Mallon [this message]
2012-02-20  3:23             ` Jean-Christophe PLAGNIOL-VILLARD
2012-02-20  3:48               ` Ryan Mallon
2012-02-20  3:49                 ` Jean-Christophe PLAGNIOL-VILLARD
2012-02-20  7:33           ` Russell King - ARM Linux
2012-02-20  9:18             ` Jean-Christophe PLAGNIOL-VILLARD
2012-02-17 17:49 ` [PATCH 05/18] ARM: at91/pm_slowclock: rename register to named define Nicolas Ferre
2012-02-17 17:49 ` [PATCH 06/18] ARM: at91/pm_slowclock: function slow_clock() accepts parameters Nicolas Ferre
2012-02-17 17:49 ` [PATCH 07/18] ARM: at91: move at91rm9200 sdramc defines to at91rm9200_sdramc.h Nicolas Ferre
2012-02-17 17:50 ` [PATCH 08/18] ARM: at91: make sdram/ddr register base soc independent Nicolas Ferre
2012-02-17 17:50 ` [PATCH 09/18] ARM: at91/pm_slowclock: add runtime detection of memory contoller Nicolas Ferre
2012-02-17 17:50 ` [PATCH 10/18] ARM: at91/PMC: make register base soc independent Nicolas Ferre
2012-02-20  0:27   ` Ryan Mallon
2012-02-17 17:50 ` [PATCH 11/18] ARM: at91/rtc-at91sam9: each SoC can select the RTT device to use Nicolas Ferre
2012-02-20  0:32   ` Ryan Mallon
2012-02-20  1:25     ` Jean-Christophe PLAGNIOL-VILLARD
2012-02-17 17:50 ` [PATCH 12/18] ARM: at91:rtc/rtc-at91sam9: ioremap register bank Nicolas Ferre
2012-02-17 17:50 ` [PATCH 13/18] ARM: at91/rtc-at91sam9: pass the GPBR to use via ressources Nicolas Ferre
2012-02-20  0:43   ` Ryan Mallon
2012-02-20  1:20     ` Jean-Christophe PLAGNIOL-VILLARD
2012-02-20  7:36       ` Russell King - ARM Linux
2012-02-20  9:16         ` Jean-Christophe PLAGNIOL-VILLARD
2012-02-20 10:04           ` Russell King - ARM Linux
2012-02-20 11:21             ` Nicolas Ferre
2012-02-20 14:45             ` [PATCH] ARM: at91/rtc-at91sam9: rework resources assignment Nicolas Ferre
2012-02-20 15:06               ` Russell King - ARM Linux
2012-02-20 20:04               ` Ryan Mallon
2012-02-17 17:50 ` [PATCH 14/18] ARM: at91: finally drop at91_sys_read/write Nicolas Ferre
2012-02-17 17:50 ` [PATCH 15/18] ARM: at91: merge SRAM Memory banks thanks to mirroring Nicolas Ferre
2012-02-17 17:50 ` [PATCH 16/18] Atmel: move console default platform_device to serial driver Nicolas Ferre
2012-02-18  9:17   ` Hans-Christian Egtvedt
2012-02-19  7:07     ` Jean-Christophe PLAGNIOL-VILLARD
2012-02-17 17:50 ` [PATCH 17/18] ARM: at91/board-dt: drop default console Nicolas Ferre
2012-02-17 17:50 ` [PATCH 18/18] ARM: at91/board-dt: move at91_initialize() to init_irq() 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=4F41BB20.8000901@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 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).