mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-05 23:57:10 +00:00
hv: Fix identifier reuse
Now we have name reuse definitions in hypervisor as following:
"enum cpu_state cpu_state" in per_cpu.h,
"struct shell_cmd *shell_cmd" in shell_priv.h.
MISRAC requires that tag names shall not be reused anywhere
with in a program.So these definitions violate MISRAC rules
"identifier resue".This patch is used to fix it.
1. modify the definitions to "enum pcpu_boot_state boot_state"
and "struct shell_cmd *cmds".
2. modifty the relevant usage.
v1->v2
update commit message to be more explicit.
v2->v3
update the enum definition.
Tracked-On: #861
Signed-off-by: Junjun Shan <junjun.shan@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -268,12 +268,12 @@ extern spinlock_t trampoline_spinlock;
|
||||
#define BROADCAST_CPU_ID 0xfffeU
|
||||
|
||||
/* CPU states defined */
|
||||
enum cpu_state {
|
||||
CPU_STATE_RESET = 0,
|
||||
CPU_STATE_INITIALIZING,
|
||||
CPU_STATE_RUNNING,
|
||||
CPU_STATE_HALTED,
|
||||
CPU_STATE_DEAD,
|
||||
enum pcpu_boot_state {
|
||||
PCPU_STATE_RESET = 0,
|
||||
PCPU_STATE_INITIALIZING,
|
||||
PCPU_STATE_RUNNING,
|
||||
PCPU_STATE_HALTED,
|
||||
PCPU_STATE_DEAD,
|
||||
};
|
||||
|
||||
struct cpu_state_info {
|
||||
|
||||
Reference in New Issue
Block a user