lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <554dc19a-cd94-0f94-7e81-9cdc137dac7d@loongson.cn>
Date:   Wed, 22 Mar 2023 09:34:46 +0800
From:   Tianrui Zhao <zhaotianrui@...ngson.cn>
To:     Xi Ruoyao <xry111@...111.site>, 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



在 2023年03月21日 20:30, Xi Ruoyao 写道:
> 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! :)
>

Thanks, it should remove the "()" statement in the macros. The reason I 
did this before because an error was triggered when I use checkpatch.py 
to check it,  and now I know this error can be ignored.

Thanks
Tianrui Zhao

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