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@bugseng.com>
Signed-off-by: Simone Ballarin  <simone.ballarin@bugseng.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
This commit is contained in:
Maria Celeste Cesario authored and Jan Beulich committed 2023-12-18 15:21:42 +01:00
1 parent b736154e89
commit abdee7b1db
1 file changed
+2 -2
+2 -2
View File
@@ -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 )
{
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.