From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id E79128036C for ; Mon, 13 Mar 2017 15:43:37 -0700 (PDT) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Mar 2017 15:43:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,161,1486454400"; d="scan'208";a="834201408" Received: from yjiang5-mobl.amr.corp.intel.com (HELO localhost) ([10.254.127.228]) by FMSMGA003.fm.intel.com with ESMTP; 13 Mar 2017 15:43:36 -0700 MIME-Version: 1.0 To: "Kinney, Michael D" , Laszlo Ersek Message-ID: <148944501645.16415.6726175929038559977@jljusten-skl> From: Jordan Justen In-Reply-To: Cc: edk2-devel-01 References: <20170223014814.10937-1-lersek@redhat.com> <20170223014814.10937-12-lersek@redhat.com> <148914088572.26490.12215430240628550434@jljusten-skl> <55e1eade-1d06-4b04-3e07-5ceef61a5602@redhat.com> <148944077646.15816.5488638936147140185@jljusten-skl> User-Agent: alot/0.5.1 Date: Mon, 13 Mar 2017 15:43:36 -0700 Subject: Re: [PATCH 11/12] OvmfPkg/SmmControl2Dxe: save fw_cfg boot script with QemuFwCfgS3Lib X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Mar 2017 22:43:38 -0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On 2017-03-13 15:12:08, Laszlo Ersek wrote: > = > "CCS_2_1_Draft.pdf" seems to be the most recent version; in it, I find: > = > (1) > = > 5.2.2.4 Subsequent lines of multi-line function calls should line up > one or two tab-stops from the beginning of the function name > = > Use either one or two tab stops to ensure that each parameter > is indented at least two spaces after the function name. Either > of the below examples is acceptable: > = > Status =3D gBS->AllocatePool ( > EfiBootServicesData, > sizeof (DRIVER_NAME_INSTANCE), > &PrivateData > ); > = > Status =3D gBS->AllocatePool ( > EfiBootServicesData, > sizeof (DRIVER_NAME_INSTANCE), > &PrivateData > ); > = > My notes on this: > = > - my code complies with the indentation requirement > = > - the passage is silent on whether each argument should be broken off > to a new line. The examples are called "acceptable", not "required". > I guess this is what your question to Mike is about. > Right. It seems like this is a case where the text perhaps could be more clear. Just looking at the precedence in the tree, it seems likely that we might want to say that if the call requires multiple lines, then the first parameter should be indented on the next line. > - I don't see what the difference is between the two examples. To me > they look identical. I think this example formatting got messed up. I saw a previous version that varied very subtlely. Status =3D gBS->AllocatePool ( EfiBootServicesData, sizeof (DRIVER_NAME_INSTANCE), &PrivateData ); Status =3D gBS->AllocatePool ( EfiBootServicesData, sizeof (DRIVER_NAME_INSTANCE), &PrivateData ); I always thought the rule was 2 spaces indenting beyond the function name. These example make me think that the intension is that your tab key might only want to align to columns that are even numbered, so you might have the result be that the indent from the function name would be 3 spaces. I don't know... I prefer the rule that you indent 2 spaces from the function name. :) > - In the examples, the closing parens line up with "AllocatePool", not > with "EfiBootServicesData". I think I have never ever seen this style > in edk2. > Yeah. Me either. This is confusing. -Jordan