mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-22 01:07:57 +00:00
hv: treewide: fix 'inline function should be declared static'
MISRAC does not allow the use of an inline function with external linkage. What this patch does: - Add the static keyword for the function that is only used in the definition file. - Remove the inline keyword for the function that is used in multiple files. v1 -> v2: * Move some functions to headers as static inline function if it is possible Signed-off-by: Shiqing Gao <shiqing.gao@intel.com> Reviewed-by: Junjie Mao <junjie.mao@intel.com>
This commit is contained in:
@@ -6,10 +6,11 @@
|
||||
|
||||
#include <hv_lib.h>
|
||||
|
||||
inline void spinlock_init(spinlock_t *lock)
|
||||
void spinlock_init(spinlock_t *lock)
|
||||
{
|
||||
(void)memset(lock, 0U, sizeof(spinlock_t));
|
||||
}
|
||||
|
||||
void spinlock_obtain(spinlock_t *lock)
|
||||
{
|
||||
|
||||
|
Reference in New Issue
Block a user