Re: [PATCHv2 wireless-next] wifi: brcmsmac: use FAM for debug code
Arend van Spriel <[email protected]> Sat, 28 Mar 2026 11:49:34 +0100
| Newsgroups | dev.linux.lists.brcm80211,org.kernel.vger.linux-kernel,org.kernel.vger.linux-wireless |
|---|---|
| Message-ID | <[email protected]> |
On 10/03/2026 02:47, Rosen Penev wrote: > 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. Thanks, Rosen I did before the concept of FAM landed in the kernel. Whether or not the #ifdef DEBUG is warranted is simply a choice. I prefer to have clean separation of functionality and the related data. If the code using the data is all conditional under DEBUG define then the data must be as well. I understand that FAM and compiler support for it has its advantages, but this is more churn than gain. The code is functional as is and removing #defines for the sake of changing to a FAM seems not justified for the advantages which in my opinion are pretty limited in this particular case. Regards, Arend