x86/ioapic: Remove use of TRUE/FALSE
PATCH 2/2 x86/ioapic: Remove use of TRUE/FALSE
Also fix stray usage in VT-d.
Suggested-by Andrew Cooper <[email protected]>
Signed-off-by Kevin Stefanov <[email protected]>
---
CC: Jan Beulich <[email protected]>
CC: Andrew Cooper <[email protected]>
CC: "Roger Pau Monné" <[email protected]>
CC: Wei Liu <[email protected]>
CC: Kevin Tian <[email protected]>
--- xen/arch/x86/io_apic.c | 12 ++++++------ xen/drivers/passthrough/vtd/utils.c | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-)
xen/arch/x86/io_apic.c +6 -6
@@ -289,7 +289,7 @@ static void __io_apic_eoi(unsigned int apic, unsigned int vector, unsigned int p {/* If vector is unknown, read it from the IO-APIC */ if ( vector ==IRQ_VECTOR_UNASSIGNED ) - vector =__ioapic_read_entry (apic, pin, TRUE).vector; + vector =__ioapic_read_entry (apic, pin, true).vector; *(IO_APIC_BASE (apic)+16 ) = vector; }
@@ -300,28 +300,28 @@ static void __io_apic_eoi(unsigned int apic, unsigned int vector, unsigned int pstruct IO_APIC_route_entry entry;bool need_to_unmask = false; - entry =__ioapic_read_entry (apic, pin, TRUE); + entry =__ioapic_read_entry (apic, pin, true);if ( ! entry.mask ) {/* If entry is not currently masked, mask it and make * a note to unmask it later */ entry.mask =1 ; -__ioapic_write_entry (apic, pin, TRUE, entry); +__ioapic_write_entry (apic, pin, true, entry); need_to_unmask = true; }/* Flip the trigger mode to edge and back */ entry.trigger =0 ; -__ioapic_write_entry (apic, pin, TRUE, entry); +__ioapic_write_entry (apic, pin, true, entry); entry.trigger =1 ; -__ioapic_write_entry (apic, pin, TRUE, entry); +__ioapic_write_entry (apic, pin, true, entry);if ( need_to_unmask ) {/* Unmask if neccesary */ entry.mask =0 ; -__ioapic_write_entry (apic, pin, TRUE, entry); +__ioapic_write_entry (apic, pin, true, entry); } } }
xen/drivers/passthrough/vtd/utils.c +1 -1
@@ -281,7 +281,7 @@ void vtd_dump_iommu_info(unsigned char key)for ( i =0 ; i <= reg_01.bits.entries; i++ ) {struct IO_APIC_route_entry rte = -__ioapic_read_entry (apic, i, TRUE); +__ioapic_read_entry (apic, i, true); remap = (struct IO_APIC_route_remap_entry *) &rte;if ( !remap->format )
Signature · 1 line
2.25.1
Quoted 4 lines · Kevin Stefanov
Also fix stray usage in VT-d.
Suggested-by Andrew Cooper <[email protected]>Signed-off-by Kevin Stefanov <[email protected]>
May I ask that along with replacing TRUE (there's no instance of FALSE that you replace, so you may want to adjust the title) you also replace the uses of literal 0/1 passed to {,__}ioapic_{read,write}_entry() while at this?
Thanks, Jan