linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/16] staging: r8188eu: convert functions to return bool
@ 2022-03-02 20:47 Vihas Makwana
  2022-03-02 20:47 ` [PATCH 01/16] staging: r8188eu: mark rtw_is_cckrates_included as bool Vihas Makwana
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: Vihas Makwana @ 2022-03-02 20:47 UTC (permalink / raw)
  To: Larry Finger, Phillip Potter, Greg Kroah-Hartman,
	Michael Straube, Martin Kaiser
  Cc: linux-staging, linux-kernel, Vihas Makwana

There are many functions which return true/false but are marked as int, 
uint, s32 etc. Mark them as bool.

Vihas Makwana (16):
  staging: r8188eu: mark rtw_is_cckrates_included as bool
  staging: r8188eu: mark rtw_is_cckratesonly_included as bool
  staging: r8188eu: mark rtw_is_desired_network as bool
  staging: r8188eu: mark PS_RDY_CHECK as bool
  staging: r8188eu: mark check_indicate_seq as bool
  staging: r8188eu: mark enqueue_reorder_recvframe as bool
  staging: r8188eu: mark recv_indicatepkts_in_order as bool
  staging: r8188eu: mark cckrates_included as bool
  staging: r8188eu: mark cckratesonly_included as bool
  staging: r8188eu: mark is_basicrate as bool
  staging: r8188eu: mark is_ap_in_tkip as bool
  staging: r8188eu: mark rtl8188eu_xmitframe_complete as bool
  staging: r8188eu: mark check_fwstate as bool
  staging: r8188eu: mark IS_MCAST as bool
  staging: r8188eu: mark IsFrameTypeCtrl as bool
  staging: r8188eu: mark rtw_endofpktfile as bool

 drivers/staging/r8188eu/core/rtw_ieee80211.c    | 4 ++--
 drivers/staging/r8188eu/core/rtw_mlme.c         | 2 +-
 drivers/staging/r8188eu/core/rtw_pwrctrl.c      | 2 +-
 drivers/staging/r8188eu/core/rtw_recv.c         | 7 +++----
 drivers/staging/r8188eu/core/rtw_wlan_util.c    | 8 ++++----
 drivers/staging/r8188eu/hal/rtl8188eu_xmit.c    | 2 +-
 drivers/staging/r8188eu/include/ieee80211.h     | 4 ++--
 drivers/staging/r8188eu/include/rtl8188e_xmit.h | 2 +-
 drivers/staging/r8188eu/include/rtw_mlme.h      | 2 +-
 drivers/staging/r8188eu/include/rtw_mlme_ext.h  | 6 +++---
 drivers/staging/r8188eu/include/wifi.h          | 4 ++--
 drivers/staging/r8188eu/include/xmit_osdep.h    | 2 +-
 drivers/staging/r8188eu/os_dep/xmit_linux.c     | 2 +-
 13 files changed, 23 insertions(+), 24 deletions(-)

-- 
2.30.2


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 01/16] staging: r8188eu: mark rtw_is_cckrates_included as bool
  2022-03-02 20:47 [PATCH 00/16] staging: r8188eu: convert functions to return bool Vihas Makwana
@ 2022-03-02 20:47 ` Vihas Makwana
  2022-03-02 20:47 ` [PATCH 02/16] staging: r8188eu: mark rtw_is_cckratesonly_included " Vihas Makwana
                   ` (15 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: Vihas Makwana @ 2022-03-02 20:47 UTC (permalink / raw)
  To: Larry Finger, Phillip Potter, Greg Kroah-Hartman,
	Michael Straube, Martin Kaiser
  Cc: linux-staging, linux-kernel, Vihas Makwana

Mark rtw_is_cckrates_included as bool as it returns true/false.

Signed-off-by: Vihas Makwana <makvihas@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_ieee80211.c | 2 +-
 drivers/staging/r8188eu/include/ieee80211.h  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_ieee80211.c b/drivers/staging/r8188eu/core/rtw_ieee80211.c
index 62354c319..a7b7b0f14 100644
--- a/drivers/staging/r8188eu/core/rtw_ieee80211.c
+++ b/drivers/staging/r8188eu/core/rtw_ieee80211.c
@@ -68,7 +68,7 @@ int rtw_get_bit_value_from_ieee_value(u8 val)
 	return 0;
 }
 
