hv: fix '(void) missing for discarded return value'

MISRA-C requires that the function call in which the returned
value is discarded shall be clearly indicated using (void).

This patch fixes the violations related to the following
function calls.
- vlapic_set_intr
- vlapic_intr_edge

Tracked-On: #861
Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
This commit is contained in:
Shiqing Gao
2018-11-13 14:32:04 +08:00
committed by wenlingz
parent b3b24320d4
commit 3731b4c0ac
3 changed files with 16 additions and 30 deletions

View File

@@ -185,8 +185,10 @@ int vlapic_wrmsr(struct acrn_vcpu *vcpu, uint32_t msr, uint64_t wval);
/*
* Signals to the LAPIC that an interrupt at 'vector' needs to be generated
* to the 'cpu', the state is recorded in IRR.
* @pre vcpu != NULL
* @pre vector <= 255U
*/
int vlapic_set_intr(struct acrn_vcpu *vcpu, uint32_t vector, bool level);
void vlapic_set_intr(struct acrn_vcpu *vcpu, uint32_t vector, bool level);
#define LAPIC_TRIG_LEVEL true
#define LAPIC_TRIG_EDGE false
@@ -196,13 +198,11 @@ int vlapic_set_intr(struct acrn_vcpu *vcpu, uint32_t vector, bool level);
* @param[in] vcpu Pointer to target vCPU data structure
* @param[in] vector Vector to be injected.
*
* @return 0 on success.
* @return -EINVAL on error that vector is invalid or vcpu is NULL.
*/
static inline int
static inline void
vlapic_intr_level(struct acrn_vcpu *vcpu, uint32_t vector)
{
return vlapic_set_intr(vcpu, vector, LAPIC_TRIG_LEVEL);
vlapic_set_intr(vcpu, vector, LAPIC_TRIG_LEVEL);
}
/**
@@ -211,13 +211,11 @@ vlapic_intr_level(struct acrn_vcpu *vcpu, uint32_t vector)
* @param[in] vcpu Pointer to target vCPU data structure
* @param[in] vector Vector to be injected.
*
* @return 0 on success.
* @return -EINVAL on error that vector is invalid or vcpu is NULL.
*/
static inline int
static inline void
vlapic_intr_edge(struct acrn_vcpu *vcpu, uint32_t vector)
{
return vlapic_set_intr(vcpu, vector, LAPIC_TRIG_EDGE);
vlapic_set_intr(vcpu, vector, LAPIC_TRIG_EDGE);
}
/**