Page MenuHomeFreeBSD

xgbe: use standard rounddown_pow_of_two
ClosedPublic

Authored by dougm on Jul 18 2024, 5:28 PM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 18 2024, 4:53 PM
Unknown Object (File)
Oct 9 2024, 12:03 PM
Unknown Object (File)
Sep 30 2024, 8:58 PM
Unknown Object (File)
Sep 30 2024, 1:38 PM
Unknown Object (File)
Sep 21 2024, 10:11 AM
Unknown Object (File)
Sep 3 2024, 12:39 AM
Unknown Object (File)
Aug 29 2024, 7:17 PM
Unknown Object (File)
Aug 29 2024, 4:59 AM
Subscribers

Details

Summary

This file has an implementation of __rounddown_pow_of_two which is essentially the same as rounddown_pow_of_two in libkern, except written in a way that triggers coverity warnings:

CID 114616:  Integer handling issues  (INTEGER_OVERFLOW)
Expression "fls_long(n) - 1U", which is equal to 4294967295, where "fls_long(n)" is known to be equal to 0, underflows the type that receives it, an unsigned integer 32 bits wide.

Use the standard implementation.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

dougm requested review of this revision.Jul 18 2024, 5:28 PM
dougm created this revision.
This revision is now accepted and ready to land.Jul 18 2024, 6:26 PM

Assuming it came directly from the commit log message, the title should start with "axgbe:".

This revision was automatically updated to reflect the committed changes.