Page MenuHomeFreeBSD

xgbe: use standard rounddown_pow_of_two
ClosedPublic

Authored by dougm on Jul 18 2024, 5:28 PM.
Tags
None
Referenced Files
F109469689: D46022.diff
Wed, Feb 5, 11:54 AM
Unknown Object (File)
Dec 4 2024, 2:20 AM
Unknown Object (File)
Dec 4 2024, 2:10 AM
Unknown Object (File)
Dec 4 2024, 2:10 AM
Unknown Object (File)
Nov 30 2024, 1:59 PM
Unknown Object (File)
Nov 19 2024, 9:28 PM
Unknown Object (File)
Oct 18 2024, 4:53 PM
Unknown Object (File)
Oct 9 2024, 12:03 PM
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

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.