public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Vladimir Olovyannikov" <vladimir.olovyannikov@broadcom.com>
To: "Rabeda, Maciej" <maciej.rabeda@linux.intel.com>,
	Laszlo Ersek <lersek@redhat.com>,
	 "Gao, Zhichao" <zhichao.gao@intel.com>,
	devel@edk2.groups.io
Cc: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>,
	"Wu, Jiaxin" <jiaxin.wu@intel.com>,
	 "Fu, Siyuan" <siyuan.fu@intel.com>, "Ni, Ray" <ray.ni@intel.com>,
	 "Gao, Liming" <liming.gao@intel.com>, Nd <nd@arm.com>
Subject: Re: [PATCH v5 1/1] ShellPkg/DynamicCommand: add HttpDynamicCommand
Date: Wed, 19 Aug 2020 11:06:46 -0700	[thread overview]
Message-ID: <fd2eae494254af894fa1833f4e8a1272@mail.gmail.com> (raw)
In-Reply-To: <7686c2de-085c-68a6-7784-d2a93560fcc4@linux.intel.com>

> -----Original Message-----
> From: Rabeda, Maciej <maciej.rabeda@linux.intel.com>
> Sent: Wednesday, August 19, 2020 10:44 AM
> To: Laszlo Ersek <lersek@redhat.com>; Vladimir Olovyannikov
> <vladimir.olovyannikov@broadcom.com>; Gao, Zhichao
> <zhichao.gao@intel.com>; devel@edk2.groups.io
> Cc: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>; Wu, Jiaxin
> <jiaxin.wu@intel.com>; Fu, Siyuan <siyuan.fu@intel.com>; Ni, Ray
> <ray.ni@intel.com>; Gao, Liming <liming.gao@intel.com>; Nd
> <nd@arm.com>
> Subject: Re: [PATCH v5 1/1] ShellPkg/DynamicCommand: add
> HttpDynamicCommand
>
> @Laszlo,
>
> As for type casting, I don't have strong opinions.
> Space after typecast (for me) always seemed to be visually more consistent
> with the rest of the code.
> In my regular projects written in C-based languages, I would do it the way
> you are describing.
>
> @Vladimir
> I went through the rest of the code.
> There are more coding standard problems, but in terms of HTTP usage the
> code seems to be OK.
OK, great, thanks. I am reviewing it and will submit the patch shortly.
Thanks to Laszlo, I hope to be able to run CI locally and detect hidden
issues.
Indeed, I have to switch between Linux and UEFI code, so I missed several
code style issues.
>
> Thanks,
> Maciej
>
> PS. Rabeda is my last name :)
Oops, thanks for letting me know, Maciej.
It is just a bit unusual to have the last name first :)

Thank you,
Vladimir
>
> On 19-Aug-20 11:47, Laszlo Ersek wrote:
> > On 08/18/20 20:33, Vladimir Olovyannikov wrote:
> >>> -----Original Message-----
> >>> From: Rabeda, Maciej <maciej.rabeda@linux.intel.com>
> >>> Sent: Tuesday, August 18, 2020 9:54 AM
> >>> To: Vladimir Olovyannikov <vladimir.olovyannikov@broadcom.com>;
> >>> Laszlo Ersek <lersek@redhat.com>; Gao, Zhichao
> >>> <zhichao.gao@intel.com>; devel@edk2.groups.io
> >>> Cc: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>; Wu,
> Jiaxin
> >>> <jiaxin.wu@intel.com>; Fu, Siyuan <siyuan.fu@intel.com>; Ni, Ray
> >>> <ray.ni@intel.com>; Gao, Liming <liming.gao@intel.com>; Nd
> >>> <nd@arm.com>
> >>> Subject: Re: [PATCH v5 1/1] ShellPkg/DynamicCommand: add
> >>> HttpDynamicCommand
> >>>
> >>> Hi Vladimir,
> >>>
> >>> I am inprog of going through the patch. There are some coding
> >>> standard violations.
> >>> For reference:
> >>> https://edk2-docs.gitbook.io/edk-ii-c-coding-standards-specification
> >>> /
> > [...]
> >
> >> OK, I will look through all files again, probably something slipped
> >> from my attention as I work with Linux code as well.
> > Now that we have ECC checking enabled in CI, submitting a personal
> > pull request could help. Additionally, the CI workload should be
> > possible to run locally, according to ".pytool/Readme.md".
> >
> > (I'm planning to learn how to run that locally myself.)
> >
> >>> HttpApp.c:
> >>> Line 48: Space after type cast.
> >> Sorry, I don't understand here. You mean, Something =
> >> (CAST)SomethingElse should actually be "Something = (CAST)
> SomethingElse?
> >> I don't see this say in the Tftp.c:
> >> if (AsciiStrnCmp ((CHAR8 *)Option->OptionStr, "tsize", 5) == 0) ...
> >> or in TftpApp.c
> >> Status = (EFI_STATUS)RunTftp (ImageHandle, SystemTable); Am I missing
> >> anything?
> >
> > In core edk2 packages, casts are frequently written like this:
> >
> >    (TYPE) Expression
> >
> > (Importantly, Expression itself is not parenthesized.)
> >
> > In my opinion, this is a bad practice. That's because the typecast has
> > one of the strongest operator bindings in the C language, and visually
> > distancing (TYPE) from "Expression" suggests the opposite -- it's
> > counter-intuitive.
> >
> > I strongly prefer
> >
> >    (TYPE)Expression
> >
> > but other maintainers may have a different preference.
> >
> > Thanks
> > Laszlo
> >

  reply	other threads:[~2020-08-19 18:06 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-27 16:48 [PATCH v5 0/1] ShellPkg/DynamicCommand: add HttpDynamicCommand Vladimir Olovyannikov
2020-07-27 16:48 ` [PATCH v5 1/1] " Vladimir Olovyannikov
2020-07-27 22:08   ` [edk2-devel] " Laszlo Ersek
2020-08-04 17:43     ` Vladimir Olovyannikov
2020-08-03  5:42   ` Liming Gao
2020-08-17  1:47   ` Gao, Zhichao
2020-08-17 15:46     ` Vladimir Olovyannikov
2020-08-17 17:15       ` Maciej Rabeda
2020-08-17 18:00         ` Laszlo Ersek
2020-08-17 18:29           ` Vladimir Olovyannikov
2020-08-17 20:44             ` Laszlo Ersek
2020-08-17 22:52               ` Vladimir Olovyannikov
2020-08-18 16:54                 ` Maciej Rabeda
2020-08-18 18:33                   ` Vladimir Olovyannikov
2020-08-19  9:47                     ` Laszlo Ersek
2020-08-19 17:43                       ` Maciej Rabeda
2020-08-19 18:06                         ` Vladimir Olovyannikov [this message]
2020-07-27 17:39 ` [PATCH v5 0/1] " Laszlo Ersek
2020-07-27 18:45   ` Vladimir Olovyannikov

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=fd2eae494254af894fa1833f4e8a1272@mail.gmail.com \
    --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