Skip to contentSkip to conversation

staging: wfx: cleanups

PATCH Superseded Jules Irenge 2 participants 5 messages Nov 3, 2019 Staging

v4 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

v4 cover staging: wfx: cleanups

changes since
* v1 submits changes with no accurate log message and title
* v2 improves on log message description: remove the word "fixing", rephrase log message and title.
* v3 gives accurate description on the changes and reasons behind.
* v4 includes a log of changes done on each version.

Jules Irenge (2):
staging: wfx: replace 0 by NULL as the return value of a
pointer-returning function
staging: wfx: replace 1 by true when stored in a boolean variable

 drivers/staging/wfx/queue.c | 4 ++--
 drivers/staging/wfx/sta.c   | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
Signature · 1 line
2.23.0
#1 lore raw

PATCH v4 1/2 staging: wfx: replace 0 by NULL as the return value of a pointer-returning function

Replace 0 by NULL as the return value of a pointer-returning function. Issue detected by sparse tool.

---
changes since
v1 submits change of zero to NULL with no accurate log message of what was done and title.
v2 improves on log message description: remove the word "fixing", rephrase log message and title.
v3 gives accurate log description on changes and reason behind. v4 includes a log of changes done on each version.

 drivers/staging/wfx/queue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/wfx/queue.c +1 -1
index ef3ee55cf621..5d29bce65f71 100644
@@ -565,7 +565,7 @@ struct hif_msg *wfx_tx_queues_get(struct wfx_dev *wdev)
 		}
 
 		if (ret)
-			return 0;
+			return NULL;
 
 		queue_num = queue - wdev->tx_queue;
 
Signature · 1 line
2.23.0
#2 lore raw

Re: [PATCH v4 1/2] staging: wfx: replace 0 by NULL as the return value of a pointer-returning function

Quoted 1 line · Jules Irenge

Replace 0 by NULL as the return value of a pointer-returning function.

Likewise here.

julia

Quoted 32 lines

Issue detected by sparse tool.

---
changes since
v1 submits change of zero to NULL with no accurate log message of what was done and title.
v2 improves on log message description: remove the word "fixing", rephrase log message and title.
v3 gives accurate log description on changes and reason behind. v4 includes a log of changes done on each version.

 drivers/staging/wfx/queue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/wfx/queue.c +1 -2
index ef3ee55cf621..5d29bce65f71 100644
@@ -565,7 +565,7 @@ struct hif_msg *wfx_tx_queues_get(struct wfx_dev *wdev)
 		}
 
 		if (ret)
-			return 0;
+			return NULL;
 
 		queue_num = queue - wdev->tx_queue;
 
--

2.23.0

#3 lore raw

PATCH v4 2/2 staging: wfx: replace 1 by true when stored in a boolean variable

In reply to Jules Irenge

Replace 1 by true when it is stored in a boolean variable. Recommended by coccinelle tool.

---
v1 submits change of 1 to true with no accurate log message of what
was done reason.
v2 merges two patches for the same issue into a single one, improves on log message description: rephrase, change the term warning to recommended by coccinelle tool. v3 gives accurate description on what was changed and reason behind:
change from fixing to replace to indicate what was done.
v4 includes logs of changes done on each version.

 drivers/staging/wfx/queue.c | 2 +-
 drivers/staging/wfx/sta.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/staging/wfx/queue.c +1 -1
index 5d29bce65f71..71e92744fed0 100644
@@ -550,7 +550,7 @@ struct hif_msg *wfx_tx_queues_get(struct wfx_dev *wdev)
 			spin_unlock_bh(&wvif->ps_state_lock);
 
 			if (vif_more) {
-				more = 1;
+				more = true;
 				tx_allowed_mask = vif_tx_allowed_mask;
 				queue = vif_queue;
 				ret = 0;
drivers/staging/wfx/sta.c +1 -1
index 688586e823c0..ea5707ff8847 100644
@@ -291,7 +291,7 @@ u64 wfx_prepare_multicast(struct ieee80211_hw *hw, struct netdev_hw_addr_list *m
 			ether_addr_copy(wvif->mcast_filter.address_list[i], ha->addr);
 			i++;
 		}
-		wvif->mcast_filter.enable = 1;
+		wvif->mcast_filter.enable = true;
 		wvif->mcast_filter.num_addresses = count;
 	}
 
Signature · 1 line
2.23.0
#4 lore raw

Re: [PATCH v4 2/2] staging: wfx: replace 1 by true when stored in a boolean variable

Quoted 1 line · Jules Irenge

Replace 1 by true when it is stored in a boolean variable.

It's a bit strange to have the same thing in the subject line as in the commit log. The subject line should just give the idea quickly. Perhaps it could be just replace 1 by true.

julia

Quoted 45 lines

Recommended by coccinelle tool.

---
v1 submits change of 1 to true with no accurate log message of what
was done reason.
v2 merges two patches for the same issue into a single one, improves on log message description: rephrase, change the term warning to recommended by coccinelle tool. v3 gives accurate description on what was changed and reason behind:
change from fixing to replace to indicate what was done.
v4 includes logs of changes done on each version.

 drivers/staging/wfx/queue.c | 2 +-
 drivers/staging/wfx/sta.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/staging/wfx/queue.c +1 -1
index 5d29bce65f71..71e92744fed0 100644
@@ -550,7 +550,7 @@ struct hif_msg *wfx_tx_queues_get(struct wfx_dev *wdev)
 			spin_unlock_bh(&wvif->ps_state_lock);
 
 			if (vif_more) {
-				more = 1;
+				more = true;
 				tx_allowed_mask = vif_tx_allowed_mask;
 				queue = vif_queue;
 				ret = 0;
drivers/staging/wfx/sta.c +1 -2
index 688586e823c0..ea5707ff8847 100644
@@ -291,7 +291,7 @@ u64 wfx_prepare_multicast(struct ieee80211_hw *hw, struct netdev_hw_addr_list *m
 			ether_addr_copy(wvif->mcast_filter.address_list[i], ha->addr);
 			i++;
 		}
-		wvif->mcast_filter.enable = 1;
+		wvif->mcast_filter.enable = true;
 		wvif->mcast_filter.num_addresses = count;
 	}
 
--

2.23.0