From 09c2fe438da1dfc83f70d921b52240bea576615f Mon Sep 17 00:00:00 2001 From: Maria Celeste Cesario Date: Mon, 27 Nov 2023 15:16:43 +0100 Subject: [PATCH] x86/platform_hypercall: address violations of MISRA C:2012 Rule 11.8 Add const qualifier in cast that unnecessarily removes it to comply with Rule 11.8. The variable info is declared with a const qualified type. No functional change. Signed-off-by: Maria Celeste Cesario Signed-off-by: Simone Ballarin Acked-by: Andrew Cooper --- xen/arch/x86/platform_hypercall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/platform_hypercall.c b/xen/arch/x86/platform_hypercall.c index c1ab552c57..4dde71db27 100644 --- a/xen/arch/x86/platform_hypercall.c +++ b/xen/arch/x86/platform_hypercall.c @@ -364,7 +364,7 @@ ret_t do_platform_op( if ( length > info->edd_device_params.length ) length = info->edd_device_params.length; if ( copy_to_compat(op->u.firmware_info.u.disk_info.edd_params, - (u8 *)&info->edd_device_params, + (const uint8_t *)&info->edd_device_params, length) ) break; if ( copy_to_compat(op->u.firmware_info.u.disk_info.edd_params,