aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Bowling <kbowling@FreeBSD.org>2026-08-11 19:36:33 +0000
committerKevin Bowling <kbowling@FreeBSD.org>2026-08-11 20:59:33 +0000
commitf7427f890c7f34d0842a35eb9df814adad11a95a (patch)
treeccbf7a3aa28439a859d3720b4894707d5120b00c
parent392fbdcf2232f12cb973d00ae931740c72d970c6 (diff)
ixl: Avoid a signed PHY capability shift
The PHY capability display examines all 32 bits of the firmware bitmap. Use an unsigned value so examining bit 31 does not shift a signed integer into its sign bit. MFC after: 2 weeks
-rw-r--r--sys/dev/ixl/ixl_pf_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/ixl/ixl_pf_main.c b/sys/dev/ixl/ixl_pf_main.c
index 3dea1c14ddd6..edc3581bd53f 100644
--- a/sys/dev/ixl/ixl_pf_main.c
+++ b/sys/dev/ixl/ixl_pf_main.c
@@ -3547,7 +3547,7 @@ ixl_sysctl_phy_abilities(SYSCTL_HANDLER_ARGS)
if (abilities.phy_type != 0) {
sbuf_printf(buf, "<");
for (int i = 0; i < 32; i++)
- if ((1 << i) & abilities.phy_type)
+ if ((1U << i) & abilities.phy_type)
sbuf_printf(buf, "%s,", ixl_phy_type_string(i, false));
sbuf_printf(buf, ">");
}