lkml.org 
[lkml]   [2013]   [Jun]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] Fix obvious logic error in staging/csr
Date
From: Tobias Polzer <tobias.polzer@fau.de>

In uf_process_ma_packet_req() (staging/csr/unifi_pdu_processing.c), the
test for
(staInfo->timSet != CSR_WIFI_TIM_RESET) || (staInfo->timSet !=
CSR_WIFI_TIM_RESETTING)
obviously makes no sense and causes GCC to emit a warning if
-Wlogical-op is enabled.
As suggested in the referenced bug report, || was replaced by &&.

References: https://bugzilla.kernel.org/show_bug.cgi?id=46571
Reported-By: David Binderman <dcb314@hotmail.com>
Signed-off-by: Tobias Polzer <tobias.polzer@fau.de>
Signed-off-by: Dominik Paulus <dominik.paulus@fau.de>
---
drivers/staging/csr/unifi_pdu_processing.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/csr/unifi_pdu_processing.c b/drivers/staging/csr/unifi_pdu_processing.c
index f9b421b..8634193 100644
--- a/drivers/staging/csr/unifi_pdu_processing.c
+++ b/drivers/staging/csr/unifi_pdu_processing.c
@@ -2704,7 +2704,7 @@ static void uf_handle_uspframes_delivery(unifi_priv_t * priv, CsrWifiRouterCtrlS
*/
is_all_ac_deliver_enabled_and_moredata(staInfo, &allDeliveryEnabled, &dataAvailable);
if ((allDeliveryEnabled && !dataAvailable)) {
- if ((staInfo->timSet != CSR_WIFI_TIM_RESET) || (staInfo->timSet != CSR_WIFI_TIM_RESETTING)) {
+ if ((staInfo->timSet != CSR_WIFI_TIM_RESET) && (staInfo->timSet != CSR_WIFI_TIM_RESETTING)) {
staInfo->updateTimReqQueued = (u8) CSR_WIFI_TIM_RESET;
unifi_trace(priv, UDBG4, " --uf_handle_uspframes_delivery, UAPSD timset\n");
if (!staInfo->timRequestPendingFlag) {
--
1.7.10.4


\
 
 \ /
  Last update: 2013-06-13 23:41    [W:0.047 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site