[PATCH] ppc: i8259 of_node_get cleanup

Mariusz Kozlowski m.kozlowski at tuxland.pl
Tue Jan 9 21:33:52 EST 2007


Hello,

> 	This patch removes redundant argument check for of_node_get().
> 
> Signed-off-by: Mariusz Kozlowski <m.kozlowski at tuxland.pl>
> 
>  arch/powerpc/sysdev/i8259.c |    3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff -upr linux-2.6.20-rc2-mm1-a/arch/powerpc/sysdev/i8259.c linux-2.6.20-rc2-mm1-b/arch/powerpc/sysdev/i8259.c
> --- linux-2.6.20-rc2-mm1-a/arch/powerpc/sysdev/i8259.c	2006-12-24 05:00:32.000000000 +0100
> +++ linux-2.6.20-rc2-mm1-b/arch/powerpc/sysdev/i8259.c	2007-01-02 02:03:57.000000000 +0100
> @@ -276,8 +276,7 @@ void i8259_init(struct device_node *node
>  	spin_unlock_irqrestore(&i8259_lock, flags);
>  
>  	/* create a legacy host */
> -	if (node)
> -		i8259_node = of_node_get(node);
> +	i8259_node = of_node_get(node);
>  	i8259_host = irq_alloc_host(IRQ_HOST_MAP_LEGACY, 0, &i8259_host_ops, 0);
>  	if (i8259_host == NULL) {
>  		printk(KERN_ERR "i8259: failed to allocate irq host !\n");

Paul, this patch is invalid as I overlooked the code comment that says it must allow node
be NULL. On the other hand it's never called with node == NULL. So either the comment
should change or do not apply this patch.

-- 
Regards,

	Mariusz Kozlowski



More information about the Linuxppc-dev mailing list