[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CY8PR11MB7134A69052C691C9B2812F2189412@CY8PR11MB7134.namprd11.prod.outlook.com>
Date: Sat, 19 Oct 2024 08:30:04 +0000
From: "Zhuo, Qiuxu" <qiuxu.zhuo@...el.com>
To: "H. Peter Anvin" <hpa@...or.com>, "Mehta, Sohil" <sohil.mehta@...el.com>,
"Luck, Tony" <tony.luck@...el.com>, "bp@...en8.de" <bp@...en8.de>
CC: "tglx@...utronix.de" <tglx@...utronix.de>, "dave.hansen@...ux.intel.com"
<dave.hansen@...ux.intel.com>, "mingo@...hat.com" <mingo@...hat.com>,
"x86@...nel.org" <x86@...nel.org>, "linux-edac@...r.kernel.org"
<linux-edac@...r.kernel.org>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v2 08/10] x86/mce: Remove the redundant zeroing
assignments
> From: H. Peter Anvin <hpa@...or.com>
> [...]
>
> 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
Powered by blists - more mailing lists