lkml.org 
[lkml]   [2023]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v4 05/29] LoongArch: KVM: Add vcpu related header files
From
Date
On Tue, 2023-03-21 at 11:56 +0800, Tianrui Zhao wrote:
> +/* Tracepoints for VM exits */
> +#define kvm_trace_symbol_exit_types                    \
> +       ({ KVM_TRACE_EXIT_IDLE,         "IDLE" },       \
> +       { KVM_TRACE_EXIT_CACHE,         "CACHE" },      \
> +       { KVM_TRACE_EXIT_SIGNAL,        "Signal" })

Looks like there shouldn't be "(" and ")".

> +#define kvm_trace_symbol_aux_op \
> + ({ KVM_TRACE_AUX_RESTORE, "restore" }, \
> + { KVM_TRACE_AUX_SAVE, "save" }, \
> + { KVM_TRACE_AUX_ENABLE, "enable" }, \
> + { KVM_TRACE_AUX_DISABLE, "disable" }, \
> + { KVM_TRACE_AUX_DISCARD, "discard" })

Likewise.

See the test robot report, and https://godbolt.org/z/bE8q97z1o.

The lesson: if a text book claims "you should always wrap the content of
a macro in ( ... )", we should burn it in the fire! :)

--
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University

\
 
 \ /
  Last update: 2023-03-27 01:10    [W:2.946 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site