public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Daniel Mack <daniel@zonque•org>
To: Mugunthan V N <mugunthanvnm@ti•com>, davem@davemloft•net
Cc: julia.lawall@lip6•fr, netdev@vger•kernel.org, george.cherian@ti•com
Subject: Re: [PATCH 2/2] net: ethernet: cpsw: fix interrupt lookup logic in cpsw_probe()
Date: Wed, 03 Sep 2014 10:23:46 +0200	[thread overview]
Message-ID: <5406D012.6030601@zonque.org> (raw)
In-Reply-To: <5406CFD9.6060706@ti.com>

On 09/03/2014 10:22 AM, Mugunthan V N wrote:
> On Wednesday 03 September 2014 01:00 PM, Daniel Mack wrote:
>> On 09/03/2014 09:28 AM, Mugunthan V N wrote:
>>> On Tuesday 02 September 2014 10:14 PM, Daniel Mack wrote:
>>>> The code in cpsw_probe() currently iterates over the available
>>>> interrupt resources and requests each of them.  While doing so, it
>>>> keeps track of their indices through priv->irqs_table.
>>>>
>>>> However, the code currently only remembers the last interrupt in
>>>> a resource, and will leak the others if there is more than one.
>>>> This can only happen for board-file driven platforms and not via DT,
>>>> however.
>>>>
>>>> Also, there is currently no bounds check, while priv->irqs_table is a
>>>> fixed-size array. If we are passed more than 4 resources, we're in
>>>> trouble.
>>>>
>>>> This patch introduces a bounds check and changes the way interrupt
>>>> indices are kept. Tested on a Beagle Bone Black board only.
>>>>
>>>> Signed-off-by: Daniel Mack <zonque@gmail•com>
>>>
>>> The drivers is not supported for non-DT platforms as all the platforms
>>> which uses CPSW are DT only platforms.
>>
>> Ok, thanks for explaining.
>>
>> But then we can remove the iteration then and simplify the code, right?
>> The bounds check should also be done.
>>
> 
> Right, we can simplify the code.

Ok, I'll cook up a new patch.


Thanks!
Daniel

  reply	other threads:[~2014-09-03  8:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-02 16:44 [PATCH 1/2] net: ethernet: cpsw: don't claim IRQs with devm_request_irq() Daniel Mack
2014-09-02 16:44 ` [PATCH 2/2] net: ethernet: cpsw: fix interrupt lookup logic in cpsw_probe() Daniel Mack
2014-09-03  7:28   ` Mugunthan V N
2014-09-03  7:30     ` Daniel Mack
2014-09-03  8:22       ` Mugunthan V N
2014-09-03  8:23         ` Daniel Mack [this message]
2014-09-03  7:27 ` [PATCH 1/2] net: ethernet: cpsw: don't claim IRQs with devm_request_irq() Mugunthan V N

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=5406D012.6030601@zonque.org \
    --to=daniel@zonque$(echo .)org \
    --cc=davem@davemloft$(echo .)net \
    --cc=george.cherian@ti$(echo .)com \
    --cc=julia.lawall@lip6$(echo .)fr \
    --cc=mugunthanvnm@ti$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox