From: Jan Beulich <jbeulich@suse.com>
To: Igor Druzhinin <igor.druzhinin@citrix.com>
Cc: Juergen Gross <jgross@suse.com>,
xen-devel@lists.xenproject.org, roger.pau@citrix.com, wl@xen.org,
andrew.cooper3@citrix.com
Subject: Re: [Xen-devel] [PATCH for-4.13 v2 2/3] x86/efi: properly handle 0 in pixel reserved bitmask
Date: Thu, 10 Oct 2019 09:13:08 +0200 [thread overview]
Message-ID: <4f9287bd-1cdf-915b-2d8e-7fb7adbe3f1a@suse.com> (raw)
In-Reply-To: <1570653603-9889-3-git-send-email-igor.druzhinin@citrix.com>
On 09.10.2019 22:40, Igor Druzhinin wrote:
> --- a/xen/arch/x86/efi/efi-boot.h
> +++ b/xen/arch/x86/efi/efi-boot.h
> @@ -528,9 +528,15 @@ static void __init efi_arch_video_init(EFI_GRAPHICS_OUTPUT_PROTOCOL *gop,
> bpp = set_color(mode_info->PixelInformation.BlueMask, bpp,
> &vga_console_info.u.vesa_lfb.blue_pos,
> &vga_console_info.u.vesa_lfb.blue_size);
> - bpp = set_color(mode_info->PixelInformation.ReservedMask, bpp,
> - &vga_console_info.u.vesa_lfb.rsvd_pos,
> - &vga_console_info.u.vesa_lfb.rsvd_size);
> + if ( !mode_info->PixelInformation.ReservedMask )
> + {
> + vga_console_info.u.vesa_lfb.rsvd_pos = 0;
> + vga_console_info.u.vesa_lfb.rsvd_size = 0;
> + }
> + else
> + bpp = set_color(mode_info->PixelInformation.ReservedMask, bpp,
> + &vga_console_info.u.vesa_lfb.rsvd_pos,
> + &vga_console_info.u.vesa_lfb.rsvd_size);
Why not simply
if ( mode_info->PixelInformation.ReservedMask )
bpp = set_color(mode_info->PixelInformation.ReservedMask, bpp,
&vga_console_info.u.vesa_lfb.rsvd_pos,
&vga_console_info.u.vesa_lfb.rsvd_size);
? There's nothing I can see which might have changed
vga_console_info.u.vesa_lfb.rsvd_{pos,size} from its zero-initialized
value. With this adjustment (which could be done while committing) or
with a reason supplied for the more complex code
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2019-10-10 7:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-09 20:40 [Xen-devel] [PATCH for-4.13 v2 0/3] EFI GOP fixes Igor Druzhinin
2019-10-09 20:40 ` [Xen-devel] [PATCH for-4.13 v2 1/3] efi/boot: add missing pointer dereference in set_color Igor Druzhinin
2019-10-10 7:07 ` Jan Beulich
2019-10-09 20:40 ` [Xen-devel] [PATCH for-4.13 v2 2/3] x86/efi: properly handle 0 in pixel reserved bitmask Igor Druzhinin
2019-10-10 7:13 ` Jan Beulich [this message]
2019-10-10 12:23 ` Igor Druzhinin
2019-10-09 20:40 ` [Xen-devel] [PATCH for-4.13 v2 3/3] efi/boot: make sure graphics mode is set while booting through MB2 Igor Druzhinin
2019-10-10 7:14 ` Jan Beulich
2019-10-10 7:56 ` [Xen-devel] [PATCH for-4.13 v2 0/3] EFI GOP fixes Jürgen Groß
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4f9287bd-1cdf-915b-2d8e-7fb7adbe3f1a@suse.com \
--to=jbeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=igor.druzhinin@citrix.com \
--cc=jgross@suse.com \
--cc=roger.pau@citrix.com \
--cc=wl@xen.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).