Re: [PATCH] ppc: i8259 of_node_get cleanup

From: Mariusz Kozlowski
Date: Tue Jan 09 2007 - 05:33:58 EST


Hello,

> This patch removes redundant argument check for of_node_get().
>
> Signed-off-by: Mariusz Kozlowski <m.kozlowski@xxxxxxxxxx>
>
> 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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/