mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
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:
1 parent
b736154e89
commit
abdee7b1db
1 file changed
+2
-2
@@ -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 )
|
||||
{
|
||||
|
||||