-uint	rtw_is_cckrates_included(u8 *rate)
+bool	rtw_is_cckrates_included(u8 *rate)
 {
 	u32	i = 0;
 
diff --git a/drivers/staging/r8188eu/include/ieee80211.h b/drivers/staging/r8188eu/include/ieee80211.h
index 3a860e132..1a15db097 100644
--- a/drivers/staging/r8188eu/include/ieee80211.h
+++ b/drivers/staging/r8188eu/include/ieee80211.h
@@ -872,7 +872,7 @@ int rtw_generate_ie(struct registry_priv *pregistrypriv);
 
 int rtw_get_bit_value_from_ieee_value(u8 val);
 
-uint	rtw_is_cckrates_included(u8 *rate);
+bool	rtw_is_cckrates_included(u8 *rate);
 
 uint	rtw_is_cckratesonly_included(u8 *rate);
 
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 02/16] staging: r8188eu: mark rtw_is_cckratesonly_included as bool
  2022-03-02 20:47 [PATCH 00/16] staging: r8188eu: convert functions to return bool Vihas Makwana
  2022-03-02 20:47 ` [PATCH 01/16] staging: r8188eu: mark rtw_is_cckrates_included as bool Vihas Makwana
@ 2022-03-02 20:47 ` Vihas Makwana
  2022-03-02 20:47 ` [PATCH 03/16] staging: r8188eu: mark rtw_is_desired_network " Vihas Makwana
                   ` (14 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: Vihas Makwana @ 2022-03-02 20:47 UTC (permalink / raw)
  To: Larry Finger, Phillip Potter, Greg Kroah-Hartman,
	Michael Straube, Martin Kaiser
  Cc: linux-staging, linux-kernel, Vihas Makwana

Mark rtw_is_cckratesonly_included as bool as it returns true/false.

Signed-off-by: Vihas Makwana <makvihas@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_ieee80211.c | 2 +-
 drivers/staging/r8188eu/include/ieee80211.h  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_ieee80211.c b/drivers/staging/r8188eu/core/rtw_ieee80211.c
index a7b7b0f14..5a0e42ed4 100644
--- a/drivers/staging/r8188eu/core/rtw_ieee80211.c
+++ b/drivers/staging/r8188eu/core/rtw_ieee80211.c
@@ -81,7 +81,7 @@ bool	rtw_is_cckrates_included(u8 *rate)
 	return false;
 }
 
-uint	rtw_is_cckratesonly_included(u8 *rate)
+bool	rtw_is_cckratesonly_included(u8 *rate)
 {
 	u32 i = 0;
 
diff --git a/drivers/staging/r8188eu/include/ieee80211.h b/drivers/staging/r8188eu/include/ieee80211.h
index 1a15db097..8c20363cd 100644
--- a/drivers/staging/r8188eu/include/ieee80211.h
+++ b/drivers/staging/r8188eu/include/ieee80211.h
@@ -874,7 +874,7 @@ int rtw_get_bit_value_from_ieee_value(u8 val);
 
 bool	rtw_is_cckrates_included(u8 *rate);
 
-uint	rtw_is_cckratesonly_included(u8 *rate);
+bool	rtw_is_cckratesonly_included(u8 *rate);
 
 int rtw_check_network_type(unsigned char *rate, int ratelen, int channel);
 
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 03/16] staging: r8188eu: mark rtw_is_desired_network as bool
  2022-03-02 20:47 [PATCH 00/16] staging: r8188eu: convert functions to return bool Vihas Makwana
  2022-03-02 20:47 ` [PATCH 01/16] staging: r8188eu: mark rtw_is_cckrates_included as bool Vihas Makwana
  2022-03-02 20:47 ` [PATCH 02/16] staging: r8188eu: mark rtw_is_cckratesonly_included " Vihas Makwana
@ 2022-03-02 20:47 ` Vihas Makwana
  2022-03-02 20:47 ` [PATCH 04/16] staging: r8188eu: mark PS_RDY_CHECK " Vihas Makwana
                   ` (13 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: Vihas Makwana @ 2022-03-02 20:47 UTC (permalink / raw)
  To: Larry Finger, Phillip Potter, Greg Kroah-Hartman,
	Michael Straube, Martin Kaiser
  Cc: linux-staging, linux-kernel, Vihas Makwana

Mark rtw_is_desired_network as bool as it returns true/false.

Signed-off-by: Vihas Makwana <makvihas@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_mlme.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/r8188eu/core/rtw_mlme.c b/drivers/staging/r8188eu/core/rtw_mlme.c
index 4bb6edcc0..8d36ab955 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme.c
@@ -571,7 +571,7 @@ static void rtw_add_network(struct adapter *adapter,
 /* 			(3) WMM */
 /*			(4) HT */
 /*			(5) others */
-static int rtw_is_desired_network(struct adapter *adapter, struct wlan_network *pnetwork)
+static bool rtw_is_desired_network(struct adapter *adapter, struct wlan_network *pnetwork)
 {
 	struct security_priv *psecuritypriv = &adapter->securitypriv;
 	struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 04/16] staging: r8188eu: mark PS_RDY_CHECK as bool
  2022-03-02 20:47 [PATCH 00/16] staging: r8188eu: convert functions to return bool Vihas Makwana
                   ` (2 preceding siblings ...)
  2022-03-02 20:47 ` [PATCH 03/16] staging: r8188eu: mark rtw_is_desired_network " Vihas Makwana
@ 2022-03-02 20:47 ` Vihas Makwana
  2022-03-02 20:47 ` [PATCH 05/16] staging: r8188eu: mark check_indicate_seq " Vihas Makwana
                   ` (12 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: Vihas Makwana @ 2022-03-02 20:47 UTC (permalink / raw)
  To: Larry Finger, Phillip Potter, Greg Kroah-Hartman,
	Michael Straube, Martin Kaiser
  Cc: linux-staging, linux-kernel, Vihas Makwana

Mark PS_RDY_CHECK as bool as it returns true/false.

Signed-off-by: Vihas Makwana <makvihas@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_pwrctrl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/r8188eu/core/rtw_pwrctrl.c b/drivers/staging/r8188eu/core/rtw_pwrctrl.c
index b20436f75..7beabf82e 100644
--- a/drivers/staging/r8188eu/core/rtw_pwrctrl.c
+++ b/drivers/staging/r8188eu/core/rtw_pwrctrl.c
@@ -151,7 +151,7 @@ static void pwr_state_check_handler(struct timer_list *t)
 	rtw_ps_cmd(padapter);
 }
 
