Re: [kvm-unit-tests PATCH v2 3/3] arm/debugtest: test access to the debug registers for guest

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Radim Krčmář <rkrcmar@xxxxxxxxxx> writes:

> 2017-05-18 17:02+0100, Alex Bennée:
>> Currently this is a fairly simple test that reads the debug register
>> state and attempts to write/read-back the watchpoint and breakpoint
>> registers.
>>
>> Signed-off-by: Alex Bennée <alex.bennee@xxxxxxxxxx>
>> ---
>> diff --git a/arm/debugtest.c b/arm/debugtest.c
>> @@ -0,0 +1,671 @@
>> +
>> +static void read_dbgb(int n, struct dbgregs *array)
>> +{
>> +	switch (n-1) {
>> +	case 15:
>> +		array[15].dbgbcr = read_debug_bcr(15);
>> +		array[15].dbgbvr = read_debug_bvr(15);
>
> Newer GCC (I have 7.0.1) does not like a fall through without a comment:
>
>   arm/debugtest.c: In function ‘read_dbgb’:
>   arm/debugtest.c:144:20: error: this statement may fall through [-Werror=implicit-fallthrough=]
>      array[15].dbgbvr = read_debug_bvr(15);
>   arm/debugtest.c:145:2: note: here
>     case 14:
>     ^~~~
>
> I managed to compile with
>
>   +		/* fall through */
>
> everywhere.

And here was I thinking checkpatch was being overly anal. OK I shall fix
that up for the next version.

>
>> +	case 14:
>> +		array[14].dbgbcr = read_debug_bcr(14);
>> +		array[14].dbgbvr = read_debug_bvr(14);


--
Alex Bennée



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux