Message ID | 20170227050912.28824-7-haozhong.zhang@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
>>> On 27.02.17 at 06:09, <haozhong.zhang@intel.com> wrote: > The current production build works fine even though those ASSERT's are > violated. This - without any evidence - is rather weak an argument. Code inspection, otoh, pretty clearly tells us the ASSERT()s aren't needed, as there is no dependency on the asserted expressions to be true. Therefore, while the change itself is fine, may I ask for a better commit message? Jan
diff --git a/xen/arch/x86/cpu/mcheck/mce.c b/xen/arch/x86/cpu/mcheck/mce.c index 5a7e2ba..a42cabd 100644 --- a/xen/arch/x86/cpu/mcheck/mce.c +++ b/xen/arch/x86/cpu/mcheck/mce.c @@ -1621,9 +1621,6 @@ static enum mce_result mce_action(const struct cpu_user_regs *regs, handlers = mce_uhandlers; } - /* At least a default handler should be registerd */ - ASSERT(handler_num); - local_mi = (struct mc_info*)mctelem_dataptr(mctc); x86_mcinfo_lookup(mic, local_mi, MC_TYPE_GLOBAL); if (mic == NULL) { @@ -1656,7 +1653,6 @@ static enum mce_result mce_action(const struct cpu_user_regs *regs, break; } } - ASSERT(i != handler_num); } return worst_result;
The current production build works fine even though those ASSERT's are violated. Remove them to make the debug build work as well. Signed-off-by: Haozhong Zhang <haozhong.zhang@intel.com> --- Cc: Christoph Egger <chegger@amazon.de> Cc: Jan Beulich <jbeulich@suse.com> Cc: Andrew Cooper <andrew.cooper3@citrix.com> Changes since v1: * Remove those ASSERT's rather than making them Intel-only. --- xen/arch/x86/cpu/mcheck/mce.c | 4 ---- 1 file changed, 4 deletions(-)