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.

MFC after:	1 week
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D29327
This commit is contained in:
Elliott Mitchell 2021-05-03 12:50:17 -04:00 committed by Mark Johnston
parent 1d712c0537
commit a3c7da3d08
2 changed files with 5 additions and 5 deletions

View File

@ -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 *

View File

@ -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 */