lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Thu, 13 Jun 2013 23:00:35 +0200
From:	Dominik Paulus <dominik.paulus@....de>
To:	devel@...uxdriverproject.org
Cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-kernel@...cs.fau.de, David Binderman <dcb314@...mail.com>,
	Devendra Naga <devendra.aaru@...il.com>,
	Priit Laes <plaes@...es.org>,
	Wei Yongjun <yongjun_wei@...ndmicro.com.cn>,
	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
	Tobias Polzer <tobias.polzer@....de>,
	Dominik Paulus <dominik.paulus@....de>
Subject: [PATCH] Fix obvious logic error in staging/csr

From: Tobias Polzer <tobias.polzer@....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@...mail.com>
Signed-off-by: Tobias Polzer <tobias.polzer@....de>
Signed-off-by: Dominik Paulus <dominik.paulus@....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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