mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-07 11:50:30 +00:00
dm: inline functions defined in header must be static
An inline function defined in headers must be static otherwise compilation may fail, depending on gcc optimization level, particularly if dropping -O2 from the Makefile dm doesn't compile reporting unresolved symbols. Tracked-On: #1406 Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
#ifndef __RPMB_SIM_H__
|
||||
#define __RPMB_SIM_H__
|
||||
|
||||
inline uint32_t swap32(uint32_t val)
|
||||
static inline uint32_t swap32(uint32_t val)
|
||||
{
|
||||
return ((val & (uint32_t)0x000000ffUL) << 24)
|
||||
| ((val & (uint32_t)0x0000ff00UL) << 8)
|
||||
@@ -36,7 +36,7 @@ inline uint32_t swap32(uint32_t val)
|
||||
| ((val & (uint32_t)0xff000000UL) >> 24);
|
||||
}
|
||||
|
||||
inline uint16_t swap16(uint16_t val)
|
||||
static inline uint16_t swap16(uint16_t val)
|
||||
{
|
||||
return ((val & (uint16_t)0x00ffU) << 8)
|
||||
| ((val & (uint16_t)0xff00U) >> 8);
|
||||
|
Reference in New Issue
Block a user