lkml.org 
[lkml]   [2011]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/7] regmap: Make reg_config reg_defaults const
On 11/16/2011 05:24 PM, Mark Brown wrote:
> On Wed, Nov 16, 2011 at 05:23:33PM +0100, Lars-Peter Clausen wrote:
>> On 11/16/2011 05:13 PM, Mark Brown wrote:
>
>>> You should've got reams of sparse warnings from that - the indexed cache
>>> is writing to the defaults table (which is very naughty and i keep
>>> thinking about deleting it as a result).
>
>> This patch makes reg_defaults const in the reg_config struct not in the
>> regmap struct.
>
>> Since we duplicate the reg_config reg_defaults into the regmap reg_defaults
>> the index cache works on a runtime allocated array. (Though I wouldn't
>> object to see it gone. For the average uscase it uses more memory and is
>> slower than the rbnode cache).
>
> Did you actually check the sparse output?

No, because the only place we ever look at config->reg_defaults is in
regache_init. And now I just run sparse and as expected regmap doesn't
trigger any warnings or errors.


\
 
 \ /
  Last update: 2011-11-16 17:37    [W:0.048 / U:0.980 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site