|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 5/9] xen/x86: address violations of MISRA C:2012 Rule 11.8
From: Maria Celeste Cesario <maria.celeste.cesario@xxxxxxxxxxx>
The xen sources contain violations of MISRA C:2012 Rule 11.8 whose
headline states:
"A conversion shall not remove any const, volatile or _Atomic qualification
from the type pointed to by a pointer".
Add missing const qualifiers in casts.
Macro get_mb2_data returns values that are const-qualified.
The results are stored in const struct pointers, hence
there's no need to cast away the const qualifiers.
Signed-off-by: Maria Celeste Cesario <maria.celeste.cesario@xxxxxxxxxxx>
Signed-off-by: Simone Ballarin <simone.ballarin@xxxxxxxxxxx>
---
xen/arch/x86/boot/reloc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/xen/arch/x86/boot/reloc.c b/xen/arch/x86/boot/reloc.c
index df0bc710a7..77fdb2be05 100644
--- a/xen/arch/x86/boot/reloc.c
+++ b/xen/arch/x86/boot/reloc.c
@@ -300,8 +300,8 @@ static multiboot_info_t *mbi2_reloc(uint32_t mbi_in,
uint32_t video_out)
const struct vesa_mode_info *mi;
video = _p(video_out);
- ci = (void *)get_mb2_data(tag, vbe, vbe_control_info);
- mi = (void *)get_mb2_data(tag, vbe, vbe_mode_info);
+ ci = (const void *)get_mb2_data(tag, vbe, vbe_control_info);
+ mi = (const void *)get_mb2_data(tag, vbe, vbe_mode_info);
if ( ci->version >= 0x0200 && (mi->attrib & 0x9b) == 0x9b )
{
--
2.40.0
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |