Which is more "appropriate" when writing a linux kernel module: Using static const
to define a constant, or #define
?
I have a kernel module related to a piece of hardware, and I have a typical constant that's the number of buffers. Rather than hard-code "3" everywhere, I want to use a constant. C style usually recommends taking static const
, but I notice the Kernel is chock full of #define
's all over the place. Is there a reason?