ddi_ffs(9f)/ddi_fls(9f) are 64-bit aware
The ddi_ffs(9f) man page considers both ddi_ffs() and ddi_fls() as 32-bit functions only:
PARAMETERS mask A 32-bit argument value to search through. ... RETURN VALUES 0 No bits are set in mask. N Bit N is the least significant (ddi_ffs) or most significant (ddi_fls) bit set in mask. Bits are numbered from 1 to 32, with bit 1 being the least significant bit position and bit 32 the most significant position.
But the implementation shows that both functions are 64-bit aware (they do accept 64-bit wide parameters, and return values up to 64 on 64-bit platforms). This needs to be carefully verified and the man page should be updated eventually.
Updated by Electric Monk 11 months ago
- Status changed from New to Closed
- % Done changed from 0 to 100
commit dca2b4edbfdf8b595d031a5a2e7eaf98738f5055 Author: Robert Mustacchi <email@example.com> Date: 2021-01-25T15:30:51.000Z 5750 ddi_ffs(9f)/ddi_fls(9f) are 64-bit aware Reviewed by: Richard Lowe <firstname.lastname@example.org> Reviewed by: Andy Fiddaman <email@example.com> Approved by: Gordon Ross <firstname.lastname@example.org>