[PATCH 2/2] powerpc/85xx: p1022ds: enable monitor switching via pixis indirect mode

Stephen Rothwell sfr at canb.auug.org.au
Fri Nov 18 08:29:29 EST 2011


Hi Timur,

On Thu, 17 Nov 2011 12:57:39 -0600 Timur Tabi <timur at freescale.com> wrote:
>
> @@ -129,44 +144,117 @@ static void p1022ds_set_gamma_table(enum fsl_diu_monitor_port port,
>   */
>  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.

> +	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).

-- 
Cheers,
Stephen Rothwell                    sfr at canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20111118/2f51f1b5/attachment.pgp>


More information about the Linuxppc-dev mailing list