-static u8 PS_RDY_CHECK(struct adapter *padapter)
+static bool PS_RDY_CHECK(struct adapter *padapter)
 {
 	u32 curr_time, delta_time;
 	struct pwrctrl_priv	*pwrpriv = &padapter->pwrctrlpriv;
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 05/16] staging: r8188eu: mark check_indicate_seq as bool
  2022-03-02 20:47 [PATCH 00/16] staging: r8188eu: convert functions to return bool Vihas Makwana
                   ` (3 preceding siblings ...)
  2022-03-02 20:47 ` [PATCH 04/16] staging: r8188eu: mark PS_RDY_CHECK " Vihas Makwana
@ 2022-03-02 20:47 ` Vihas Makwana
  2022-03-02 20:47 ` [PATCH 06/16] staging: r8188eu: mark enqueue_reorder_recvframe " Vihas Makwana
                   ` (11 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: Vihas Makwana @ 2022-03-02 20:47 UTC (permalink / raw)
  To: Larry Finger, Phillip Potter, Greg Kroah-Hartman,
	Michael Straube, Martin Kaiser
  Cc: linux-staging, linux-kernel, Vihas Makwana

Mark check_indicate_seq as bool as it returns true/false.

Signed-off-by: Vihas Makwana <makvihas@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_recv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c
index d77d98351..402b58a02 100644
--- a/drivers/staging/r8188eu/core/rtw_recv.c
+++ b/drivers/staging/r8188eu/core/rtw_recv.c
@@ -1466,7 +1466,7 @@ static int amsdu_to_msdu(struct adapter *padapter, struct recv_frame *prframe)
 	return ret;
 }
 
-static int check_indicate_seq(struct recv_reorder_ctrl *preorder_ctrl, u16 seq_num)
+static bool check_indicate_seq(struct recv_reorder_ctrl *preorder_ctrl, u16 seq_num)
 {
 	u8	wsize = preorder_ctrl->wsize_b;
 	u16	wend = (preorder_ctrl->indicate_seq + wsize - 1) & 0xFFF;/*  4096; */
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 06/16] staging: r8188eu: mark enqueue_reorder_recvframe as bool
  2022-03-02 20:47 [PATCH 00/16] staging: r8188eu: convert functions to return bool Vihas Makwana
                   ` (4 preceding siblings ...)
  2022-03-02 20:47 ` [PATCH 05/16] staging: r8188eu: mark check_indicate_seq " Vihas Makwana
@ 2022-03-02 20:47 ` Vihas Makwana
  2022-03-02 20:47 ` [PATCH 07/16] staging: r8188eu: mark recv_indicatepkts_in_order " Vihas Makwana
                   ` (10 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: Vihas Makwana @ 2022-03-02 20:47 UTC (permalink / raw)
  To: Larry Finger, Phillip Potter, Greg Kroah-Hartman,
	Michael Straube, Martin Kaiser
  Cc: linux-staging, linux-kernel, Vihas Makwana

Mark enqueue_reorder_recvframe as bool as it returns true/false.
Also, make it static as it's only used in rtw_recv.

Signed-off-by: Vihas Makwana <makvihas@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_recv.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c
index 402b58a02..81ff22d0e 100644
--- a/drivers/staging/r8188eu/core/rtw_recv.c
+++ b/drivers/staging/r8188eu/core/rtw_recv.c
@@ -1496,8 +1496,7 @@ static bool check_indicate_seq(struct recv_reorder_ctrl *preorder_ctrl, u16 seq_
 	return true;
 }
 
-int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl, struct recv_frame *prframe);
-int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl, struct recv_frame *prframe)
+static bool enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl, struct recv_frame *prframe)
 {
 	struct rx_pkt_attrib *pattrib = &prframe->attrib;
 	struct __queue *ppending_recvframe_queue = &preorder_ctrl->pending_recvframe_queue;
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 07/16] staging: r8188eu: mark recv_indicatepkts_in_order as bool
  2022-03-02 20:47 [PATCH 00/16] staging: r8188eu: convert functions to return bool Vihas Makwana
                   ` (5 preceding siblings ...)
  2022-03-02 20:47 ` [PATCH 06/16] staging: r8188eu: mark enqueue_reorder_recvframe " Vihas Makwana
