ACK: [PATCH] lib: framework: pack fwts_framework_flags to ensure it is a 32 bit int

Colin Ian King colin.king at canonical.com
Wed Nov 11 18:07:37 UTC 2015


On 11/11/15 18:00, Al Stone wrote:
> On 11/11/2015 12:23 AM, ivanhu wrote:
>>
>>
>> On 2015年11月09日 21:20, Colin King wrote:
>>> From: Colin Ian King <colin.king at canonical.com>
>>>
>>> recent commit c4091edad369beb12b451a0ab5f233fcda05a5f3
>>> ("Add in the notion of ACPI compliance tests.") make the fwts_framework_flags
>>> enum into a 64 bit integer which now breaks 32 bit builds:
>>>
>>> fwts_framework.c: In function 'fwts_framework_test_add':
>>> fwts_framework.c:155:4: error: format '%lx' expects argument of type
>>>     'long unsigned int', but argument 4 has type 'long long unsigned int'
>>>     [-Werror=format]
>>>
>>> Since we have a bunch of spare bits in this enum, re-orginaise the bits to
>>> pack this into a 32 bit enum.  Once we've used all these bits up we should
>>> consider making the enum into a 64 bit integer, but for now, try to save
>>> a few bytes by keeping this a 32 bit integer.
>>>
>>> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> 
> Hrm.  As submitter of the original commit, is there a set of recommend test
> scenarios to run before submitting patches?  I tried it on x86 and ARM, but
> it simply did not occur to me to try 32-bit.

I generally develop on x86 64 bit platforms, then sanity check on 32 bit
and arm64 if I have access to this (emulator or H/W).  There are a bunch
of regression tests too using:

make check

I then batch up patches and occasionally automatically check the code
using CoverityScan too just to catch any errors.

Colin

> 
> If there is also a repository of ACPI tables to test against, that would be
> incredibly helpful, too.
> 




More information about the fwts-devel mailing list