Re: [PATCH 00/12] tree-wide: chip away at USE_THE_INDEX_COMPATIBILITY_MACROS
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Nov 18, 2022, 12:21 UTC
- Message-ID
- <221118.86v8ncfo1v.gmgdl@evledraar.gmail.com>
- In-Reply-To
- <51e91e8f-f11c-be8c-a23d-566eb3fbb387@dunelm.org.uk>
On Fri, Nov 18 2022, Phillip Wood wrote:
Show 14 quoted lines
> Hi Ævar > > On 18/11/2022 11:30, Ævar Arnfjörð Bjarmason wrote: >> As 3/12 here notes we've been undergoing a sloooow migration away from >> functions that provide "the_index" for you since 2007, with the last >> major move away from some of them being in 2019. > > The commit cited in 3/12 actually introduced most of these > macros. What it did was remove the dependency on `the_index` from > cache.c. Maybe I'm missing some context but I struggling to see the > benefit in removing the macros with out removing the dependency on > `the_index`. Doing that would require much more manual work as it > cannot be automated with coccinelle but it would provide a tangible > benefit which I don't see here.
I didn't cover this myself as I figured the linked-to commits & context covered it: But no, there is no great benefit to doing this, it's just janitorial work.
My proximate motivation for this is having written this to libify some code in a parallel series: [1].
Does that in itself justify this? No, far from it. But we've had this supposed online migration for years, I tihnk we shouldn't rush to do those sorts of things needlessly (e.g. let's avoid conflicts with other in-flight stuff, if it can be helped), but leaving it for another 4-10 years would also suck.
1. https://lore.kernel.org/git/patch-v9-09.12-f29343197eb-20221118T110058Z-avarab@gmail.com/