HV: x86: fix "Global variable should be declared const"

Gloabal variable should be declared constant wherever possible to avoid unintentional
modification.

Tracked-On: #861
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Kaige Fu 2018-12-18 13:14:58 +00:00 committed by wenlingz
parent eff9459110
commit 2fefff34a7
2 changed files with 2 additions and 2 deletions

View File

@ -57,7 +57,7 @@ static uint64_t legacy_irq_trigger_mode[NR_LEGACY_IRQ] = {
IOAPIC_RTE_TRGREDG, /* IRQ15*/
};
uint8_t pic_ioapic_pin_map[NR_LEGACY_PIN] = {
const uint8_t pic_ioapic_pin_map[NR_LEGACY_PIN] = {
2U, /* pin0*/
1U, /* pin1*/
0U, /* pin2*/

View File

@ -68,6 +68,6 @@ struct gsi_table {
extern struct gsi_table gsi_table[NR_MAX_GSI];
extern uint32_t nr_gsi;
extern uint8_t pic_ioapic_pin_map[NR_LEGACY_PIN];
extern const uint8_t pic_ioapic_pin_map[NR_LEGACY_PIN];
#endif /* IOAPIC_H */