From: Arvind Sankar <nivedita@alum.mit.edu>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>,
Arvind Sankar <nivedita@alum.mit.edu>,
Ard Biesheuvel <ardb@kernel.org>,
linux-efi <linux-efi@vger.kernel.org>
Subject: Re: [PATCH] efi/earlycon: Fix write-combine mapping on x86
Date: Wed, 11 Dec 2019 12:37:46 -0500 [thread overview]
Message-ID: <20191211173746.GA220404@rani.riverdale.lan> (raw)
In-Reply-To: <20191211110435.GP32742@smile.fi.intel.com>
On Wed, Dec 11, 2019 at 01:04:35PM +0200, Andy Shevchenko wrote:
>
> Make sense.
> One comment below.
>
> > > - if (pgprot_val(fb_prot) == pgprot_val(PAGE_KERNEL))
> > > - efi_fb = memremap(fb_base, screen_info.lfb_size, MEMREMAP_WB);
> > > - else
> > > - efi_fb = memremap(fb_base, screen_info.lfb_size, MEMREMAP_WC);
> > > + efi_fb = memremap(fb_base, screen_info.lfb_size,
> > > + fb_wb ? MEMREMAP_WB : MEMREMAP_WC);
>
> I would really like to keep the style with if-else.
>
I edited this back to the if/else and then realized why I chose the
ternary. It makes it easier for the reader to see that the only thing
that depends on fb_wb is the MEMREMAP_ flag that gets used, while with
the if/else the reader needs to compare both function invocations to see
that that's the only difference.
It's not a big deal, so if you still prefer the if/else I'll revise the
patch.
next prev parent reply other threads:[~2019-12-11 17:37 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-10 23:24 [PATCH] efi/earlycon: Fix write-combine mapping on x86 Arvind Sankar
2019-12-11 8:22 ` Ard Biesheuvel
2019-12-11 11:04 ` Andy Shevchenko
2019-12-11 14:00 ` Ard Biesheuvel
2019-12-11 15:50 ` Arvind Sankar
2019-12-11 17:37 ` Arvind Sankar [this message]
2019-12-11 18:03 ` Andy Shevchenko
2019-12-11 18:06 ` Ard Biesheuvel
2019-12-11 20:00 ` Andy Shevchenko
2019-12-12 16:56 ` Arvind Sankar
2019-12-12 16:57 ` Ard Biesheuvel
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=20191211173746.GA220404@rani.riverdale.lan \
--to=nivedita@alum.mit.edu \
--cc=andriy.shevchenko@linux.intel.com \
--cc=ard.biesheuvel@linaro.org \
--cc=ardb@kernel.org \
--cc=linux-efi@vger.kernel.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