From 2c5626b6c0c42d0d77b29162657c62c7fb39def1 Mon Sep 17 00:00:00 2001 From: Leandro Lanzieri Date: Mon, 11 Nov 2019 16:34:14 +0100 Subject: [PATCH] CODING_CONVENTIONS: Add reference to IS_ACTIVE and IS_USED macros. --- CODING_CONVENTIONS.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CODING_CONVENTIONS.md b/CODING_CONVENTIONS.md index a3bac6853a..95f002f339 100644 --- a/CODING_CONVENTIONS.md +++ b/CODING_CONVENTIONS.md @@ -26,6 +26,11 @@ [completely different](https://www.kernel.org/doc/html/latest/process/coding-style.html#typedefs) (see below) (BTW: Do we have any reason to do so?) * Comments should be C-style comments (see below) +* In order to follow Linux's recommendation on + [conditional compilation](https://www.kernel.org/doc/html/latest/process/coding-style.html#conditional-compilation) + make use of `IS_ACTIVE` and `IS_USED` macros from `kernel_defines.h` with C + conditionals. If a symbol is not going to be defined under a certain + condition, the usage of preprocessor `#if defined()` is fine. * You can use [uncrustify](http://uncrustify.sourceforge.net/) with the provided option files: https://github.com/RIOT-OS/RIOT/blob/master/uncrustify-riot.cfg