public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Omar Ramirez Luna <omar.ramirez@ti.com>
To: "Anna, Suman" <s-anna@ti.com>
Cc: "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	Tony Lindgren <tony@atomide.com>,
	"Hiroshi.DOYU@nokia.com" <Hiroshi.DOYU@nokia.com>,
	"Shilimkar, Santosh" <santosh.shilimkar@ti.com>
Subject: Re: [RESEND] [PATCH 1/5] omap2/3/4: mailbox: remove compiler warning
Date: Mon, 22 Feb 2010 17:57:10 -0600	[thread overview]
Message-ID: <4B8319D6.8080909@ti.com> (raw)
In-Reply-To: <2C1563023E232C49B9F505633D57C2DA2640F2C540@dlee04.ent.ti.com>

On 2/22/2010 5:41 PM, Anna, Suman wrote:
>  From 657358cd06a3f20bef2472945991749bacef12e6 Mon Sep 17 00:00:00 2001
> From: Suman Anna<s-anna@ti.com>
> Date: Mon, 25 Jan 2010 18:27:21 -0600
> Subject: [PATCH] omap2/3/4: mailbox: remove compiler warning
>
> Remove a compiler warning in device-specific
> mailbox module.
>
> Signed-off-by: Suman Anna<s-anna@ti.com>
> ---
>   arch/arm/mach-omap2/mailbox.c |    5 ++++-
>   1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c
> index 2c9fd1c..8b5fc2a 100644
> --- a/arch/arm/mach-omap2/mailbox.c
> +++ b/arch/arm/mach-omap2/mailbox.c
> @@ -419,8 +419,11 @@ static int __devinit omap2_mbox_probe(struct platform_device *pdev)
>   #endif
>   	return 0;
>
> +#if defined(CONFIG_ARCH_OMAP2420) /* IVA */
>   err_iva1:
> -	omap_mbox_unregister(&mbox_dsp_info);
> +	if (cpu_is_omap2420())
> +		omap_mbox_unregister(&mbox_dsp_info);
> +#endif

why not moving omap_mbox_unregister to the block containing the ifdefs? 
at least you won't be adding an ifdef and if(cpu_xx)

from mailbox.c:

> #if defined(CONFIG_ARCH_OMAP2420) /* IVA */
> 	if (cpu_is_omap2420()) {
> 		/* IVA IRQ */
> 		res = platform_get_resource(pdev, IORESOURCE_IRQ, 1);
> 		if (unlikely(!res)) {
> 			dev_err(&pdev->dev, "invalid irq resource\n");
> 			ret = -ENODEV;
> 			goto err_iva1;

this is not even needed because at this point mailbox has not been 
registered (unless i'm missing something)

> 		}
> 		mbox_iva_info.irq = res->start;
> 		ret = omap_mbox_register(&pdev->dev, &mbox_iva_info);
> 		if (ret)
> 			goto err_iva1;

this should be omap_mbox_unregister... I haven't looked to the code to 
comment if its needed to call omap_mbox_unregister when 
omap_mbox_register fails.

> 	}
> #endif

Regards,

- omar


  reply	other threads:[~2010-02-22 23:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-22 23:41 [RESEND] [PATCH 1/5] omap2/3/4: mailbox: remove compiler warning Anna, Suman
2010-02-22 23:57 ` Omar Ramirez Luna [this message]
2010-02-23  0:05   ` Omar Ramirez Luna
2010-02-23 16:12   ` Anna, Suman

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=4B8319D6.8080909@ti.com \
    --to=omar.ramirez@ti.com \
    --cc=Hiroshi.DOYU@nokia.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=s-anna@ti.com \
    --cc=santosh.shilimkar@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