@ 2022-03-02 20:47 ` Vihas Makwana
  2022-03-02 20:47 ` [PATCH 08/16] staging: r8188eu: mark cckrates_included " Vihas Makwana
                   ` (9 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: Vihas Makwana @ 2022-03-02 20:47 UTC (permalink / raw)
  To: Larry Finger, Phillip Potter, Greg Kroah-Hartman,
	Michael Straube, Martin Kaiser
  Cc: linux-staging, linux-kernel, Vihas Makwana

Mark recv_indicatepkts_in_order as bool as it returns true/false.

Signed-off-by: Vihas Makwana <makvihas@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_recv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c
index 81ff22d0e..b6ab2db6d 100644
--- a/drivers/staging/r8188eu/core/rtw_recv.c
+++ b/drivers/staging/r8188eu/core/rtw_recv.c
@@ -1525,7 +1525,7 @@ static bool enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl, s
 	return true;
 }
 
-static int recv_indicatepkts_in_order(struct adapter *padapter, struct recv_reorder_ctrl *preorder_ctrl, int bforced)
+static bool recv_indicatepkts_in_order(struct adapter *padapter, struct recv_reorder_ctrl *preorder_ctrl, int bforced)
 {
 	struct list_head *phead, *plist;
 	struct recv_frame *prframe;
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 08/16] staging: r8188eu: mark cckrates_included as bool
  2022-03-02 20:47 [PATCH 00/16] staging: r8188eu: convert functions to return bool Vihas Makwana
                   ` (6 preceding siblings ...)
  2022-03-02 20:47 ` [PATCH 07/16] staging: r8188eu: mark recv_indicatepkts_in_order " Vihas Makwana
@ 2022-03-02 20:47 ` Vihas Makwana
  2022-03-02 20:47 ` [PATCH 09/16] staging: r8188eu: mark cckratesonly_included " Vihas Makwana
                   ` (8 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: Vihas Makwana @ 2022-03-02 20:47 UTC (permalink / raw)
  To: Larry Finger, Phillip Potter, Greg Kroah-Hartman,
	Michael Straube, Martin Kaiser
  Cc: linux-staging, linux-kernel, Vihas Makwana

Mark cckrates_included as bool as it returns true/false.

Signed-off-by: Vihas Makwana <makvihas@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_wlan_util.c   | 2 +-
 drivers/staging/r8188eu/include/rtw_mlme_ext.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_wlan_util.c b/drivers/staging/r8188eu/core/rtw_wlan_util.c
index 33c022820..4f58c8970 100644
--- a/drivers/staging/r8188eu/core/rtw_wlan_util.c
+++ b/drivers/staging/r8188eu/core/rtw_wlan_util.c
@@ -45,7 +45,7 @@ static u8 rtw_basic_rate_mix[7] = {
 	IEEE80211_OFDM_RATE_24MB | IEEE80211_BASIC_RATE_MASK
 };
 
-int cckrates_included(unsigned char *rate, int ratelen)
+bool cckrates_included(unsigned char *rate, int ratelen)
 {
 	int	i;
 
diff --git a/drivers/staging/r8188eu/include/rtw_mlme_ext.h b/drivers/staging/r8188eu/include/rtw_mlme_ext.h
index 26f31f20e..21c7f020a 100644
--- a/drivers/staging/r8188eu/include/rtw_mlme_ext.h
+++ b/drivers/staging/r8188eu/include/rtw_mlme_ext.h
@@ -632,7 +632,7 @@ void addba_timer_hdl(struct sta_info *psta);
 		_set_timer(&(mlmeext)->link_timer, (ms)); \
 	} while (0)
 
-int cckrates_included(unsigned char *rate, int ratelen);
+bool cckrates_included(unsigned char *rate, int ratelen);
 int cckratesonly_included(unsigned char *rate, int ratelen);
 
 void process_addba_req(struct adapter *padapter, u8 *paddba_req, u8 *addr);
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 09/16] staging: r8188eu: mark cckratesonly_included as bool
  2022-03-02 20:47 [PATCH 00/16] staging: r8188eu: convert functions to return bool Vihas Makwana
                   ` (7 preceding siblings ...)
  2022-03-02 20:47 ` [PATCH 08/16] staging: r8188eu: mark cckrates_included " Vihas Makwana
