Re: [PATCH 07/21] staging: rtl8723bs: core: fix line lengths in rtw_wlan_util.c
From: Dan Carpenter
Date: Wed Feb 25 2026 - 01:54:17 EST
On Tue, Feb 24, 2026 at 02:27:34PM +0100, luka.gejak@xxxxxxxxx wrote:
> @@ -380,10 +383,14 @@ int is_client_associated_to_ap(struct adapter *padapter)
> pmlmeext = &padapter->mlmeextpriv;
> pmlmeinfo = &(pmlmeext->mlmext_info);
>
> - if ((pmlmeinfo->state & WIFI_FW_ASSOC_SUCCESS) && ((pmlmeinfo->state & 0x03) == WIFI_FW_STATION_STATE))
> - return true;
> - else
> - return _FAIL;
> + {
> + bool assoc_ok = pmlmeinfo->state & WIFI_FW_ASSOC_SUCCESS;
> + bool is_station = (pmlmeinfo->state & 0x03) == WIFI_FW_STATION_STATE;
> +
> + if (assoc_ok && is_station)
> + return true;
> + }
> + return _FAIL;
> }
Wait, what? Please, don't introduce random new curly brace blocks.
This patch does it several times.
> @@ -466,7 +477,7 @@ void _write_cam(struct adapter *padapter, u8 entry, u16 ctrl, u8 *mac, u8 *key)
> void _clear_cam_entry(struct adapter *padapter, u8 entry)
> {
> unsigned char null_sta[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
> - unsigned char null_key[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
> + unsigned char null_key[16] = {0};
>
Better to do this kind of thing as a separate patch so you can change
null_sta as well. Otherwise it looks weird.
u8 null_sta[6] = {};
u8 null_key[16] = {};
Except I bet there are defines you could use instead of 6 and 16.
regards,
dan carpenter