diff options
author | Brian Gianforcaro <bgianf@serenityos.org> | 2022-03-18 03:21:59 -0700 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-03-18 11:59:35 +0000 |
commit | f47c92bd2e8f1b3842060c8a46387c825b196220 (patch) | |
tree | 703ec2cc5e0a81f196046bd5e9b81456f233ba43 /Kernel/API/Device.h | |
parent | 83abc83d3c906a0005702dcc495df40ad219883e (diff) | |
download | serenity-f47c92bd2e8f1b3842060c8a46387c825b196220.zip |
Kernel: Mark `serenity_dev_` functions as static
This avoids multiple definition errors when linking software which
may utilize these functions from different compilation units.
Diffstat (limited to 'Kernel/API/Device.h')
-rw-r--r-- | Kernel/API/Device.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Kernel/API/Device.h b/Kernel/API/Device.h index 05cba987e4..980c9d7390 100644 --- a/Kernel/API/Device.h +++ b/Kernel/API/Device.h @@ -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); } |