@ 2022-03-02 20:47 ` Vihas Makwana
  2022-03-02 20:47 ` [PATCH 10/16] staging: r8188eu: mark is_basicrate " Vihas Makwana
                   ` (7 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: Vihas Makwana @ 2022-03-02 20:47 UTC (permalink / raw)
  To: Larry Finger, Phillip Potter, Greg Kroah-Hartman,
	Michael Straube, Martin Kaiser
  Cc: linux-staging, linux-kernel, Vihas Makwana

Mark cckratesonly_included as bool as it returns true/false.

Signed-off-by: Vihas Makwana <makvihas@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_wlan_util.c   | 2 +-
 drivers/staging/r8188eu/include/rtw_mlme_ext.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_wlan_util.c b/drivers/staging/r8188eu/core/rtw_wlan_util.c
index 4f58c8970..eef8523c3 100644
--- a/drivers/staging/r8188eu/core/rtw_wlan_util.c
+++ b/drivers/staging/r8188eu/core/rtw_wlan_util.c
@@ -57,7 +57,7 @@ bool cckrates_included(unsigned char *rate, int ratelen)
 	return false;
 }
 
-int cckratesonly_included(unsigned char *rate, int ratelen)
+bool cckratesonly_included(unsigned char *rate, int ratelen)
 {
 	int	i;
 
diff --git a/drivers/staging/r8188eu/include/rtw_mlme_ext.h b/drivers/staging/r8188eu/include/rtw_mlme_ext.h
index 21c7f020a..cf397ac68 100644
--- a/drivers/staging/r8188eu/include/rtw_mlme_ext.h
+++ b/drivers/staging/r8188eu/include/rtw_mlme_ext.h
@@ -633,7 +633,7 @@ void addba_timer_hdl(struct sta_info *psta);
 	} while (0)
 
 bool cckrates_included(unsigned char *rate, int ratelen);
-int cckratesonly_included(unsigned char *rate, int ratelen);
+bool cckratesonly_included(unsigned char *rate, int ratelen);
 
 void process_addba_req(struct adapter *padapter, u8 *paddba_req, u8 *addr);
 
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 10/16] staging: r8188eu: mark is_basicrate as bool
  2022-03-02 20:47 [PATCH 00/16] staging: r8188eu: convert functions to return bool Vihas Makwana
                   ` (8 preceding siblings ...)
  2022-03-02 20:47 ` [PATCH 09/16] staging: r8188eu: mark cckratesonly_included " Vihas Makwana
@ 2022-03-02 20:47 ` Vihas Makwana
  2022-03-02 20:47 ` [PATCH 11/16] staging: r8188eu: mark is_ap_in_tkip " Vihas Makwana
                   ` (6 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: Vihas Makwana @ 2022-03-02 20:47 UTC (permalink / raw)
  To: Larry Finger, Phillip Potter, Greg Kroah-Hartman,
	Michael Straube, Martin Kaiser
  Cc: linux-staging, linux-kernel, Vihas Makwana

Mark is_basicrate as bool as it returns true/false.

Signed-off-by: Vihas Makwana <makvihas@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_wlan_util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/r8188eu/core/rtw_wlan_util.c b/drivers/staging/r8188eu/core/rtw_wlan_util.c
index eef8523c3..8e8a82a1e 100644
--- a/drivers/staging/r8188eu/core/rtw_wlan_util.c
+++ b/drivers/staging/r8188eu/core/rtw_wlan_util.c
@@ -167,7 +167,7 @@ static unsigned char ratetbl_val_2wifirate(unsigned char rate)
 	return val;
 }
 
-static int is_basicrate(struct adapter *padapter, unsigned char rate)
+static bool is_basicrate(struct adapter *padapter, unsigned char rate)
 {
 	int i;
 	unsigned char val;
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 11/16] staging: r8188eu: mark is_ap_in_tkip as bool
  2022-03-02 20:47 [PATCH 00/16] staging: r8188eu: convert functions to return bool Vihas Makwana
                   ` (9 preceding siblings ...)
  2022-03-02 20:47 ` [PATCH 10/16] staging: r8188eu: mark is_basicrate " Vihas Makwana
@ 2022-03-02 20:47 ` Vihas Makwana
  2022-03-02 20:47 ` [PATCH 12/16] staging: r8188eu: mark rtl8188eu_xmitframe_complete " Vihas Makwana
                   ` (5 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: Vihas Makwana @ 2022-03-02 20:47 UTC (permalink / raw)
  To: Larry Finger, Phillip Potter, Greg Kroah-Hartman,
	Michael Straube, Martin Kaiser
  Cc: linux-staging, linux-kernel, Vihas Makwana

Mark is_ap_in_tkip as bool as it returns true/false.

Signed-off-by: Vihas Makwana <makvihas@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_wlan_util.c   | 2 +-
 drivers/staging/r8188eu/include/rtw_mlme_ext.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_wlan_util.c b/drivers/staging/r8188eu/core/rtw_wlan_util.c
index 8e8a82a1e..665b07719 100644
--- a/drivers/staging/r8188eu/core/rtw_wlan_util.c
+++ b/drivers/staging/r8188eu/core/rtw_wlan_util.c
@@ -1013,7 +1013,7 @@ void update_beacon_info(struct adapter *padapter, u8 *pframe, uint pkt_len, stru
 	}
 }
 
-unsigned int is_ap_in_tkip(struct adapter *padapter)
+bool is_ap_in_tkip(struct adapter *padapter)
 {
 	u32 i;
 	struct ndis_802_11_var_ie *pIE;
diff --git a/drivers/staging/r8188eu/include/rtw_mlme_ext.h b/drivers/staging/r8188eu/include/rtw_mlme_ext.h
index cf397ac68..0c555ea67 100644
--- a/drivers/staging/r8188eu/include/rtw_mlme_ext.h
+++ b/drivers/staging/r8188eu/include/rtw_mlme_ext.h
@@ -508,7 +508,7 @@ unsigned int receive_disconnect(struct adapter *padapter,
 
 unsigned char get_highest_rate_idx(u32 mask);
 int support_short_GI(struct adapter *padapter, struct HT_caps_element *caps);
-unsigned int is_ap_in_tkip(struct adapter *padapter);
+bool is_ap_in_tkip(struct adapter *padapter);
 
 void report_join_res(struct adapter *padapter, int res);
 void report_survey_event(struct adapter *padapter, struct recv_frame *precv_frame);
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 12/16] staging: r8188eu: mark rtl8188eu_xmitframe_complete as bool
  2022-03-02 20:47 [PATCH 00/16] staging: r8188eu: convert functions to return bool Vihas Makwana
                   ` (10 preceding siblings ...)
  2022-03-02 20:47 ` [PATCH 11/16] staging: r8188eu: mark is_ap_in_tkip " Vihas Makwana
@ 2022-03-02 20:47 ` Vihas Makwana
  2022-03-02 20:47 ` [PATCH 13/16] staging: r8188eu: mark check_fwstate " Vihas Makwana
                   ` (4 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: Vihas Makwana @ 2022-03-02 20:47 UTC (permalink / raw)
  To: Larry Finger, Phillip Potter, Greg Kroah-Hartman,
	Michael Straube, Martin Kaiser
  Cc: linux-staging, linux-kernel, Vihas Makwana

Mark rtl8188eu_xmitframe_complete as bool as it returns true/false.

Signed-off-by: Vihas Makwana <makvihas@gmail.com>
---
 drivers/staging/r8188eu/hal/rtl8188eu_xmit.c    | 2 +-
 drivers/staging/r8188eu/include/rtl8188e_xmit.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/r8188eu/hal/rtl8188eu_xmit.c b/drivers/staging/r8188eu/hal/rtl8188eu_xmit.c
index 69b66eb45..55032d7ae 100644
--- a/drivers/staging/r8188eu/hal/rtl8188eu_xmit.c
+++ b/drivers/staging/r8188eu/hal/rtl8188eu_xmit.c
@@ -376,7 +376,7 @@ static u32 xmitframe_need_length(struct xmit_frame *pxmitframe)
 	return len;
 }
 
