linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Cc: linuxppc-dev@ozlabs.org, paulus@samba.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ppc: pic pmacpic_find_viaint cleanup
Date: Thu, 04 Jan 2007 07:52:52 +1100	[thread overview]
Message-ID: <1167857572.6165.157.camel@localhost.localdomain> (raw)
In-Reply-To: <200701022020.04174.m.kozlowski@tuxland.pl>

On Tue, 2007-01-02 at 20:20 +0100, Mariusz Kozlowski wrote:
> Hello,
> 
> 	Litte rework to supress this warning:
> 
> arch/powerpc/platforms/powermac/pic.c: In function 'pmacpic_find_viaint':
> arch/powerpc/platforms/powermac/pic.c:625: warning: label 'not_found' defined but not used
> 
> Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>

It's actually bogus (though the old code was too) now that we have
refcounting of device-nodes. We should do an of_node_put() on the result
of of_find_node_by_name() after we are done with it.

Can you respin with that fix ?

Ben.

>  arch/powerpc/platforms/powermac/pic.c |   13 +++++--------
>  1 file changed, 5 insertions(+), 8 deletions(-)
> 
> --- linux-2.6.20-rc2-mm1-a/arch/powerpc/platforms/powermac/pic.c	2006-12-24 05:00:32.000000000 +0100
> +++ linux-2.6.20-rc2-mm1-b/arch/powerpc/platforms/powermac/pic.c	2007-01-02 16:49:05.000000000 +0100
> @@ -609,21 +609,18 @@ unsigned long sleep_save_mask[2];
>   */
>  static int pmacpic_find_viaint(void)
>  {
> -	int viaint = -1;
> -
>  #ifdef CONFIG_ADB_PMU
>  	struct device_node *np;
>  
>  	if (pmu_get_model() != PMU_OHARE_BASED)
> -		goto not_found;
> +		return -1;
>  	np = of_find_node_by_name(NULL, "via-pmu");
>  	if (np == NULL)
> -		goto not_found;
> -	viaint = irq_of_parse_and_map(np, 0);;
> +		return -1;
> +	return irq_of_parse_and_map(np, 0);
> +#else
> +	return -1;
>  #endif /* CONFIG_ADB_PMU */
> -
> -not_found:
> -	return viaint;
>  }
>  
>  static int pmacpic_suspend(struct sys_device *sysdev, pm_message_t state)
> 
> 

      reply	other threads:[~2007-01-03 20:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-02 19:20 [PATCH] ppc: pic pmacpic_find_viaint cleanup Mariusz Kozlowski
2007-01-03 20:52 ` Benjamin Herrenschmidt [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=1167857572.6165.157.camel@localhost.localdomain \
    --to=benh@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=m.kozlowski@tuxland.pl \
    --cc=paulus@samba.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).