[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <25df5f6d-096e-593c-9b6b-710658415a2f@gmail.com>
Date: Wed, 11 Dec 2024 10:11:11 +0000
From: Edward Cree <ecree.xilinx@...il.com>
To: Alejandro Lucero Palau <alucerop@....com>,
alejandro.lucero-palau@....com, linux-cxl@...r.kernel.org,
netdev@...r.kernel.org, dan.j.williams@...el.com, martin.habets@...inx.com,
edward.cree@....com, davem@...emloft.net, kuba@...nel.org,
pabeni@...hat.com, edumazet@...gle.com, dave.jiang@...el.com
Subject: Re: [PATCH v7 28/28] sfc: support pio mapping based on cxl
On 11/12/2024 09:38, Alejandro Lucero Palau wrote:
> On 12/11/24 02:39, Edward Cree wrote:
>> On 09/12/2024 18:54, alejandro.lucero-palau@....com wrote:
>>> @@ -1263,8 +1281,25 @@ static int efx_ef10_dimension_resources(struct efx_nic *efx)
>>> iounmap(efx->membase);
>>> efx->membase = membase;
>>> - /* Set up the WC mapping if needed */
>>> - if (wc_mem_map_size) {
>>> + if (!wc_mem_map_size)
>>> + goto out;
>> Maybe this label ought to be called something else; it's not really an
>> 'early exit', it's a 'skip over mapping and linking PIO', which just
>> _happens_ to be almost the last thing in the function.
>
>
> I do not know if I follow your point here. This was added following Martin's previous review for keeping the debugging when PIO is not needed.
>
> It is formally skipping now because the change what I think is good for keeping indentation simpler with the additional conditional added.
Yeah, I agree that additional indentation is undesirable here.
(Although that does suggest that the *ideal* approach would be
some refactoring into smaller functions, but I'm not going to
ask you to take on that extra work just to get your change in.)
> Anyway, I can change the label to something like "out_through_debug "which adds, IMO, unnecessary name complexity. Just using "debug" could give the wrong idea ...
>
> Any naming suggestion?
I was thinking something like "skip_pio:" or "no_piobufs:".
That way if someone later adds another bit of code to this function
(to do something not PIO-related) it'll be obvious it should go
after the label (& hence not be skipped), whereas with an "out:"
label normally that means "something went wrong, we're exiting
early" and thus additional functionality gets added before it.
Powered by blists - more mailing lists