]> xenbits.xensource.com Git - xen.git/commit
x86/MCE-telem: adjust cookie definition
authorJan Beulich <jbeulich@suse.com>
Thu, 20 Feb 2025 12:50:19 +0000 (13:50 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 20 Feb 2025 12:50:19 +0000 (13:50 +0100)
commit75fc9e692c602c528f82894a7a71ed0a3b46a51a
treef30f1d4aea3eeda3c89cc0ee85110fa641ef7802
parentc989ff614f6bad48b3bd4b32694f711b31c7b2d6
x86/MCE-telem: adjust cookie definition

struct mctelem_ent is opaque outside of mcetelem.c; the cookie
abstraction exists - afaict - just to achieve this opaqueness. Then it
is irrelevant though which kind of pointer mctelem_cookie_t resolves to.
IOW we can as well use struct mctelem_ent there, allowing to remove the
casts from COOKIE2MCTE() and MCTE2COOKIE(). Their removal addresses
Misra C:2012 rule 11.2 ("Conversions shall not be performed between a
pointer to an incomplete type and any other type") violations.

No functional change intended.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Release-Acked-By: Oleksii Kurochko<oleksii.kurochko@gmail.com>
xen/arch/x86/cpu/mcheck/mctelem.c
xen/arch/x86/cpu/mcheck/mctelem.h