mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-13 04:52:23 +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
Notes:
sideshowbarker
2024-07-17 17:11:40 +09:00
Author: https://github.com/bgianfo
Commit: f47c92bd2e
Pull-request: https://github.com/SerenityOS/serenity/pull/13109
Reviewed-by: https://github.com/linusg ✅
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