public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Alex G. <mr.nuke.me@gmail.com>
To: u-boot@lists.denx.de
Subject: [PATCH RFC v2 3/5] lib: Add support for ECDSA image signing
Date: Thu, 7 Jan 2021 13:56:07 -0600	[thread overview]
Message-ID: <22cc3cd0-8e41-9869-8284-2c10bb5296f2@gmail.com> (raw)
In-Reply-To: <CAPnjgZ2EF13waDOrbfA3nD2tcYm3L8FLxTgvRw57yuuhXcG6rA@mail.gmail.com>

On 1/7/21 11:29 AM, Simon Glass wrote:
> Hi Alex,
> 
> On Thu, 7 Jan 2021 at 09:27, Alex G. <mr.nuke.me@gmail.com> wrote:
>>
>> On 1/7/21 6:35 AM, Simon Glass wrote:
>>> Hi Alexandru,
>>
>> Hi Simon,
>>
>> (pun alert!) A lot of your comments have to do with comments. I use
>> comments as a tool to add something of value to code. When the code is
>> self-documenting, comments don't help much.
>> See kernel coding style chapter 8.
>>
>> What comments can do, is increase code size and break code flow -- there
>> is a cost to having them. I'm certain you've seen functions that need to
>> be scrolled up and down because of a huge comment smack in the middle.
>> I'll address individual comment comments below.
>>
> 
> Don't get me started on comments in the kernel...there seems to almost
> be a ban on them :-)
> 
> We used to follow the same approach but now we have comments for
> non-trivial code. Comments and tests are closely related.
> 
> - if there is no comment, we don't know what the function is supposed
> to do so we can't change it (there is no contract), we are not sure if
> line 5 is a bug or a real quirk, casual readers can't understand what
> is going on, the automated docs don't produce anything, no one wants
> to refactor it, etc.
> - if there is no test, presumably the code doesn't work now, if it ever did

I will add each of the comments you are requesting, but not for the 
reasons quoted. The comments that I could write won't add anything of 
value -- they would just make the code larger, and increase the 
cognitive load. You are the maintainer, and starting an argument would 
be pointless. In the end, comments don't get compiled, and the code 
works just the same :)

[snip]
> 
> Again,
> this is not Linux and people don't have as much time to cogitate on
> code. 

I resent that statement. It takes me longer to do a task in u-boot than 
it would take me to do a similar task in linux. In the context of 
comments (note I intentionally did not say 'documentation'), does 
plastering the same information over and over in a way that hides the 
essence really help? I think the current path is misguided, and will 
only aggravate the problem. (I'll add the comments, though)

> They are just trying to get their device working.

That's true for linux too.

[snip]

All other comments will be addressed in v3

  reply	other threads:[~2021-01-07 19:56 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-30 21:00 [PATCH RFC v2 0/5] Add support for ECDSA image signing (with test) Alexandru Gagniuc
2020-12-30 21:00 ` [PATCH RFC v2 1/5] lib: Rename rsa-checksum.c to hash-checksum.c Alexandru Gagniuc
2021-01-07 12:35   ` Simon Glass
2020-12-30 21:00 ` [PATCH RFC v2 2/5] lib/rsa: Make fdt_add_bignum() available outside of RSA code Alexandru Gagniuc
2021-01-07 12:35   ` Simon Glass
2020-12-30 21:00 ` [PATCH RFC v2 3/5] lib: Add support for ECDSA image signing Alexandru Gagniuc
2021-01-07 12:35   ` Simon Glass
2021-01-07 16:27     ` Alex G.
2021-01-07 17:25       ` Tom Rini
2021-01-07 22:24         ` Alex G.
2021-01-07 17:29       ` Simon Glass
2021-01-07 19:56         ` Alex G. [this message]
2020-12-30 21:00 ` [PATCH RFC v2 4/5] doc: signature.txt: Document devicetree format for ECDSA keys Alexandru Gagniuc
2021-01-07 12:35   ` Simon Glass
2020-12-30 21:00 ` [PATCH RFC v2 5/5] test/py: ecdsa: Add test for mkimage ECDSA signing Alexandru Gagniuc
2021-01-07 12:35   ` Simon Glass
2021-01-07 16:44     ` Alex G.
2021-01-07 17:31       ` Simon Glass
2021-01-07 18:44         ` Alex G.

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=22cc3cd0-8e41-9869-8284-2c10bb5296f2@gmail.com \
    --to=mr.nuke.me@gmail.com \
    --cc=u-boot@lists.denx.de \
    /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