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:
Shiqing Gao
2018-08-09 13:31:27 +08:00
committed by lijinxia
parent cdd19dc51b
commit 40196d16af
6 changed files with 53 additions and 58 deletions

View File

@@ -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)
{