hv: irq: fix MISRA-C violations in irq.c and idt.h

This commit fixed following violations:
- Procedure has more than one exit point: free_irq_vector/request_irq/dispatch_interrupt
- goto detected: dispatch_interrupt
- Pointer param should be declared pointer to const: fixup_idt
- basic type declaration used: fixup_idt

Tracked-On: #861
Signed-off-by: Yan, Like <like.yan@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Yan, Like
2018-12-18 21:59:41 +08:00
committed by wenlingz
parent 08cf8f648c
commit 530388db30
2 changed files with 64 additions and 75 deletions

View File

@@ -14,9 +14,9 @@
/* Interrupt Descriptor Table (LDT) selectors are 16 bytes on x86-64 instead of
* 8 bytes.
*/
#define X64_IDT_DESC_SIZE (0x10)
#define X64_IDT_DESC_SIZE (0x10U)
/* Number of the HOST IDT entries */
#define HOST_IDT_ENTRIES (0x100)
#define HOST_IDT_ENTRIES (0x100U)
/* Size of the IDT */
#define HOST_IDT_SIZE (HOST_IDT_ENTRIES * X64_IDT_DESC_SIZE)