[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] x86/boot: address violations of MISRA C:2012 Rule 11.8
commit abdee7b1dbfe6ae98ab3e10102fba5804e5ac63e Author: Maria Celeste Cesario <maria.celeste.cesario@xxxxxxxxxxx> AuthorDate: Mon Dec 18 15:21:42 2023 +0100 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Mon Dec 18 15:21:42 2023 +0100 x86/boot: address violations of MISRA C:2012 Rule 11.8 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> Acked-by: Jan Beulich <jbeulich@xxxxxxxx> Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx> --- 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 ) { -- generated by git-patchbot for /home/xen/git/xen.git#master
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |