[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d2bfe3af-c3ef-b6fd-6e0e-6765fbed2954@amd.com>
Date: Wed, 11 Dec 2024 10:25:52 +0000
From: Alejandro Lucero Palau <alucerop@....com>
To: Edward Cree <ecree.xilinx@...il.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 12/11/24 10:11, Edward Cree wrote:
> 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.)
I appreciate it. :-)
>> 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.
I like skip_pio. I'll use it.
Thanks!
Powered by blists - more mailing lists