[U-Boot] [PATCH 1/4] cmdline: Add linux command line munging tools

Mike Frysinger vapier at gentoo.org
Thu Oct 20 03:37:14 CEST 2011


On Wednesday 19 October 2011 21:07:11 Doug Anderson wrote:
> On Wed, Oct 19, 2011 at 3:52 PM, Mike Frysinger <vapier at gentoo.org> wrote:
> > i'm not particularly enamored with this naming style.  i find the style
> > of "<section>_<operation>" to be easier on the eyes rather than this
> > RPN.
> > 
> > i.e. cmdline_param_remove() and cmdline_param_add()
> 
> I'm happy to name it whatever you'd like.  My next patch will use your
> naming suggestion unless someone says otherwise.
> 
> I will note, however, that the "verb_noun" style of naming appears to be
> favored by the Linux kernel.  In the section of "Naming" in <
> http://www.kernel.org/doc/Documentation/CodingStyle>, a suggested name is
> "count_active_users()", not "active_users_count()".

to be fair, that file says:
	... you should call that "count_active_users()" or similar, you should
	_not_ call it "cntusr()".
it doesn't seem to take a position on the "verb_noun" vs "noun_verb" style. 

in my experience, the common string tends to be more used at the start rather 
than the end (spinlocks, mutexes, interrupts, gpios, spi, i2c).  but i've 
certainly not done a comprehensive survey to back up my position :).
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20111019/dc51691e/attachment.pgp 


More information about the U-Boot mailing list