lkml.org 
[lkml]   [2012]   [Jun]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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/


\
 
 \ /
  Last update: 2012-06-18 13:43    [W:0.101 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site