mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:27:43 +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:
parent
83abc83d3c
commit
f47c92bd2e
1 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue