linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Ohad Ben-Cohen <ohad@wizery.com>
Cc: Tony Lindgren <tony@atomide.com>,
	linux-omap@vger.kernel.org, "Anna, Suman" <s-anna@ti.com>,
	Omar Ramirez Luna <omar.ramirez@ti.com>
Subject: Re: Latest OMAP randconfig build error
Date: Wed, 22 Feb 2012 20:12:36 +0000	[thread overview]
Message-ID: <20120222201236.GA8533@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <CAK=WgbY1b4qJXNr7=KyjdqGfexrum=XpTF3QYsw=OgFzv5NQ_A@mail.gmail.com>

On Wed, Feb 22, 2012 at 09:55:56PM +0200, Ohad Ben-Cohen wrote:
> On Wed, Feb 22, 2012 at 7:58 PM, Tony Lindgren <tony@atomide.com> wrote:
> > 2430 is like omap3 for the mailbox.
> 
> Gotcha, thanks.
> 
> This one below isn't pretty, but it should satisfy all build
> permutations and still be correct hw-wise.
> 
> If it looks good to you I'll submit it properly.
> 
> diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c
> index 609ea2d..6f0f228 100644
> --- a/arch/arm/mach-omap2/mailbox.c
> +++ b/arch/arm/mach-omap2/mailbox.c
> @@ -281,8 +281,14 @@ static struct omap_mbox mbox_iva_info = {
>  	.ops	= &omap2_mbox_ops,
>  	.priv	= &omap2_mbox_iva_priv,
>  };
> +#endif
> 
> -struct omap_mbox *omap2_mboxes[] = { &mbox_dsp_info, &mbox_iva_info, NULL };
> +#if defined(CONFIG_ARCH_OMAP2)
> +struct omap_mbox *omap2_mboxes[] = { &mbox_dsp_info,
> +#if defined(CONFIG_SOC_OMAP2420)
> +					&mbox_iva_info,
> +#endif
> +					NULL };

Better would be:

+#ifdef CONFIG_ARCH_OMAP2
+struct omap_mbox *omap2_mboxes[] = {
+	&mbox_dsp_info,
+#ifdef CONFIG_SOC_OMAP2420
+	&mbox_iva_info,
+#endif
+	NULL
+};
 #endif

There's no point in typing any more than you have to with #if defined().
The only place where using #if defined() makes sense is if you want to
subsequently do #elif defined xxx because there isn't a #elifdef.
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2012-02-22 20:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-22  8:51 Latest OMAP randconfig build error Russell King - ARM Linux
2012-02-22 10:01 ` Ohad Ben-Cohen
2012-02-22 17:58   ` Tony Lindgren
2012-02-22 19:40     ` Ramirez Luna, Omar
2012-02-22 19:55     ` Ohad Ben-Cohen
2012-02-22 20:12       ` Russell King - ARM Linux [this message]
2012-02-22 20:22         ` Ohad Ben-Cohen
2012-02-22 22:56           ` Tony Lindgren
2012-02-23  8:02             ` Ohad Ben-Cohen

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=20120222201236.GA8533@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=linux-omap@vger.kernel.org \
    --cc=ohad@wizery.com \
    --cc=omar.ramirez@ti.com \
    --cc=s-anna@ti.com \
    --cc=tony@atomide.com \
    /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).