git: cd04887b9569 - main - kern/intr: change ->ie_irq to unsigned

From: Warner Losh <imp_at_FreeBSD.org>
Date: Thu, 09 May 2024 23:20:44 UTC
The branch main has been updated by imp:

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

commit cd04887b9569494496e25bdda241cbdb947f6b6f
Author:     Elliott Mitchell <ehem+freebsd@m5p.com>
AuthorDate: 2024-05-09 23:04:34 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2024-05-09 23:14:33 +0000

    kern/intr: change ->ie_irq to unsigned
    
    All architecture implementations actually want this to be unsigned.
    INTRNG the equivalent is overtly unsigned.  x86 and PowerPC merely avoid
    the need to explicitly convert at several points.
    
    Reviewed by: imp
    Pull Request: https://github.com/freebsd/freebsd-src/pull/1126
---
 sys/kern/kern_intr.c | 2 +-
 sys/sys/interrupt.h  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/sys/kern/kern_intr.c b/sys/kern/kern_intr.c
index 912504f8b1d0..928bfabb5c61 100644
--- a/sys/kern/kern_intr.c
+++ b/sys/kern/kern_intr.c
@@ -276,7 +276,7 @@ intr_event_update(struct intr_event *ie)
 }
 
 int
-intr_event_create(struct intr_event **event, void *source, int flags, int irq,
+intr_event_create(struct intr_event **event, void *source, int flags, u_int irq,
     void (*pre_ithread)(void *), void (*post_ithread)(void *),
     void (*post_filter)(void *), int (*assign_cpu)(void *, int),
     const char *fmt, ...)
diff --git a/sys/sys/interrupt.h b/sys/sys/interrupt.h
index 9fa0adf9139f..f3c67e43d428 100644
--- a/sys/sys/interrupt.h
+++ b/sys/sys/interrupt.h
@@ -121,7 +121,7 @@ struct intr_event {
 	int		ie_count;	/* Loop counter. */
 	int		ie_warncnt;	/* Rate-check interrupt storm warns. */
 	struct timeval	ie_warntm;
-	int		ie_irq;		/* Physical irq number if !SOFT. */
+	u_int		ie_irq;		/* Physical irq number if !SOFT. */
 	int		ie_cpu;		/* CPU this event is bound to. */
 	volatile int	ie_phase;	/* Switched to establish a barrier. */
 	volatile int	ie_active[2];	/* Filters in ISR context. */
@@ -175,7 +175,7 @@ struct _cpuset;
 int	intr_event_bind_ithread_cpuset(struct intr_event *ie,
 	    struct _cpuset *mask);
 int	intr_event_create(struct intr_event **event, void *source,
-	    int flags, int irq, void (*pre_ithread)(void *),
+	    int flags, u_int irq, void (*pre_ithread)(void *),
 	    void (*post_ithread)(void *), void (*post_filter)(void *),
 	    int (*assign_cpu)(void *, int), const char *fmt, ...)
 	    __printflike(9, 10);