mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arend van Spriel <arend.vanspriel@broadcom.com>
To: darshanrathod475@gmail.com
Cc: linux-wireless@vger.kernel.org, brcm80211@lists.linux.dev,
	brcm80211-dev-list.pdl@broadcom.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] brcmfmac: avoid assignment in if/else-if conditions in NVRAM load path
Date: Sun, 17 Aug 2025 12:37:04 +0200	[thread overview]
Message-ID: <9fc9a2b6-621f-4d24-a726-fe4309e090ba@broadcom.com> (raw)
In-Reply-To: <20250812123636.2142292-1-darshanrathod475@gmail.com>



On 8/12/2025 2:36 PM, darshanrathod475@gmail.com wrote:
> From: Darshan Rathod <darshanrathod475@gmail.com>
> 
> The NVRAM selection logic in brcmf_fw_request_nvram_done() used
> patterns like:
> 
>      if ((data = bcm47xx_nvram_get_contents(&data_len)))
>          free_bcm47xx_nvram = true;
>      else if ((data = brcmf_fw_nvram_from_efi(&data_len)))
>          kfree_nvram = true;
> 
> This style violates kernel coding style guidelines and triggers
> checkpatch.pl errors. It also slightly reduces readability.
> 
> Refactor these cases by separating the assignment and the check,
> ensuring behavior remains identical while complying with coding
> standards.

Thanks for this patch.

Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>

> Signed-off-by: Darshan Rathod <darshanrathod475@gmail.com>
> ---
>   .../broadcom/brcm80211/brcmfmac/firmware.c         | 14 +++++++++-----
>   1 file changed, 9 insertions(+), 5 deletions(-)

      reply	other threads:[~2025-08-17 10:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-12 12:36 darshanrathod475
2025-08-17 10:37 ` 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=9fc9a2b6-621f-4d24-a726-fe4309e090ba@broadcom.com \
    --to=arend.vanspriel@broadcom.com \
    --cc=brcm80211-dev-list.pdl@broadcom.com \
    --cc=brcm80211@lists.linux.dev \
    --cc=darshanrathod475@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®