git: 5050fdb6b60e - main - plic: tweak macro argument names

From: Mitchell Horne <mhorne_at_FreeBSD.org>
Date: Wed, 30 Oct 2024 18:21:00 UTC
The branch main has been updated by mhorne:

URL: https://cgit.FreeBSD.org/src/commit/?id=5050fdb6b60e98e78c093f69b679d33fb9f5effd

commit 5050fdb6b60e98e78c093f69b679d33fb9f5effd
Author:     Mitchell Horne <mhorne@FreeBSD.org>
AuthorDate: 2024-10-30 18:16:28 +0000
Commit:     Mitchell Horne <mhorne@FreeBSD.org>
CommitDate: 2024-10-30 18:16:28 +0000

    plic: tweak macro argument names
    
    Be clearer in the intention. 'h' implies a hart ID, but these take
    logical CPU IDs instead. 'n' is acceptable, but '_irq' is clearer.
    
    Reviewed by:    br
    MFC after:      1 week
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D47133
---
 sys/riscv/riscv/plic.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/sys/riscv/riscv/plic.c b/sys/riscv/riscv/plic.c
index 5280ec0bb333..7ae68c00d78a 100644
--- a/sys/riscv/riscv/plic.c
+++ b/sys/riscv/riscv/plic.c
@@ -63,13 +63,13 @@
 #define	PLIC_CONTEXT_THRESHOLD	0x0U
 #define	PLIC_CONTEXT_CLAIM	0x4U
 
-#define	PLIC_PRIORITY(n)	(PLIC_PRIORITY_BASE + (n) * sizeof(uint32_t))
-#define	PLIC_ENABLE(sc, n, h)						\
-    (sc->contexts[h].enable_offset + ((n) / 32) * sizeof(uint32_t))
-#define	PLIC_THRESHOLD(sc, h)						\
-    (sc->contexts[h].context_offset + PLIC_CONTEXT_THRESHOLD)
-#define	PLIC_CLAIM(sc, h)						\
-    (sc->contexts[h].context_offset + PLIC_CONTEXT_CLAIM)
+#define	PLIC_PRIORITY(_irq)	(PLIC_PRIORITY_BASE + (_irq) * sizeof(uint32_t))
+#define	PLIC_ENABLE(_sc, _irq, _cpu)					\
+    (_sc->contexts[_cpu].enable_offset + ((_irq) / 32) * sizeof(uint32_t))
+#define	PLIC_THRESHOLD(_sc, _cpu)					\
+    (_sc->contexts[_cpu].context_offset + PLIC_CONTEXT_THRESHOLD)
+#define	PLIC_CLAIM(_sc, _cpu)						\
+    (_sc->contexts[_cpu].context_offset + PLIC_CONTEXT_CLAIM)
 
 static pic_disable_intr_t	plic_disable_intr;
 static pic_enable_intr_t	plic_enable_intr;