git: f7427f890c7f - main - ixl: Avoid a signed PHY capability shift

Kevin Bowling <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.src
Message-ID <6a7b8d5a.37074.7325d0ad__24504.244867579$1786482248$gmane$org@gitrepo.freebsd.org>
The branch main has been updated by kbowling:

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

commit f7427f890c7f34d0842a35eb9df814adad11a95a
Author:     Kevin Bowling <[email protected]>
AuthorDate: 2026-08-11 19:36:33 +0000
Commit:     Kevin Bowling <[email protected]>
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, ">");
 	}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.