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

Julian Calaby <[email protected]> Tue, 10 Mar 2026 12:11:16 +1100
Newsgroups dev.linux.lists.brcm80211,org.kernel.vger.linux-kernel,org.kernel.vger.linux-wireless
Message-ID <CAGRGNgUsVxecZobcXvVwmaHD+QHmzp4qTPGSLOpJb6Uinrpa+w@mail.gmail.com>
Hi Arend,

On Tue, Mar 10, 2026 at 8:59 AM Rosen Penev <[email protected]> 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: [email protected]
Profile: http://www.google.com/profiles/julian.calaby/