Page MenuHomeFreeBSD

ql*_def.h: fix QL_ALIGN parenthesization
ClosedPublic

Authored by rlibby on Oct 14 2017, 7:52 PM.
Tags
None
Referenced Files
F151185228: D12673.id33991.diff
Mon, Apr 6, 4:25 PM
F151166391: D12673.id34119.diff
Mon, Apr 6, 1:20 PM
Unknown Object (File)
Thu, Apr 2, 8:11 PM
Unknown Object (File)
Sun, Mar 29, 12:32 PM
Unknown Object (File)
Sun, Mar 29, 9:50 AM
Unknown Object (File)
Sat, Mar 28, 8:16 PM
Unknown Object (File)
Tue, Mar 24, 4:42 AM
Unknown Object (File)
Tue, Mar 24, 2:11 AM
Subscribers
None

Details

Summary

QL_ALIGN is a set of copies of roundup2, but it was missing an outer set of parentheses, which began to matter with r324538. Now, fully copy the parenthesization of roundup2.


To add a little more color, I believe r324538 is broken in ql_capture_drvr_state without this. Expression like this

	hdr->rx_state_offset = hdr->tx_state_offset + QL_ALIGN(size, 64);

will yield the wrong result.

The gcc build is also currently broken because of the resulting warning.

Test Plan

buildkernel

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Looks good to me. Thanks for the fix.

This revision is now accepted and ready to land.Oct 18 2017, 5:59 PM
This revision was automatically updated to reflect the committed changes.