Coding style questions

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

 



1. When you have a function prototype with a comment following it (which obviously it's a bad thing), like this one

u32 eprom_read(struct net_device *dev,u32 addr); //reads a 16 bits word

and want to fix it, how would one do it:

/* Read a 16 bits word. */
u32 eprom_read(struct net_device *dev, u32 addr);

or the comment should go into the implementation file ?

2. What's the kernel code style about header guards ? As far as I've seen, it's usual to do:

#ifndef HEADER_H
#define HEADER_H

and not:

#infdef _HEADER_H
#define _HEADER_H

or other variations. Does it even matter?


Thanks,
Radu.
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux