[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4EC3F0DC.9090106@metafoo.de>
Date: Wed, 16 Nov 2011 18:20:28 +0100
From: Lars-Peter Clausen <lars@...afoo.de>
To: Mark Brown <broonie@...nsource.wolfsonmicro.com>
CC: Dimitris Papastamos <dp@...nsource.wolfsonmicro.com>,
Jonathan Cameron <jic23@...nel.org>,
Michael Hennerich <michael.hennerich@...log.com>,
linux-kernel@...r.kernel.org, linux-iio@...r.kernel.org,
device-drivers-devel@...ckfin.uclinux.org, drivers@...log.com
Subject: Re: [PATCH 2/7] regmap: Make reg_config reg_defaults const
On 11/16/2011 06:09 PM, Mark Brown wrote:
> On Wed, Nov 16, 2011 at 06:01:40PM +0100, Lars-Peter Clausen wrote:
>> On 11/16/2011 05:51 PM, Mark Brown wrote:
>
>>> None of them, I just changed the code to make the defaults const - I'm
>>> just reviewing by eyeball as I'm well aware of the fact that this isn't
>>> const.
>
>> So you only applied part of the patch and are complaining that it you get an
>> error?
>
> I'm saying that the way we're using the reg_defaults is unfortunately
> excessively cute right now so just by looking at the code I'm able to
> see that there's an issue having done the same change before but not
> applied it due to the cuteness. I only did a code mod to generate the
> warnings since you weren't seeing any issue.
Sorry, I can't follow you anymore. Do you still see a problem with the patch
as it is, and if yes why?
We never ever modify reg_defaults of the reg_config we only ever modify the
reg_defaults of the regmap struct which is always runtime allocated. In the
case the config contains reg_defaults it is kmemdup'd into the reg_defaults
of the regmap struct.
--
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