All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arend van Spriel <arend.vanspriel@broadcom.com>
To: Rosen Penev <rosenp@gmail.com>, Julian Calaby <julian.calaby@gmail.com>
Cc: linux-wireless@vger.kernel.org,
	"open list:BROADCOM BRCM80211 IEEE802.11 WIRELESS DRIVERS"
	<brcm80211@lists.linux.dev>,
	"open list:BROADCOM BRCM80211 IEEE802.11 WIRELESS DRIVERS"
	<brcm80211-dev-list.pdl@broadcom.com>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCHv2 wireless-next] wifi: brcmsmac: use FAM for debug code
Date: Sat, 28 Mar 2026 11:49:34 +0100	[thread overview]
Message-ID: <c70c306d-a606-42d3-b2f8-7440c34b5f25@broadcom.com> (raw)
In-Reply-To: <CAKxU2N_i3d2Bkx-35k7COtQ15UATVJja9wrHb8Pp8x9gDnpnBA@mail.gmail.com>

On 10/03/2026 02:47, Rosen Penev wrote:
> On Mon, Mar 9, 2026 at 6:11 PM Julian Calaby <julian.calaby@gmail.com> wrote:
>>
>> Hi Arend,
>>
>> On Tue, Mar 10, 2026 at 8:59 AM Rosen Penev <rosenp@gmail.com> 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

      reply	other threads:[~2026-03-28 10:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-09 21:59 [PATCHv2 wireless-next] wifi: brcmsmac: use FAM for debug code Rosen Penev
2026-03-10  1:11 ` Julian Calaby
2026-03-10  1:47   ` Rosen Penev
2026-03-28 10:49     ` Arend van Spriel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c70c306d-a606-42d3-b2f8-7440c34b5f25@broadcom.com \
    --to=arend.vanspriel@broadcom.com \
    --cc=brcm80211-dev-list.pdl@broadcom.com \
    --cc=brcm80211@lists.linux.dev \
    --cc=julian.calaby@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=rosenp@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.