lkml.org 
[lkml]   [2009]   [Apr]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] usb driver for intellon based PLC like devolo dlan duo
On Sat, 18 Apr 2009, David Miller wrote:

> From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> Date: Sat, 18 Apr 2009 21:54:11 +0200 (CEST)
>
> > If you are working with that file and see a call to reg_write() you
> > know where to look for it.
>
> I would never use such a generic name for a driver local routine.
>
> For example, in the tg3 driver we use "tr32()" and "tw32()" so that
> at least some inkling of the driver name, even if it is just one
> character, prefixes the name.
>
> This extends to other driver's I've written. The niu driver thus
> uses "tr64()" and "nw64()".

Ok, we currently have drivers for mt9m001, mt9m111, mt9t031, and mt9v022.
Which letter would you take for them?:-) You'd have to take at least two
characters like "m0", "m1", "t0", and "v0" but that wouldn't be very
intuitive IMHO either. Take four characters like m001r16() and it looks
pretty bad compared to all routines being called mt9m001_*.

> This is just common sense as far as I'm concerned. It is just
> as straight forward as not using variable names like 'foo'.

I'd say that's subjective (not the latter, but the former):-)

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

\
 
 \ /
  Last update: 2009-04-19 10:35    [from the cache]
©2003-2011 Jasper Spaans. Advertise on this site