1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:07:45 +00:00

Kernel: Mark serenity_dev_ functions as static

This avoids multiple definition errors when linking software which
may utilize these functions from different compilation units.
This commit is contained in:
Brian Gianforcaro 2022-03-18 03:21:59 -07:00 committed by Linus Groh
parent 83abc83d3c
commit f47c92bd2e

View file

@ -12,17 +12,17 @@
__BEGIN_DECLS
ALWAYS_INLINE dev_t serenity_dev_makedev(unsigned major, unsigned minor)
static ALWAYS_INLINE dev_t serenity_dev_makedev(unsigned major, unsigned minor)
{
return (minor & 0xffu) | (major << 8u) | ((minor & ~0xffu) << 12u);
}
ALWAYS_INLINE unsigned int serenity_dev_major(dev_t dev)
static ALWAYS_INLINE unsigned int serenity_dev_major(dev_t dev)
{
return (dev & 0xfff00u) >> 8u;
}
ALWAYS_INLINE unsigned int serenity_dev_minor(dev_t dev)
static ALWAYS_INLINE unsigned int serenity_dev_minor(dev_t dev)
{
return (dev & 0xffu) | ((dev >> 12u) & 0xfff00u);
}