mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-21 08:50:27 +00:00
fix parted of "missing for discarded return value"
MISRA C required that return value should be used, missing for it should add "(void)" prefix before the function call. Some function can be declared without return value to avoid this problem. Signed-off-by: Huihuang Shi <huihuang.shi@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -6,12 +6,11 @@
|
||||
|
||||
#include <hv_lib.h>
|
||||
|
||||
inline int spinlock_init(spinlock_t *lock)
|
||||
inline void spinlock_init(spinlock_t *lock)
|
||||
{
|
||||
memset(lock, 0, sizeof(spinlock_t));
|
||||
return 0;
|
||||
}
|
||||
int spinlock_obtain(spinlock_t *lock)
|
||||
void spinlock_obtain(spinlock_t *lock)
|
||||
{
|
||||
|
||||
/* The lock function atomically increments and exchanges the head
|
||||
@@ -31,5 +30,4 @@ int spinlock_obtain(spinlock_t *lock)
|
||||
[head] "m"(lock->head),
|
||||
[tail] "m"(lock->tail)
|
||||
: "cc", "memory");
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user