Messages in this thread | | | Date | Mon, 18 Jun 2012 12:13:58 +0200 (CEST) | From | Guennadi Liakhovetski <> | Subject | Re: [PATCH] regulator: extend the fixed voltage regulator to accept voltage |
| |
On Mon, 18 Jun 2012, Mark Brown wrote:
> On Mon, Jun 18, 2012 at 11:52:13AM +0200, Guennadi Liakhovetski wrote: > > > Well, I never insist on being the most advanced aesthetics connaisseur, > > but I think these two changes are related. The point is, that if we want > > to support different voltages, boards will have several of these > > regulators, therefore they'll need different names. We could splt this, > > but just the first part - changing the name - would look kinda pointless > > without the second one, don't you think? > > The major point there is I shouldn't be reading the change and going > "hang on, this is talking about names not voltages but the changelog > only mentioned voltages, what's that about then?". The code looked more > complex than I'd expect too.
Ok, I can add an explanation, why the name changes are necessary.
> I suspect we should be using kstrdup()...
I wouldn't. It would add one more kmalloc(), which is avoided with my approach, then it would make a memcpy(), which we also don't need, because we have to print the id into the string.
Thanks Guennadi --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer http://www.open-technology.de/
| |