Commit e2b02d38 authored by Ben Horgan's avatar Ben Horgan Committed by Yury Norov
Browse files

bitfield: Ensure the return values of helper functions are checked



As type##_replace_bits() has no side effects it is only useful if its
return value is checked. Add __must_check to enforce this usage. To have
the bits replaced in-place typep##_replace_bits() can be used instead.

Although, type_##_get_bits() and type_##_encode_bits() are harder to misuse
they are still only useful if the return value is checked. For
consistency, also add __must_check to these.

Signed-off-by: default avatarBen Horgan <ben.horgan@arm.com>
Signed-off-by: default avatarYury Norov (NVIDIA) <yury.norov@gmail.com>
parent dcb23e18
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment