From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS53758 23.128.96.0/24 X-Spam-Status: No, score=-4.2 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id 5FE761F670 for ; Thu, 21 Oct 2021 16:30:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231715AbhJUQco (ORCPT ); Thu, 21 Oct 2021 12:32:44 -0400 Received: from cloud.peff.net ([104.130.231.41]:43790 "EHLO cloud.peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230072AbhJUQcn (ORCPT ); Thu, 21 Oct 2021 12:32:43 -0400 Received: (qmail 16095 invoked by uid 109); 21 Oct 2021 16:30:27 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.94) with ESMTP; Thu, 21 Oct 2021 16:30:27 +0000 Authentication-Results: cloud.peff.net; auth=none Received: (qmail 8400 invoked by uid 111); 21 Oct 2021 16:30:27 -0000 Received: from Unknown (HELO sigill.intra.peff.net) (10.0.1.3) by peff.net (qpsmtpd/0.94) with (TLS_AES_256_GCM_SHA384 encrypted) ESMTPS; Thu, 21 Oct 2021 12:30:27 -0400 Authentication-Results: peff.net; auth=none Date: Thu, 21 Oct 2021 12:30:26 -0400 From: Jeff King To: =?utf-8?B?w4Z2YXIgQXJuZmrDtnLDsA==?= Bjarmason Cc: git@vger.kernel.org, Junio C Hamano Subject: Re: [PATCH 0/2] pkt-line.[ch]: dead code removal Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Thu, Oct 14, 2021 at 10:15:10PM +0200, Ævar Arnfjörð Bjarmason wrote: > Remove some dead code in pkt-line.[ch], perhaps someone has an > objection to 2/2 as we could keep that function variant around "just > in case", but it's trivial to use the underlying function (or re-add > this utility), so shedding the unused code seems better. These both look good to me. It's perhaps a little weird to shed the now-always-NULL src arguments from packet_read() in the second one, since the underlying function we wrap still allows them. But it does make the callers a little simpler, and I think if we added any new callers that I'd much rather see them use the struct-oriented packet_reader interface instead. Which is really why it we can get rid of this function in the first place; it's old callers are all using that interface. In the long run, I'd be quite happy if could get rid of all of the non-packet_reader calls entirely, but that's a much bigger topic. This is a nice incremental step in that direction. -Peff