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:
junjunshan1
2018-10-11 17:13:47 +08:00
committed by wenlingz
parent dbd9ab07e1
commit 7dd35cb72e
5 changed files with 18 additions and 18 deletions

View File

@@ -41,7 +41,7 @@ struct per_cpu_region {
struct instr_emul_ctxt g_inst_ctxt;
struct host_gdt gdt;
struct tss_64 tss;
enum cpu_state cpu_state;
enum pcpu_boot_state boot_state;
uint8_t mc_stack[CONFIG_STACK_SIZE] __aligned(16);
uint8_t df_stack[CONFIG_STACK_SIZE] __aligned(16);
uint8_t sf_stack[CONFIG_STACK_SIZE] __aligned(16);