public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: arnd@arndb•de (Arnd Bergmann)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH 1/3] ARM: at91: dt: add header to define at_hdmac configuration
Date: Fri, 31 May 2013 23:30:29 +0200	[thread overview]
Message-ID: <201305312330.29364.arnd@arndb.de> (raw)
In-Reply-To: <1369930103-11963-2-git-send-email-ludovic.desroches@atmel.com>

On Thursday 30 May 2013, ludovic.desroches at atmel.com wrote:
> +/*
> + * Source and/or destination peripheral ID
> + */
> +#define AT91_DMA_CFG_PER_ID_MASK       (0xff)
> +#define AT91_DMA_CFG_PER_ID(id)                (id & AT91_DMA_CFG_PER_ID_MASK)
> +

I'm a little worried about macros like this one spreading in the name
of readability, and I don't see this as actual value-add here:

The output of the macro is always the same as the input, and passing
an invalid number still results in an invalid output and no error message,
it actually prevents us from warning about the mistake at run-time.

The other macros are fine.

	Arnd

  reply	other threads:[~2013-05-31 21:30 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-30 16:08 [PATCH 0/3] at_hdmac: dt dma bindings update ludovic.desroches at atmel.com
2013-05-30 16:08 ` [PATCH 1/3] ARM: at91: dt: add header to define at_hdmac configuration ludovic.desroches at atmel.com
2013-05-31 21:30   ` Arnd Bergmann [this message]
2013-06-03  7:32     ` Ludovic Desroches
2013-06-04 13:17       ` Nicolas Ferre
2013-05-30 16:08 ` [PATCH 2/3] ARM: at91: dt: switch DMA DT bindings to pre-processor ludovic.desroches at atmel.com
2013-05-30 16:08 ` [PATCH 3/3] at_hdmac: add FIFO configuration parameter to DMA DT binding ludovic.desroches at atmel.com
2013-05-30 16:32   ` Nicolas Ferre
2013-05-30 16:39     ` Jean-Christophe PLAGNIOL-VILLARD
2013-05-31  9:16       ` Ludovic Desroches
2013-05-31  9:31         ` Nicolas Ferre
2013-05-31 15:11           ` Jean-Christophe PLAGNIOL-VILLARD
2013-05-31 23:11           ` Olof Johansson
2013-06-03  7:39             ` Ludovic Desroches
2013-05-30 16:37 ` [PATCH 0/3] at_hdmac: dt dma bindings update Jean-Christophe PLAGNIOL-VILLARD
2013-05-30 17:26 ` Vinod Koul
2013-05-30 20:13   ` Jean-Christophe PLAGNIOL-VILLARD
2013-05-31  8:04     ` 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=201305312330.29364.arnd@arndb.de \
    --to=arnd@arndb$(echo .)de \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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