On Thu, Jul 05, 2012 at 09:06:30AM +0200, Takashi Iwai wrote: > Mark Brown wrote: > > There is no need for the constraints to be modified while being > > applied > Many drivers pass the local instance to rule->private, and it's not > always guaranteed to be const. For example, you can imagine some > state modified kept in the struct while it's modified via rules. > In short: you'd have seen many compile warnings for non-ASoC drivers > if you run make once with this patch ;) Well, that's trivial to fix. > As a safe side fix, how about just adding const to > snd_pcm_hw_constraint_list() & co, and expclitly cast to non-const > later? My inclination for something like this is to put the casts with the users since that way we get the type safety through most of the code and we can see that dropping the const is safe since we're just getting back our own data. If we can see the APIs immediately dropping the const I'd expect we'd get people spending time on code review trying to figure out if it's safe.