Re: [PATCHv2 wireless-next] wifi: brcmsmac: use FAM for debug code

From: Julian Calaby

Date: Mon Mar 09 2026 - 21:16:11 EST


Hi Arend,

On Tue, Mar 10, 2026 at 8:59 AM Rosen Penev <rosenp@xxxxxxxxx> wrote:
>
> Debug code requires a separate allocation to duplicate a string. A FAM
> allows properly sized allocation with a single kfree.

Sorry Rosen for hijacking your patch here.

With these changes, does allocating and copying the string really need
to be behind a DEBUG ifdef?

The allocation, copying and freeing of the memory isn't in a hot path,
so allocating/freeing a couple more bytes shouldn't matter that much,
which only leaves the memory footprint, which appears to be less than
10 bytes.

Thanks,

--
Julian Calaby

Email: julian.calaby@xxxxxxxxx
Profile: http://www.google.com/profiles/julian.calaby/