[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <75f843b2780fc3c3dcc1d0d8f78f2b955956316b.camel@xry111.site>
Date: Tue, 21 Mar 2023 20:30:36 +0800
From: Xi Ruoyao <xry111@...111.site>
To: Tianrui Zhao <zhaotianrui@...ngson.cn>,
Paolo Bonzini <pbonzini@...hat.com>
Cc: Huacai Chen <chenhuacai@...nel.org>,
WANG Xuerui <kernel@...0n.name>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
loongarch@...ts.linux.dev, linux-kernel@...r.kernel.org,
kvm@...r.kernel.org, Jens Axboe <axboe@...nel.dk>,
Mark Brown <broonie@...nel.org>,
Alex Deucher <alexander.deucher@....com>,
Oliver Upton <oliver.upton@...ux.dev>, maobibo@...ngson.cn
Subject: Re: [PATCH v4 05/29] LoongArch: KVM: Add vcpu related header files
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@...111.site>
School of Aerospace Science and Technology, Xidian University
Powered by blists - more mailing lists