RE: [PATCH v2 08/10] x86/mce: Remove the redundant zeroing assignments

From: Zhuo, Qiuxu
Date: Sat Oct 19 2024 - 04:30:30 EST


> From: H. Peter Anvin <hpa@xxxxxxxxx>
> [...]
>
> Keep in mind that usually the compiler will remove redundant assignments,
> and if they are too obscure for the compiler to discover, they are probably too
> subtle for programmers to not introduce bugs in the future ...

Thanks, H.Peter.

This is a good tip to quickly check whether a cleanup of removing unnecessary
assignments changes the function. If there is no difference in the text before and
after the cleanup, then it's OK. Otherwise, the cleanup probably changes the
function in an unintended way.

-Qiuxu