What is the point of having header files in C, if the header file not only includes prototypes of functions but also complete functions? I came across the file kdev_t.h in the linux source, which had the following:
static inline dev_t new_decode_dev(u32 dev)
{
unsigned major = (dev & 0xfff00) >> 8;
unsigned minor = (dev & 0xff) | ((dev >> 12) & 0xfff00);
return MKDEV(major, minor);
}
Why the .h extension? This question refers to classes in C++ but I'm not sure if the same principle applies here.