All of lore.kernel.org
 help / color / mirror / Atom feed
From: Timur Tabi <timur@freescale.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: linuxppc-dev@ozlabs.org, kumar.gala@freescale.com
Subject: Re: [PATCH 2/2] powerpc/85xx: p1022ds: enable monitor switching via pixis indirect mode
Date: Thu, 17 Nov 2011 16:09:17 -0600	[thread overview]
Message-ID: <4EC5860D.5000606@freescale.com> (raw)
In-Reply-To: <20111118082929.5ee8d4f07d84f2bf65e18006@canb.auug.org.au>

Stephen Rothwell wrote:

>>  static void p1022ds_set_monitor_port(enum fsl_diu_monitor_port port)
>>  {
>> -	struct device_node *np;
>> -	void __iomem *pixis;
>> -	u8 __iomem *brdcfg1;
>> +	struct device_node *guts_node = NULL;
> 
> There is no point in initialising this as it is assigned before being
> used.

Ok.

>> +	struct device_node *indirect_node = NULL;
>> +	struct ccsr_guts_85xx __iomem *guts = NULL;
>> +	u8 __iomem *lbc_lcs0_ba = NULL;
>> +	u8 __iomem *lbc_lcs1_ba = NULL;
> 
> And if you had multiple error path labels, you could avoid these others
> as well (and the NULL checks on the error path).

But I don't want multiple error path labels.  The error path could only happen if someone passed in a broken device tree (i.e. pretty much never), so I'm not keen on complicating my code just to optimize something that will never be used.

-- 
Timur Tabi
Linux kernel developer at Freescale

  reply	other threads:[~2011-11-17 22:09 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-17 18:57 [PATCH 1/2] powerpc/85xx: add pixis indirect mode device tree node Timur Tabi
2011-11-17 18:57 ` [PATCH 2/2] powerpc/85xx: p1022ds: enable monitor switching via pixis indirect mode Timur Tabi
2011-11-17 21:29   ` Stephen Rothwell
2011-11-17 22:09     ` Timur Tabi [this message]
2011-11-19  1:04       ` Stephen Rothwell
2011-11-21 17:01         ` Timur Tabi
2011-11-17 21:37   ` Scott Wood
2011-11-17 22:12     ` Timur Tabi
2011-11-17 22:25       ` Scott Wood
2011-11-17 22:28         ` Timur Tabi
2011-11-17 22:45           ` Scott Wood
2011-11-18 17:00             ` Timur Tabi
2011-11-18 18:06               ` Scott Wood
2011-11-18 18:08                 ` Timur Tabi
2011-11-17 21:50 ` [PATCH 1/2] powerpc/85xx: add pixis indirect mode device tree node Scott Wood

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=4EC5860D.5000606@freescale.com \
    --to=timur@freescale.com \
    --cc=kumar.gala@freescale.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=sfr@canb.auug.org.au \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.