?????Щ???????Coding Style
????????
????1???????????????Kconfig??????Tab??????????????????Tab?????8???????
????2??switch … case …????У?switch??case????????????????ο????????

??????????
????3???????????òο?K&R???
??????????????????????????У?
????int function(int x)
????{
????body of function
????}
???????????????????????
????if (x is true) {
????we do y
????}
?????????????????????????????
????if (condition)
????action();
??????????????????????????????????????????????????????У????????????£??????????
????if (condition) {
????do_this();
????do_that();
????} else {
????otherwise();
????}
???????
????4????????“if?? switch?? case?? for?? do?? while”?????????????磺
????if (something)
????5????????“sizeof?? typeof?? alignof?? or __attribute__”?????????磺
????sizeof(struct file)
????6???????????????????????????磬???????????????????
????sizeof( struct file )
????7????????????????????????????????“= + – < > * / % | & ^ <= >= == != ? :”??
????8????????????治??????“& * + – ~ ! sizeof typeof alignof __attribute__ defined”??
????9??????????????????????????????????????????????“++”??“–”????
????10??????????????“.”??“->”???????????????
????11????β????????

???????
????12?????C89??“/* … */”????????C99??“// …”???
????13?????????????????ο???????

????/*
????* This is the preferred style for multi-line
????* comments in the Linux kernel source code.
????* Please use it consistently.
????*
????* Description: A column of asterisks on the left side??
????* with beginning and ending almost-blank lines.
????*/
????Kconfig
????14??“config”??????????????Tab??????help?????????????????????????磺
????config AUDIT
????bool "Auditing support"
????depends on NET
????help
????Enable auditing infrastructure that can be used with another
????kernel subsystem?? such as SELinux (which requires this for
????logging of avc messages output). Does not do system-call
????auditing without CONFIG_AUDITSYSCALL.
??????
????15?????е?????????“do .. while”??????磺
????#define macrofun(a?? b?? c)
????do {
????if (a == 5)
????do_this(b?? c);
????} while (0)
?????????????
????16????????????????????????????·???
????????????????????????????????????????????????????????????????0????????-Exxx??????????????????????磺
????do_something()
????????????????????ж??????????????????????????1????????0??????????磺
????something_is_present()