[Mesa-dev] [PATCH] util: add new ASSERT_BITFIELD_SIZE() macro (v3)

Brian Paul brianp at vmware.com
Fri Nov 17 15:54:33 UTC 2017


On 11/17/2017 04:59 AM, Eric Engestrom wrote:
> On Thursday, 2017-11-16 11:17:57 -0700, Brian Paul wrote:
>> For checking that bitfields are large enough to hold the largest
>> expected value.
>>
>> v2: move into existing util/macros.h header where STATIC_ASSERT() lives.
>> v3: add MAYBE_UNUSED to variable declaration
>
> Good shout on the MAYBE_UNUSED :)
> Reviewed-by: Eric Engestrom <eric.engestrom at imgtec.com>
>
> Could you add one (or more) user of this macro as well? I don't like
> introducing unused functions/macros, it's too easy to forget about them
> and let them bitrot (although it's unlikely this one would bitrot).

It's used by the patches immediately after this one, and I intend to use 
it elsewhere...

-Brian




More information about the mesa-dev mailing list