public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mark@klomp.org>
To: "Timm Bäder" <tbaeder@redhat.com>, elfutils-devel@sourceware.org
Subject: Re: [PATCH 05/14] segment_report_module: Pull finish_portion() info file scope
Date: Thu, 19 Nov 2020 12:48:41 +0100	[thread overview]
Message-ID: <8f39c1e1011ec53aa27733df2d2f4fcc332819a5.camel@klomp.org> (raw)
In-Reply-To: <20201112150412.2137981-6-tbaeder@redhat.com>

Hi Timm,

On Thu, 2020-11-12 at 16:04 +0100, Timm Bäder via Elfutils-devel wrote:
> +static inline void
> +finish_portion (Dwfl *dwfl,
> +                Dwfl_Memory_Callback *memory_callback,
> +                void *memory_callback_arg,
> +                void **data, size_t *data_size)
> +{
> +  if (*data_size != 0 && *data != NULL)
> +    (void) segment_read (dwfl, memory_callback, memory_callback_arg,
> +                         -1, data, data_size, 0, 0);
> +}

And again I would like to see this simply inlined instead of
introducing a top-level function that just takes some arguments that it
then rearranges to call a different function that again rearranges its
arguments to call one of the arguments.

I admit this messes up the rest of the patch series, so that none of it
applies cleanly anymore. Apologies.

I do like your creation of single loops, so you can inline some of the
inner functions directly in the loop instead of having multiple
callers. I think all those look good.

The only two commits I have to think about are:
[06/14] segment_report_module: Pull read_portion() into file scope
[07/14] segment_report_module: Use a struct for build id information

Which feel a little clunky to me. But I can probably be convinced they
are OK improvements if you simply say you disagree and resubmit them as
is.

Thanks,

Mark

  reply	other threads:[~2020-11-19 11:48 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-12 15:03 Removing gnu99 constructs from elfutils Timm Bäder
2020-11-12 15:03 ` [PATCH 01/14] segment_report_module: Get rid of variable-length arrays Timm Bäder
2020-11-18 23:04   ` Mark Wielaard
2020-11-12 15:04 ` [PATCH 02/14] segment_report_module: Pull segment_read into file scope Timm Bäder
2020-11-18 23:18   ` Mark Wielaard
2020-11-12 15:04 ` [PATCH 03/14] segment_report_module: Remove nested finish() function Timm Bäder
2020-11-19 11:18   ` Mark Wielaard
2020-11-12 15:04 ` [PATCH 04/14] segment_report_module: Remove nested release_buffer() function Timm Bäder
2020-11-19 11:24   ` Mark Wielaard
2020-11-12 15:04 ` [PATCH 05/14] segment_report_module: Pull finish_portion() info file scope Timm Bäder
2020-11-19 11:48   ` Mark Wielaard [this message]
2020-11-12 15:04 ` [PATCH 06/14] segment_report_module: Pull read_portion() into " Timm Bäder
2020-11-12 15:04 ` [PATCH 07/14] segment_report_module: Use a struct for build id information Timm Bäder
2020-11-12 15:04 ` [PATCH 08/14] segment_report_module: Pull consider_notes() into file scope Timm Bäder
2020-11-12 15:04 ` [PATCH 09/14] segment_report_module: Get rid of nested final_read() function Timm Bäder
2020-11-12 15:04 ` [PATCH 10/14] segment_report_module: Use one loop for p32/p64 arrays Timm Bäder
2020-11-12 15:04 ` [PATCH 11/14] segment_report_module: Inline read_phdr() into only caller Timm Bäder
2020-11-12 15:04 ` [PATCH 12/14] segment_report_module: Unify d32/d64 loops Timm Bäder
2020-11-12 15:04 ` [PATCH 13/14] segment_report_module: Inline consider_dyn() into only caller Timm Bäder
2020-11-12 15:04 ` [PATCH 14/14] segment_report_module: Inline consider_phdr() " Timm Bäder
2020-11-12 16:52   ` Navin P
2020-11-13  7:41     ` Timm Bäder
2020-11-13  8:00       ` Navin P
2020-11-13 12:38 ` Removing gnu99 constructs from elfutils Mark Wielaard
2020-11-13 14:09   ` Timm Bäder

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=8f39c1e1011ec53aa27733df2d2f4fcc332819a5.camel@klomp.org \
    --to=mark@klomp.org \
    --cc=elfutils-devel@sourceware.org \
    --cc=tbaeder@redhat.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).