[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4FC24AA7.9040100@wwwdotorg.org>
Date: Sun, 27 May 2012 09:39:19 -0600
From: Stephen Warren <swarren@...dotorg.org>
To: Dong Aisheng <dongas86@...il.com>
CC: Dong Aisheng <b29396@...escale.com>, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linus.walleij@...ricsson.com,
devicetree-discuss@...ts.ozlabs.org, grant.likely@...retlab.ca,
rob.herring@...xeda.com
Subject: Re: [PATCH v4 6/6] pinctrl: add pinctrl gpio binding support
On 05/26/2012 10:52 AM, Dong Aisheng wrote:
> On Fri, May 25, 2012 at 10:03 AM, Stephen Warren <swarren@...dotorg.org> wrote:
>> On 05/25/2012 07:36 AM, Dong Aisheng wrote:
...
>> If we don't do that, [lock ranges[i].gc] I would argue that we
>> shouldn't store ranges[i].gc, since it might become invalid - I
>> believe the only use of it is withinthis function?
>>
> In my option, i think it's ok to store it since they're just some data
> to describe
> hw properties. The gpio function may become invalid but not data.
> Is it reasonable to you?
The problem is that if someone tries to dereference the gc field, and
it's no longer valid, which could cause an OOPS. Perhaps we can get away
just with a comment in the struct definition indicating that this field
should only be used by drivers that provided the gc field directly
rather than having it set up by DT, but then why even store it when
creating the ranges from DT in that case?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists