Date: Mon, 10 May 2021 13:49:33 GMT From: Mark Johnston <markj@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 8a4f990338fe - stable/13 - kern/intr: declare interrupt vectors unsigned Message-ID: <202105101349.14ADnXFg026494@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8a4f990338febd281ec328b31b86a8fb173756f2 commit 8a4f990338febd281ec328b31b86a8fb173756f2 Author: Elliott Mitchell <ehem+freebsd@m5p.com> AuthorDate: 2021-05-03 16:50:17 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2021-05-10 13:36:20 +0000 kern/intr: declare interrupt vectors unsigned These should never get values large enough for sign to matter, but one of them becoming negative could cause problems. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D29327 (cherry picked from commit a3c7da3d08eec921f16a32c4c716b896385264e9) --- sys/kern/subr_intr.c | 8 ++++---- sys/sys/intr.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/kern/subr_intr.c b/sys/kern/subr_intr.c index 7f99d194e971..df6bf9e63ba0 100644 --- a/sys/kern/subr_intr.c +++ b/sys/kern/subr_intr.c @@ -143,7 +143,7 @@ static bool irq_assign_cpu = false; #endif #endif -int intr_nirq = NIRQ; +u_int intr_nirq = NIRQ; SYSCTL_UINT(_machdep, OID_AUTO, nirq, CTLFLAG_RDTUN, &intr_nirq, 0, "Number of IRQs"); @@ -166,7 +166,7 @@ static void intr_map_copy_map_data(u_int res_id, device_t *dev, intptr_t *xref, static void intr_irq_init(void *dummy __unused) { - int intrcnt_count; + u_int intrcnt_count; SLIST_INIT(&pic_list); mtx_init(&pic_list_lock, "intr pic list", NULL, MTX_DEF); @@ -1576,8 +1576,8 @@ struct intr_map_entry /* XXX Convert irq_map[] to dynamicaly expandable one. */ static struct intr_map_entry **irq_map; -static int irq_map_count; -static int irq_map_first_free_idx; +static u_int irq_map_count; +static u_int irq_map_first_free_idx; static struct mtx irq_map_lock; static struct intr_irqsrc * diff --git a/sys/sys/intr.h b/sys/sys/intr.h index c922b10f3368..b373a6f23bf0 100644 --- a/sys/sys/intr.h +++ b/sys/sys/intr.h @@ -165,6 +165,6 @@ u_long * intr_ipi_setup_counters(const char *name); #endif -extern int intr_nirq; /* number of IRQs on intrng platforms */ +extern u_int intr_nirq; /* number of IRQs on intrng platforms */ #endif /* _SYS_INTR_H */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202105101349.14ADnXFg026494>