I am going through beginner's kernel module exercises. In several sources, they define the following macros:
#define MODULE
#define LINUX
#define __KERNEL__
But kbuild warns:
warning: "MODULE" redefined [enabled by default]
...
warning: "__KERNEL__" redefined [enabled by default]
So my questions are:
- What are these definitions for anyway?
- Why would "redefinition" require a warning? Merely because in general it implies that a previous (desired) value for the macro has been overridden?
- Why not put these definitions in
#ifndef
blocks?