[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20140905.171730.1008773830841366831.davem@davemloft.net>
Date: Fri, 05 Sep 2014 17:17:30 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: daniel@...que.org
Cc: julia.lawall@...6.fr, netdev@...r.kernel.org, mugunthanvnm@...com,
george.cherian@...com, zonque@...il.com
Subject: Re: [PATCH] net: ethernet: cpsw: improve interrupt lookup logic in
cpsw_probe()
From: Daniel Mack <daniel@...que.org>
Date: Thu, 4 Sep 2014 09:00:23 +0200
> From: Daniel Mack <zonque@...il.com>
>
> Simplify the interrupt resource lookup code in cpsw_probe() by the
> following:
>
> * Only look at the first member of the resource. As the driver only
> works for DT-enabled platforms anyway, a resource of type
> IORESOURCE_IRQ will only contain one single entry
> (res->start == res->end), so there is no need for the iteration.
>
> * Add a bounds check to avoid overflows if we are passed more than
> ARRAY_SIZE(priv->irqs_table) resources.
>
> * Assign 'ret' with the return value of devm_request_irq() so that
> cpsw_probe() returns the appropriate error code.
>
> * If devm_request_irq() fails, report the error code in the log
> message.
>
> Signed-off-by: Daniel Mack <zonque@...il.com>
Applied to net-next, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists