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

Rosen Penev <[email protected]> Mon, 9 Mar 2026 18:47:06 -0700
Newsgroups dev.linux.lists.brcm80211,org.kernel.vger.linux-kernel,org.kernel.vger.linux-wireless
Message-ID <CAKxU2N_i3d2Bkx-35k7COtQ15UATVJja9wrHb8Pp8x9gDnpnBA@mail.gmail.com>
On Mon, Mar 9, 2026 at 6:11 PM Julian Calaby <[email protected]> wrote:
>
> 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?
I don't know. I didn't write this code.
>
> 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/