From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (wildebeest.demon.nl [212.238.236.112]) by sourceware.org (Postfix) with ESMTPS id EE5963850409 for ; Thu, 19 Nov 2020 11:48:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org EE5963850409 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mark@klomp.org Received: from tarox.wildebeest.org (tarox.wildebeest.org [172.31.17.39]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id 0857D30291AB; Thu, 19 Nov 2020 12:48:41 +0100 (CET) Received: by tarox.wildebeest.org (Postfix, from userid 1000) id B36BA40061A5; Thu, 19 Nov 2020 12:48:41 +0100 (CET) Message-ID: <8f39c1e1011ec53aa27733df2d2f4fcc332819a5.camel@klomp.org> Subject: Re: [PATCH 05/14] segment_report_module: Pull finish_portion() info file scope From: Mark Wielaard To: Timm =?ISO-8859-1?Q?B=E4der?= , elfutils-devel@sourceware.org Date: Thu, 19 Nov 2020 12:48:41 +0100 In-Reply-To: <20201112150412.2137981-6-tbaeder@redhat.com> References: <20201112150412.2137981-1-tbaeder@redhat.com> <20201112150412.2137981-6-tbaeder@redhat.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Evolution 3.28.5 (3.28.5-10.el7) Mime-Version: 1.0 X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Elfutils-devel mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2020 11:48:44 -0000 Hi Timm, On Thu, 2020-11-12 at 16:04 +0100, Timm B=C3=A4der 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 !=3D 0 && *data !=3D 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