Re: [PATCH] smc: Use flexible array for SMCD connections
From: Alexandra Winter
Date: Wed May 20 2026 - 03:25:53 EST
On 19.05.26 23:45, Rosen Penev wrote:
> On Tue, May 19, 2026 at 1:57 AM Alexandra Winter <wintera@xxxxxxxxxxxxx> wrote:
>>
>>
>>
>> On 19.05.26 02:52, Rosen Penev wrote:
>>> Store the per-DMB connection pointers in the SMCD device allocation
>>> instead of allocating a separate connection array.
>>>
>>> This keeps the connection table tied to the SMCD device lifetime and
>>> simplifies the allocation and cleanup paths.
>>>
>>> Assisted-by: Codex:GPT-5.5
>>> Signed-off-by: Rosen Penev <rosenp@xxxxxxxxx>
>>> ---
>>
>> I don't think GPT did a good job here.
>> There are many other instances, where smcd->conn is freed,
>> those would need adoption as well afaiu.
> git grep kfree | grep \\\-\>conn\)
> drivers/media/dvb-core/dvbdev.c: kfree(dvbdev->adapter->conn);
> net/wireless/sme.c: kfree(wdev->conn);
> net/wireless/sme.c: kfree(wdev->conn);
>
> I assume you mean net/wireless/sme.c
>>
I have to apologize. You are right, the patch is complete.
I guess I was confused by smc_conn_free() or what else.
I should have been more careful.
>> I am also not sure that there is enough improvement in the idea
>> to warrant a patch, but I leave that to the SMC maintainers.
>>
>>