-s32 rtl8188eu_xmitframe_complete(struct adapter *adapt, struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf)
+bool rtl8188eu_xmitframe_complete(struct adapter *adapt, struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf)
 {
 	struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(adapt);
 	struct xmit_frame *pxmitframe = NULL;
diff --git a/drivers/staging/r8188eu/include/rtl8188e_xmit.h b/drivers/staging/r8188eu/include/rtl8188e_xmit.h
index 85eb0aad8..8adb672f7 100644
--- a/drivers/staging/r8188eu/include/rtl8188e_xmit.h
+++ b/drivers/staging/r8188eu/include/rtl8188e_xmit.h
@@ -143,7 +143,7 @@ s32 rtl8188eu_mgnt_xmit(struct adapter *padapter, struct xmit_frame *frame);
 s32 rtl8188eu_xmit_buf_handler(struct adapter *padapter);
 #define hal_xmit_handler rtl8188eu_xmit_buf_handler
 void rtl8188eu_xmit_tasklet(unsigned long priv);
-s32 rtl8188eu_xmitframe_complete(struct adapter *padapter,
+bool rtl8188eu_xmitframe_complete(struct adapter *padapter,
 				 struct xmit_priv *pxmitpriv,
 				 struct xmit_buf *pxmitbuf);
 
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 13/16] staging: r8188eu: mark check_fwstate as bool
  2022-03-02 20:47 [PATCH 00/16] staging: r8188eu: convert functions to return bool Vihas Makwana
                   ` (11 preceding siblings ...)
  2022-03-02 20:47 ` [PATCH 12/16] staging: r8188eu: mark rtl8188eu_xmitframe_complete " Vihas Makwana
@ 2022-03-02 20:47 ` Vihas Makwana
  2022-03-02 20:47 ` [PATCH 14/16] staging: r8188eu: mark IS_MCAST " Vihas Makwana
                   ` (3 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: Vihas Makwana @ 2022-03-02 20:47 UTC (permalink / raw)
  To: Larry Finger, Phillip Potter, Greg Kroah-Hartman,
	Michael Straube, Martin Kaiser
  Cc: linux-staging, linux-kernel, Vihas Makwana

Mark check_fwstate as bool as it returns true/false.

Signed-off-by: Vihas Makwana <makvihas@gmail.com>
---
 drivers/staging/r8188eu/include/rtw_mlme.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/r8188eu/include/rtw_mlme.h b/drivers/staging/r8188eu/include/rtw_mlme.h
index d418d57f9..42d850f9d 100644
--- a/drivers/staging/r8188eu/include/rtw_mlme.h
+++ b/drivers/staging/r8188eu/include/rtw_mlme.h
@@ -451,7 +451,7 @@ static inline u8 *get_bssid(struct mlme_priv *pmlmepriv)
 	return pmlmepriv->cur_network.network.MacAddress;
 }
 
-static inline int check_fwstate(struct mlme_priv *pmlmepriv, int state)
+static inline bool check_fwstate(struct mlme_priv *pmlmepriv, int state)
 {
 	if (pmlmepriv->fw_state & state)
 		return true;
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 14/16] staging: r8188eu: mark IS_MCAST as bool
  2022-03-02 20:47 [PATCH 00/16] staging: r8188eu: convert functions to return bool Vihas Makwana
                   ` (12 preceding siblings ...)
  2022-03-02 20:47 ` [PATCH 13/16] staging: r8188eu: mark check_fwstate " Vihas Makwana
@ 2022-03-02 20:47 ` Vihas Makwana
  2022-03-02 20:47 ` [PATCH 15/16] staging: r8188eu: mark IsFrameTypeCtrl " Vihas Makwana
                   ` (2 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: Vihas Makwana @ 2022-03-02 20:47 UTC (permalink / raw)
  To: Larry Finger, Phillip Potter, Greg Kroah-Hartman,
	Michael Straube, Martin Kaiser
  Cc: linux-staging, linux-kernel, Vihas Makwana

Mark IS_MCAST as bool as it returns true/false.

Signed-off-by: Vihas Makwana <makvihas@gmail.com>
---
 drivers/staging/r8188eu/include/wifi.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 39b7a596e..df3331b13 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -295,7 +295,7 @@ enum WIFI_REG_DOMAIN {
 
 #define GetAddr4Ptr(pbuf)	((unsigned char *)((size_t)(pbuf) + 24))
 
-static inline int IS_MCAST(unsigned char *da)
+static inline bool IS_MCAST(unsigned char *da)
 {
 	if ((*da) & 0x01)
 		return true;
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 15/16] staging: r8188eu: mark IsFrameTypeCtrl as bool
  2022-03-02 20:47 [PATCH 00/16] staging: r8188eu: convert functions to return bool Vihas Makwana
                   ` (13 preceding siblings ...)
  2022-03-02 20:47 ` [PATCH 14/16] staging: r8188eu: mark IS_MCAST " Vihas Makwana
@ 2022-03-02 20:47 ` Vihas Makwana
  2022-03-02 20:47 ` [PATCH 16/16] staging: r8188eu: mark rtw_endofpktfile " Vihas Makwana
  2022-03-03 12:20 ` [PATCH 00/16] staging: r8188eu: convert functions to return bool Dan Carpenter
  16 siblings, 0 replies; 18+ messages in thread
From: Vihas Makwana @ 2022-03-02 20:47 UTC (permalink / raw)
  To: Larry Finger, Phillip Potter, Greg Kroah-Hartman,
	Michael Straube, Martin Kaiser
  Cc: linux-staging, linux-kernel, Vihas Makwana

Mark IsFrameTypeCtrl as bool as it returns true/false.

Signed-off-by: Vihas Makwana <makvihas@gmail.com>
---
 drivers/staging/r8188eu/include/wifi.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index df3331b13..c1c9bae58 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -372,7 +372,7 @@ static inline unsigned char *get_hdr_bssid(unsigned char *pframe)
 	return sa;
 }
 
-static inline int IsFrameTypeCtrl(unsigned char *pframe)
+static inline bool IsFrameTypeCtrl(unsigned char *pframe)
 {
 	if (WIFI_CTRL_TYPE == GetFrameType(pframe))
 		return true;
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 16/16] staging: r8188eu: mark rtw_endofpktfile as bool
  2022-03-02 20:47 [PATCH 00/16] staging: r8188eu: convert functions to return bool Vihas Makwana
                   ` (14 preceding siblings ...)
  2022-03-02 20:47 ` [PATCH 15/16] staging: r8188eu: mark IsFrameTypeCtrl " Vihas Makwana
@ 2022-03-02 20:47 ` Vihas Makwana
  2022-03-03 12:20 ` [PATCH 00/16] staging: r8188eu: convert functions to return bool Dan Carpenter
  16 siblings, 0 replies; 18+ messages in thread
From: Vihas Makwana @ 2022-03-02 20:47 UTC (permalink / raw)
  To: Larry Finger, Phillip Potter, Greg Kroah-Hartman,
	Michael Straube, Martin Kaiser
  Cc: linux-staging, linux-kernel, Vihas Makwana

Mark rtw_endofpktfile as bool as it returns true/false.

Signed-off-by: Vihas Makwana <makvihas@gmail.com>
---
 drivers/staging/r8188eu/include/xmit_osdep.h | 2 +-
 drivers/staging/r8188eu/os_dep/xmit_linux.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/r8188eu/include/xmit_osdep.h b/drivers/staging/r8188eu/include/xmit_osdep.h
index 3e778dff0..00658681f 100644
--- a/drivers/staging/r8188eu/include/xmit_osdep.h
+++ b/drivers/staging/r8188eu/include/xmit_osdep.h
@@ -40,7 +40,7 @@ void rtw_os_xmit_resource_free(struct adapter *padapter,
 uint rtw_remainder_len(struct pkt_file *pfile);
 void _rtw_open_pktfile(struct sk_buff *pkt, struct pkt_file *pfile);
 uint _rtw_pktfile_read(struct pkt_file *pfile, u8 *rmem, uint rlen);
-int rtw_endofpktfile(struct pkt_file *pfile);
+bool rtw_endofpktfile(struct pkt_file *pfile);
 
 void rtw_os_pkt_complete(struct adapter *padapter, struct sk_buff *pkt);
 void rtw_os_xmit_complete(struct adapter *padapter,
diff --git a/drivers/staging/r8188eu/os_dep/xmit_linux.c b/drivers/staging/r8188eu/os_dep/xmit_linux.c
index 717b980a8..a6012cffd 100644
--- a/drivers/staging/r8188eu/os_dep/xmit_linux.c
+++ b/drivers/staging/r8188eu/os_dep/xmit_linux.c
@@ -54,7 +54,7 @@ uint _rtw_pktfile_read(struct pkt_file *pfile, u8 *rmem, uint rlen)
 	return len;
 }
 
-int rtw_endofpktfile(struct pkt_file *pfile)
+bool rtw_endofpktfile(struct pkt_file *pfile)
 {
 
 	if (pfile->pkt_len == 0) {
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH 00/16] staging: r8188eu: convert functions to return bool
  2022-03-02 20:47 [PATCH 00/16] staging: r8188eu: convert functions to return bool Vihas Makwana
                   ` (15 preceding siblings ...)
  2022-03-02 20:47 ` [PATCH 16/16] staging: r8188eu: mark rtw_endofpktfile " Vihas Makwana
@ 2022-03-03 12:20 ` Dan Carpenter
  16 siblings, 0 replies; 18+ messages in thread
From: Dan Carpenter @ 2022-03-03 12:20 UTC (permalink / raw)
  To: Vihas Makwana
  Cc: Larry Finger, Phillip Potter, Greg Kroah-Hartman,
	Michael Straube, Martin Kaiser, linux-staging, linux-kernel

On Thu, Mar 03, 2022 at 02:17:21AM +0530, Vihas Makwana wrote:
> There are many functions which return true/false but are marked as int, 
> uint, s32 etc. Mark them as bool.
> 
> Vihas Makwana (16):
>   staging: r8188eu: mark rtw_is_cckrates_included as bool
>   staging: r8188eu: mark rtw_is_cckratesonly_included as bool
>   staging: r8188eu: mark rtw_is_desired_network as bool
>   staging: r8188eu: mark PS_RDY_CHECK as bool
>   staging: r8188eu: mark check_indicate_seq as bool
>   staging: r8188eu: mark enqueue_reorder_recvframe as bool
>   staging: r8188eu: mark recv_indicatepkts_in_order as bool
>   staging: r8188eu: mark cckrates_included as bool
>   staging: r8188eu: mark cckratesonly_included as bool
>   staging: r8188eu: mark is_basicrate as bool
>   staging: r8188eu: mark is_ap_in_tkip as bool
>   staging: r8188eu: mark rtl8188eu_xmitframe_complete as bool
>   staging: r8188eu: mark check_fwstate as bool
>   staging: r8188eu: mark IS_MCAST as bool
>   staging: r8188eu: mark IsFrameTypeCtrl as bool
>   staging: r8188eu: mark rtw_endofpktfile as bool
> 

Looks good.  Thanks!

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2022-03-03 12:20 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-02 20:47 [PATCH 00/16] staging: r8188eu: convert functions to return bool Vihas Makwana
2022-03-02 20:47 ` [PATCH 01/16] staging: r8188eu: mark rtw_is_cckrates_included as bool Vihas Makwana
2022-03-02 20:47 ` [PATCH 02/16] staging: r8188eu: mark rtw_is_cckratesonly_included " Vihas Makwana
2022-03-02 20:47 ` [PATCH 03/16] staging: r8188eu: mark rtw_is_desired_network " Vihas Makwana
2022-03-02 20:47 ` [PATCH 04/16] staging: r8188eu: mark PS_RDY_CHECK " Vihas Makwana
2022-03-02 20:47 ` [PATCH 05/16] staging: r8188eu: mark check_indicate_seq " Vihas Makwana
2022-03-02 20:47 ` [PATCH 06/16] staging: r8188eu: mark enqueue_reorder_recvframe " Vihas Makwana
2022-03-02 20:47 ` [PATCH 07/16] staging: r8188eu: mark recv_indicatepkts_in_order " Vihas Makwana
2022-03-02 20:47 ` [PATCH 08/16] staging: r8188eu: mark cckrates_included " Vihas Makwana
2022-03-02 20:47 ` [PATCH 09/16] staging: r8188eu: mark cckratesonly_included " Vihas Makwana
2022-03-02 20:47 ` [PATCH 10/16] staging: r8188eu: mark is_basicrate " Vihas Makwana
2022-03-02 20:47 ` [PATCH 11/16] staging: r8188eu: mark is_ap_in_tkip " Vihas Makwana
2022-03-02 20:47 ` [PATCH 12/16] staging: r8188eu: mark rtl8188eu_xmitframe_complete " Vihas Makwana
2022-03-02 20:47 ` [PATCH 13/16] staging: r8188eu: mark check_fwstate " Vihas Makwana
2022-03-02 20:47 ` [PATCH 14/16] staging: r8188eu: mark IS_MCAST " Vihas Makwana
2022-03-02 20:47 ` [PATCH 15/16] staging: r8188eu: mark IsFrameTypeCtrl " Vihas Makwana
2022-03-02 20:47 ` [PATCH 16/16] staging: r8188eu: mark rtw_endofpktfile " Vihas Makwana
2022-03-03 12:20 ` [PATCH 00/16] staging: r8188eu: convert functions to return bool Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).