git: f7427f890c7f - main - ixl: Avoid a signed PHY capability shift
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 11 Aug 2026 21:00:10 UTC
The branch main has been updated by kbowling:
URL: https://cgit.FreeBSD.org/src/commit/?id=f7427f890c7f34d0842a35eb9df814adad11a95a
commit f7427f890c7f34d0842a35eb9df814adad11a95a
Author: Kevin Bowling <kbowling@FreeBSD.org>
AuthorDate: 2026-08-11 19:36:33 +0000
Commit: Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2026-08-11 20:59:33 +0000
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
---
sys/dev/ixl/ixl_pf_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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, ">");
}