# Kernel Coding Specification This kernel coding specification is developed based on the general programming specifications in the industry. It defines the programming styles for kernel developers to follow. ## Principle Overall principle: - Clear: The code should be easy to understand, maintain, and rebuilt. Avoid obscure syntax. - Simple: Use short names and compact functions. - Efficient: Improve program efficiency by using algorithms, compiler optimization options, or hardware resources. - Concise: The code is reasonable and consistent. Comply with this specification in most cases. When third-party open-source code needs to modified or a large number of open-source code APIs are used, follow the specifications applied to the third-party open-source code. Flexibly use this specification based on general principles. ## Directory Structure You are advised to divide directories by function module and then define the header file directory and source file directory for each module. Unless otherwise specified, use lowercase letters separated by underscores \(\_\) for directory names and file names. ## **Naming** The CamelCase style is recommended. The rules are as follows: