From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A2F5739B943 for ; Tue, 4 Aug 2026 15:34:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785857682; cv=none; b=WhgdfK8/LGQubMMabFqtmQCF4E8Quxi/QtgGx1/nnPZNwHhAhkz6se+r3I2+y7eXZsnMNNUzmrw3rYuau+5I0NDS2AiOOvbi51vBzPJ/nD1kshwrGQDb0ckCZ3ftXu3prT1Z745DlAuC/6wZgkbFrv+s00S//USSC6Lz18jVcIM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785857682; c=relaxed/simple; bh=R5Qh0yviWiVnN6dJHvD86hQYSwt7ADQKW/Z0Yy5B1eY=; h=Mime-Version:Content-Type:Date:Message-Id:Cc:Subject:From:To: References:In-Reply-To; b=P+9KY3EoZcLZZ9OksKXbYt1KgPZks/HtvBzwEl1uLTqsnSUg76CTv6dhk8jhX1Zr9QgCfEkbKGrnzxhoIMxnqMlgYIa+1iuPQNN+kS3MeKz08j0z4rNuA3Ko0FgkV3Rk7zItBDDHNFba4Eph1+B8gcp8i/kudh/p2YnC2aEHEvg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=jBDAARxV; arc=none smtp.client-ip=209.85.128.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jBDAARxV" Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-4955158f26aso22940915e9.3 for ; Tue, 04 Aug 2026 08:34:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785857679; x=1786462479; darn=vger.kernel.org; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-type:content-transfer-encoding:mime-version:from:to:cc :subject:date:message-id:reply-to:content-type; bh=pnrdKm4x7gDeXbM+NyoNlOrV3AIy1wLNmLcMkH3rpoc=; b=jBDAARxVcD8vhsM4GM1O8gPv62WbeCLJekxWJahWN4Q52Yffpb1cU2EFPL0Kx4vyMf F79TgObWgOjz9EMhnUasyv0L0Rcszcl6OIzH0FjubBNNK2LoJgSUBK1vrXbFnqKtjhgQ pua90f1ap9mLU8rypY5tDRup4ggGn2hD7m9OtaKw9uRUVxghJIWUOQa42EVhgG7k6hcz 3dl3JjvSFQwVbVum1XvQDwAjeN2zPfvXtlwFAGUAkmtYGUBxfRNSkZXi+BZDyYbge9Cw 1ztXMmMnJqGQsT/ljS7XBUn8NDLkX1wVZXaY+hGdylI++P8v0ROuFrFwNLYzQjADtloX yyWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785857679; x=1786462479; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-type:content-transfer-encoding:mime-version:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=pnrdKm4x7gDeXbM+NyoNlOrV3AIy1wLNmLcMkH3rpoc=; b=PkdNanvWTiZ9lRIHE+hrjEOXFJTvoD62r4xpepvCPWU9f302su/PWGtR8Y++MF4lCR z6ovMxF7hNusn3G2w+cuF+0VgUPG/VieBGm78HZd7nlkpRzHBDJvJN/NBK/i2hz4p6M5 xlOU8sJy0fG/0m84kjP4RRlew/IOV3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xT7vd3MK/++ikmZ3 k3G4lCaWYH5Q= X-Received: by 2002:a05:600c:4444:b0:496:c249:dd9a with SMTP id 5b1f17b1804b1-4980c66c931mr302801965e9.3.1785857678513; Tue, 04 Aug 2026 08:34:38 -0700 (PDT) Received: from localhost ([47.58.8.78]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4994dfe64e0sm7844045e9.6.2026.08.04.08.34.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 04 Aug 2026 08:34:38 -0700 (PDT) Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 04 Aug 2026 17:34:36 +0200 Message-Id: Cc: , , Subject: Re: [PATCH GSoC v3 3/8] fetch-object-info: pass arguments directly instead of a struct From: "Pablo Sabater" To: "Karthik Nayak" , "Pablo Sabater" , X-Mailer: aerc 0.21.0 References: <20260803-objecttype-support-v3-0-7176fecf7950@gmail.com> <20260803-objecttype-support-v3-3-7176fecf7950@gmail.com> In-Reply-To: On Tue Aug 4, 2026 at 5:23 PM CEST, Karthik Nayak wrote: > Pablo Sabater writes: > >> struct object_info_args groups three pointers that already live in the >> transport and are given to fetch_object_info(). >> Grouping them into a struct reduces the number of parameters, but it >> suggests that fetch_object_info() uses all three of them. >> > > But it does use all of them, no? Not sure I follow the reasoning here. > > [snip] Yes, I meant that it suggests the three of them are used together, but in the end everything is accessed as args->*. And because object_info_args is built just before calling fetch_object_info() it doesn't make much sense. citing Peff [1]: > - there are a lot of semi-opaque structs, like object_info_args. It > would seem simpler to me to pass those elements around independently > to the functions that need them. Likewise, we seem to stuff a lot of > data into the transport struct rather than passing it to the > relevant functions, even though many of those elements are really > just used for one function call, and aren't a property of the > transport at all. [1]: https://lore.kernel.org/git/20260802154309.GA17844@coredump.intra.peff= .net/ I'll reword it in the next reroll, Pablo