Re: Javadoc comments in kernel source?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Timur Tabi <timur.tabi@ammasso.com> writes:

> Greg KH wrote:
>
>> If not, feel free to ask specific questions.  Also take a look at some
>> code that implements it (like the public functions in
>> drivers/usb/core/usb.c for example.)
>
> What about things like prefixes for variable names?  For instance,
> I like to specify i_, o_, or io_ as prefixes for a function parameter to
> indicate that this parameter is input only, output only, or both,
> respectively.

On a different note, I'm reminded of the prefixes to members of
certain structs.  They're reminiscent of the days when C structs
shared a single namespace.  I'm thinking of the members of
buffer_head like b_state.

One great thing about b_state is that it makes grepping for examples
of its use much easier.  If it were called "state", it would be
harder to figure out who's directly manipulating the state member of
buffer_heads.  

-- 
--Ed L Cashin            |   PGP public key:
  ecashin@uga.edu        |   http://noserose.net/e/pgp/


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux