x86/MCE: adjust ID2COOKIE() for Misra C:2012 rule 11.2

... ("Conversions shall not be performed between a pointer to an
incomplete type and any other type"): Add an intermediate cast to void *.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
This commit is contained in:
Jan Beulich committed 2026-05-19 10:59:46 +02:00
1 parent f2c7c9004a
commit 5e1f756fb7
1 file changed
+2 -1
+2 -1
View File
@@ -1264,7 +1264,8 @@ static void cf_check __maybe_unused x86_mc_mceinject(void *data)
#if BITS_PER_LONG == 64
#define ID2COOKIE(id) ((mctelem_cookie_t)(id))
/* Two layers of casting to cover Misra C:2012 rule 11.2. */
#define ID2COOKIE(id) ((mctelem_cookie_t)(void *)(id))
#define COOKIE2ID(c) ((uint64_t)(c))
#elif defined(BITS_PER_LONG)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.