staging: rtl8723bs: modify struct field to use standard bool type
PATCH v3 1/1 staging: rtl8723bs: modify struct field to use standard bool type
The struct field uses the uint values 0 and 1 to represent false and true values respectively.
Convert cases to use the bool type instead to ensure consistency with other parts of the containing code where true or false has been used.
reported by Coccinelle:
---
Changes in v3:
- Added more patch recipients
Changes in v2:
- Improved commit message based on suggestion from Julia Lawal
- Clarity was provided to Greg Kroah-Hartman by Dan Carpenter on why it is safe to make the change to the struct.
drivers/staging/rtl8723bs/core/rtw_ap.c | 2 +- drivers/staging/rtl8723bs/include/sta_info.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8723bs/core/rtw_ap.c +1 -1
@@ -389,7 +389,7 @@ void update_bmc_sta(struct adapter *padapter) psta->qos_option =0 ; psta->htpriv.ht_option = false; - psta->ieee8021x_blocked =0 ; + psta->ieee8021x_blocked = false;memset ((void *)&psta->sta_stats,0 ,sizeof (struct stainfo_stats ));
drivers/staging/rtl8723bs/include/sta_info.h +1 -1
@@ -86,7 +86,7 @@ struct sta_info {uint qos_option;u8 hwaddr[ETH_ALEN ]; -uint ieee8021x_blocked;/* 0: allowed, 1:blocked */ +bool ieee8021x_blocked;uint dot118021XPrivacy;/* aes, tkip... */ union Keytype dot11tkiptxmickey;union Keytype dot11tkiprxmickey;
Signature · 1 line
2.34.1
Sent from my iPhone
Quoted 8 lines · Abraham Samuel Adekunle
The struct field uses the uint values 0 and 1 to represent false and true values respectively.
Convert cases to use the bool type instead to ensure consistency with other parts of the containing code where true or false has been used.
This structure is changing size. You need to acknowledge that and argue why it is ok.
Quoted 44 lines
reported by Coccinelle:
Signed-off-by Abraham Samuel Adekunle <[email protected]>---
Changes in v3:
- Added more patch recipients
Changes in v2:
- Improved commit message based on suggestion from Julia Lawal
- Clarity was provided to Greg Kroah-Hartman by Dan Carpenter on why it is safe to make the change to the struct.
drivers/staging/rtl8723bs/core/rtw_ap.c| 2 +-drivers/staging/rtl8723bs/include/sta_info.h| 2 +-2 files changed, 2 insertions(+), 2 deletions(-)drivers/staging/rtl8723bs/core/rtw_ap.c +1
-1@@ -389,7 +389,7 @@ void update_bmc_sta(struct adapter *padapter) psta->qos_option =0 ; psta->htpriv.ht_option = false; - psta->ieee8021x_blocked =0 ; + psta->ieee8021x_blocked = false;memset ((void *)&psta->sta_stats,0 ,sizeof (struct stainfo_stats ));drivers/staging/rtl8723bs/include/sta_info.h +1
-2@@ -86,7 +86,7 @@ struct sta_info {uint qos_option;u8 hwaddr[ETH_ALEN ]; -uint ieee8021x_blocked;/* 0: allowed, 1:blocked */ +bool ieee8021x_blocked;uint dot118021XPrivacy;/* aes, tkip... */ union Keytype dot11tkiptxmickey;union Keytype dot11tkiprxmickey; --2.34.1