Skip to contentSkip to conversation

ath6kl: change || to &&

PATCH In review Dan Carpenter 3 participants 4 messages Apr 20, 2012 – Apr 23, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 ath6kl: change || to &&

The original conditions are always true. I think && was intended here, but I don't have the hardware to test. Could you take a look?

drivers/net/wireless/ath/ath6kl/htc_mbox.c +2 -2
index 065e615..086a8e1 100644
@@ -758,7 +758,7 @@ static void ath6kl_htc_tx_bundle(struct htc_endpoint *endpoint,
 	u32 txb_mask;
 	u8 ac = WMM_NUM_AC;
 
-	if ((HTC_CTRL_RSVD_SVC != endpoint->svc_id) ||
+	if ((HTC_CTRL_RSVD_SVC != endpoint->svc_id) &&
 	    (WMI_CONTROL_SVC != endpoint->svc_id))
 		ac = target->dev->ar->ep2ac_map[endpoint->eid];
 
@@ -866,7 +866,7 @@ static void ath6kl_htc_tx_from_queue(struct htc_target *target,
 	 */
 	INIT_LIST_HEAD(&txq);
 
-	if ((HTC_CTRL_RSVD_SVC != endpoint->svc_id) ||
+	if ((HTC_CTRL_RSVD_SVC != endpoint->svc_id) &&
 	    (WMI_CONTROL_SVC != endpoint->svc_id))
 		ac = target->dev->ar->ep2ac_map[endpoint->eid];
 
#1 lore raw
Quoted 19 lines · Dan Carpenter

The original conditions are always true. I think && was intended here, but I don't have the hardware to test. Could you take a look?

drivers/net/wireless/ath/ath6kl/htc_mbox.c +1 -1
index 065e615..086a8e1 100644
@@ -758,7 +758,7 @@ static void ath6kl_htc_tx_bundle(struct htc_endpoint *endpoint,
 	u32 txb_mask;
 	u8 ac = WMM_NUM_AC;
 
-	if ((HTC_CTRL_RSVD_SVC != endpoint->svc_id) ||
+	if ((HTC_CTRL_RSVD_SVC != endpoint->svc_id) &&
 	    (WMI_CONTROL_SVC != endpoint->svc_id))
 		ac = target->dev->ar->ep2ac_map[endpoint->eid];
 

drivers/net/wireless/ath/ath6kl/htc_mbox.c static void ath6kl_htc_tx_from_queue(struct htc_target *target, · line 871

Quoted 7 lines
drivers/net/wireless/ath/ath6kl/htc_mbox.c +1 -1
@@ -866,7 +866,7 @@ static void ath6kl_htc_tx_from_queue(struct htc_target *target,
 	 */
 	INIT_LIST_HEAD(&txq);
 
-	if ((HTC_CTRL_RSVD_SVC != endpoint->svc_id) ||
+	if ((HTC_CTRL_RSVD_SVC != endpoint->svc_id) &&
 	    (WMI_CONTROL_SVC != endpoint->svc_id))
 		ac = target->dev->ar->ep2ac_map[endpoint->eid];

Dan, that's a good catch. This is coming from Chilam's patch:

https://github.com/kvalo/ath6kl/commit/b29072cc7b0e08ace48ab709c40cf6246fb2e8b0

Chilam, is it safe to take Dan's patch?

Kalle

#2 lore raw

Yes, the intention was &&, not ||. Thanks for catching this.

-Chilam
________________________________________
From: Valo, Kalle
Sent: Friday, April 20, 2012 1:37 AM
To: Dan Carpenter
Cc: John W. Linville; [email protected]; [email protected]; ath6kl-devel; Ng, Chilam
Subject: Re: [patch 1/2] ath6kl: change || to &&

Quoted 19 lines · Dan Carpenter

The original conditions are always true. I think && was intended here, but I don't have the hardware to test. Could you take a look?

drivers/net/wireless/ath/ath6kl/htc_mbox.c +1 -1
index 065e615..086a8e1 100644
@@ -758,7 +758,7 @@ static void ath6kl_htc_tx_bundle(struct htc_endpoint *endpoint,
      u32 txb_mask;
      u8 ac = WMM_NUM_AC;
 
-     if ((HTC_CTRL_RSVD_SVC != endpoint->svc_id) ||
+     if ((HTC_CTRL_RSVD_SVC != endpoint->svc_id) &&
          (WMI_CONTROL_SVC != endpoint->svc_id))
              ac = target->dev->ar->ep2ac_map[endpoint->eid];
 

drivers/net/wireless/ath/ath6kl/htc_mbox.c static void ath6kl_htc_tx_from_queue(struct htc_target *target, · line 871

Quoted 7 lines
drivers/net/wireless/ath/ath6kl/htc_mbox.c +1 -1
@@ -866,7 +866,7 @@ static void ath6kl_htc_tx_from_queue(struct htc_target *target,
       */
      INIT_LIST_HEAD(&txq);
 
-     if ((HTC_CTRL_RSVD_SVC != endpoint->svc_id) ||
+     if ((HTC_CTRL_RSVD_SVC != endpoint->svc_id) &&
          (WMI_CONTROL_SVC != endpoint->svc_id))
              ac = target->dev->ar->ep2ac_map[endpoint->eid];

Dan, that's a good catch. This is coming from Chilam's patch:

https://github.com/kvalo/ath6kl/commit/b29072cc7b0e08ace48ab709c40cf6246fb2e8b0

Chilam, is it safe to take Dan's patch?

Kalle