From: Jordan Justen <jordan.l.justen@intel.com>
To: Laszlo Ersek <lersek@redhat.com>,
edk2-devel-01 <edk2-devel@lists.01.org>
Subject: Re: [PATCH 11/12] OvmfPkg/SmmControl2Dxe: save fw_cfg boot script with QemuFwCfgS3Lib
Date: Fri, 10 Mar 2017 02:14:45 -0800 [thread overview]
Message-ID: <148914088572.26490.12215430240628550434@jljusten-skl> (raw)
In-Reply-To: <20170223014814.10937-12-lersek@redhat.com>
On 2017-02-22 17:48:13, Laszlo Ersek wrote:
> + //
> + ScratchBuffer->Features = mSmiFeatures;
> + Status = QemuFwCfgS3WriteBytes (mRequestedFeaturesItem,
I noticed a fair amount of function calls where the first args are
appearing on the first line, and then the rest appear on subsequent
lines indented two spaces.
> + sizeof ScratchBuffer->Features);
> + if (RETURN_ERROR (Status)) {
> + goto FatalError;
> + }
> +
I can't say that the coding style prohibits this, but it does seem odd
looking. I would expect to see:
[1]
Status = QemuFwCfgS3WriteBytes (
mRequestedFeaturesItem,
sizeof ScratchBuffer->Features
);
The coding style examples look like this:
Status = QemuFwCfgS3WriteBytes (
mRequestedFeaturesItem,
sizeof ScratchBuffer->Features
);
But this looks less like what I'm used to actually seeing in EDK II.
(Look at DXE Core, for example. It looks like [1].)
I personally think this is okay to save a line, but it doesn't seem to
follow the coding style doc:
Status = QemuFwCfgS3WriteBytes (
mRequestedFeaturesItem,
sizeof ScratchBuffer->Features);
Now, we all know EDK II has a style of it's own, but outide EDK II, I
might expect something like:
Status = QemuFwCfgS3WriteBytes(mRequestedFeaturesItem,
sizeof ScratchBuffer->Features);
Which once again shows arguements on subsequent lines are lined up.
Based on that, I think [1] is the best style for EDK II code.
-Jordan
next prev parent reply other threads:[~2017-03-10 10:14 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-23 1:48 [PATCH 00/12] ArmVirtPkg, OvmfPkg: factor out QemuFwCfgS3Lib Laszlo Ersek
2017-02-23 1:48 ` [PATCH 01/12] OvmfPkg: introduce QemuFwCfgS3Lib class Laszlo Ersek
2017-02-23 1:48 ` [PATCH 02/12] OvmfPkg/QemuFwCfgS3Lib: add initial Base Null library instance Laszlo Ersek
2017-02-23 1:48 ` [PATCH 03/12] OvmfPkg/QemuFwCfgS3Lib: add initial PEI and DXE fw_cfg library instances Laszlo Ersek
2017-02-23 1:48 ` [PATCH 04/12] ArmVirtPkg: resolve QemuFwCfgS3Lib Laszlo Ersek
2017-02-23 11:18 ` Ard Biesheuvel
2017-02-23 1:48 ` [PATCH 05/12] OvmfPkg: " Laszlo Ersek
2017-02-23 1:48 ` [PATCH 06/12] ArmVirtPkg, OvmfPkg: retire QemuFwCfgS3Enabled() from QemuFwCfgLib Laszlo Ersek
2017-02-23 11:18 ` Ard Biesheuvel
2017-02-23 1:48 ` [PATCH 07/12] OvmfPkg/QemuFwCfgS3Lib: add boot script opcode generation APIs to libclass Laszlo Ersek
2017-03-10 9:58 ` Jordan Justen
2017-03-10 19:14 ` Laszlo Ersek
2017-02-23 1:48 ` [PATCH 08/12] OvmfPkg/QemuFwCfgS3Lib: implement opcode APIs for Base Null instance Laszlo Ersek
2017-02-23 1:48 ` [PATCH 09/12] OvmfPkg/QemuFwCfgS3Lib: implement opcode APIs for PEI fw_cfg instance Laszlo Ersek
2017-02-23 1:48 ` [PATCH 10/12] OvmfPkg/QemuFwCfgS3Lib: implement opcode APIs for DXE " Laszlo Ersek
2017-02-23 1:48 ` [PATCH 11/12] OvmfPkg/SmmControl2Dxe: save fw_cfg boot script with QemuFwCfgS3Lib Laszlo Ersek
2017-03-10 10:14 ` Jordan Justen [this message]
2017-03-10 19:36 ` Laszlo Ersek
2017-03-13 21:32 ` Jordan Justen
2017-03-13 22:12 ` Laszlo Ersek
2017-03-13 22:43 ` Jordan Justen
2017-03-14 1:58 ` Kinney, Michael D
2017-03-14 13:48 ` Laszlo Ersek
2017-03-14 20:38 ` Laszlo Ersek
2017-02-23 1:48 ` [PATCH 12/12] OvmfPkg/AcpiPlatformDxe: " Laszlo Ersek
2017-02-23 16:59 ` [PATCH 00/12] ArmVirtPkg, OvmfPkg: factor out QemuFwCfgS3Lib Jordan Justen
2017-02-23 17:22 ` Laszlo Ersek
2017-03-06 9:19 ` Jordan Justen
2017-03-06 18:41 ` Laszlo Ersek
2017-03-10 9:55 ` Jordan Justen
2017-03-10 20:16 ` Laszlo Ersek
2017-03-11 3:17 ` Laszlo Ersek
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-list 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=148914088572.26490.12215430240628550434@jljusten-skl \
--to=devel@edk2.groups.io \
/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