Re: [PATCH] brcmfmac: avoid assignment in if/else-if conditions in NVRAM load path
Arend van Spriel <[email protected]> Sun, 17 Aug 2025 12:37:04 +0200
| Newsgroups | dev.linux.lists.brcm80211,org.kernel.vger.linux-kernel,org.kernel.vger.linux-wireless |
|---|---|
| Message-ID | <[email protected]> |
On 8/12/2025 2:36 PM, [email protected] wrote: > From: Darshan Rathod <[email protected]> > > 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 <[email protected]> > Signed-off-by: Darshan Rathod <[email protected]> > --- > .../broadcom/brcm80211/brcmfmac/firmware.c | 14 +++++++++----- > 1 file changed, 9 insertions(+), 5 deletions(-)