Search Linux Wireless

Re: [PATCH] brcmfmac: avoid assignment in if/else-if conditions in NVRAM load path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 8/12/2025 2:36 PM, darshanrathod475@xxxxxxxxx wrote:
From: Darshan Rathod <darshanrathod475@xxxxxxxxx>

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@xxxxxxxxxxxx>

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




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux