mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-06 08:04:55 +00:00
HV: Add const qualifiers where required
V1: In order to better comply with MISRA C, add const qualifiers whereeven required. In the patch, these are being added to pointers which are normally used in "get" functions. V2: Corrected the issues in the patch pointed by Junjie in his review comments. Moved the const qualifiers to the correct places. Removed some changes which are not needed. V3: Updated patch comment. This modifies a subset of all the functions which might need constant qualifiers for the their parameters. This is not and exhaustive patch. This only targets obvious places where we can use the const qualifier. More changes will be submitted in future patches, if required. Signed-off-by: Arindam Roy <arindam.roy@intel.com>
This commit is contained in:
@@ -449,7 +449,7 @@ int vmx_wrmsr_pat(struct vcpu *vcpu, uint64_t value);
|
||||
int vmx_write_cr0(struct vcpu *vcpu, uint64_t cr0);
|
||||
int vmx_write_cr4(struct vcpu *vcpu, uint64_t cr4);
|
||||
|
||||
static inline enum vm_cpu_mode get_vcpu_mode(struct vcpu *vcpu)
|
||||
static inline enum vm_cpu_mode get_vcpu_mode(const struct vcpu *vcpu)
|
||||
{
|
||||
return vcpu->arch_vcpu.cpu_mode;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user