git: 638b29fe651e - main - x86/atpic: convert INTSRC() macro into designated initializer
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 11 Dec 2024 22:54:52 UTC
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=638b29fe651e9a2454d6d73f0af0aec0d208c5d0 commit 638b29fe651e9a2454d6d73f0af0aec0d208c5d0 Author: Elliott Mitchell <ehem+freebsd@m5p.com> AuthorDate: 2024-12-11 22:53:42 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-12-11 22:54:09 +0000 x86/atpic: convert INTSRC() macro into designated initializer Move to using C99 initializers. These make the macros more understandable and easier to use. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1457 --- sys/x86/isa/atpic.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/x86/isa/atpic.c b/sys/x86/isa/atpic.c index 4ea80cfff7f9..56566ef8d64d 100644 --- a/sys/x86/isa/atpic.c +++ b/sys/x86/isa/atpic.c @@ -113,8 +113,12 @@ inthand_t } #define INTSRC(irq) \ - { { &atpics[(irq) / 8].at_pic }, IDTVEC(atpic_intr ## irq ), \ - IDTVEC(atpic_intr ## irq ## _pti), (irq) % 8 } + { \ + .at_intsrc = { &atpics[(irq) / 8].at_pic }, \ + .at_intr = IDTVEC(atpic_intr ## irq ), \ + .at_intr_pti = IDTVEC(atpic_intr ## irq ## _pti), \ + .at_irq = (irq) % 8, \ + } struct atpic { struct pic at_pic;