linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH] ARM: shmobile: r8a7778: add SSIx DMAEngine support
Date: Wed, 11 Dec 2013 16:52:54 +0000	[thread overview]
Message-ID: <52A89866.8020502@cogentembedded.com> (raw)
In-Reply-To: <87r49ubr9m.wl%kuninori.morimoto.gx@renesas.com>

Hello.

On 11-12-2013 5:40, Simon Horman wrote:

>> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
[...]

>> diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c
>> index 81701cf..e786338 100644
>> --- a/arch/arm/mach-shmobile/setup-r8a7778.c
>> +++ b/arch/arm/mach-shmobile/setup-r8a7778.c
>> @@ -319,6 +319,29 @@ void __init r8a7778_add_dt_devices(void)
>>   #define HPB_DMAE_ASYNCMDR_ASMD21_SINGLE	BIT(1)	/* SDHI0 */
>>   #define HPB_DMAE_ASYNCMDR_ASMD21_MULTI	0	/* SDHI0 */
>>
>> +#define HPBDMA_SSI(_id)				\
>> +{						\
>> +	.id	= HPBDMA_SLAVE_SSI## _id ##_TX,	\
>> +	.addr	= 0xffd91008 + (_id * 0x40),	\
>> +	.dcr	= HPB_DMAE_DCR_CT |		\
>> +		  HPB_DMAE_DCR_DIP |		\
>> +		  HPB_DMAE_DCR_SPDS_32BIT |	\
>> +		  HPB_DMAE_DCR_DMDL |		\
>> +		  HPB_DMAE_DCR_DPDS_32BIT,	\
>> +	.port   = _id + (_id << 8),		\
>> +	.dma_ch = (28 + _id),			\
>> +}, {						\
>> +	.id	= HPBDMA_SLAVE_SSI## _id ##_RX,	\
>> +	.addr	= 0xffd9100c + (_id * 0x40),	\
>> +	.dcr	= HPB_DMAE_DCR_CT |		\
>> +		  HPB_DMAE_DCR_DIP |		\
>> +		  HPB_DMAE_DCR_SMDL |		\
>> +		  HPB_DMAE_DCR_SPDS_32BIT |	\
>> +		  HPB_DMAE_DCR_DPDS_32BIT,	\
>> +	.port   = _id + (_id << 8),		\
>> +	.dma_ch = (28 + _id),			\
>> +}
>> +

> Unfortunately checkpatch seems unhappy about this.
> I think it wants you to surround _id with () inside the macro.

    No, it wants one to enclose the whole macro body in () in this case (which 
would be wrong). You're right about enclosing '_id' into parens,

> Could you fix it up?

> ERROR: Macros with complex values should be enclosed in parenthesis
> #99: FILE: arch/arm/mach-shmobile/setup-r8a7778.c:322:
> +#define HPBDMA_SSI(_id)				\
> +{						\
> +	.id	= HPBDMA_SLAVE_SSI## _id ##_TX,	\
> +	.addr	= 0xffd91008 + (_id * 0x40),	\
> +	.dcr	= HPB_DMAE_DCR_CT |		\
> +		  HPB_DMAE_DCR_DIP |		\
> +		  HPB_DMAE_DCR_SPDS_32BIT |	\
> +		  HPB_DMAE_DCR_DMDL |		\
> +		  HPB_DMAE_DCR_DPDS_32BIT,	\
> +	.port   = _id + (_id << 8),		\
> +	.dma_ch = (28 + _id),			\
> +}, {						\
> +	.id	= HPBDMA_SLAVE_SSI## _id ##_RX,	\
> +	.addr	= 0xffd9100c + (_id * 0x40),	\
> +	.dcr	= HPB_DMAE_DCR_CT |		\
> +		  HPB_DMAE_DCR_DIP |		\
> +		  HPB_DMAE_DCR_SMDL |		\
> +		  HPB_DMAE_DCR_SPDS_32BIT |	\
> +		  HPB_DMAE_DCR_DPDS_32BIT,	\
> +	.port   = _id + (_id << 8),		\
> +	.dma_ch = (28 + _id),			\
> +}

> total: 1 errors, 0 warnings, 109 lines checked

WBR, Sergei


      parent reply	other threads:[~2013-12-11 16:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-03  2:12 [PATCH] ARM: shmobile: r8a7778: add SSIx DMAEngine support Kuninori Morimoto
2013-12-05  3:15 ` Simon Horman
2013-12-11  0:35 ` Kuninori Morimoto
2013-12-11  0:48 ` Simon Horman
2013-12-11  1:40 ` Simon Horman
2013-12-11  3:21 ` Kuninori Morimoto
2013-12-11  3:43 ` Simon Horman
2013-12-11 16:52 ` Sergei Shtylyov [this message]

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=52A89866.8020502@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=linux-sh@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 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).