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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 5 May 2020 15:50:01 +0800
From:   Chi-Hsien Lin <chi-hsien.lin@...ress.com>
To:     Jason Yan <yanaijie@...wei.com>,
        "arend.vanspriel@...adcom.com" <arend.vanspriel@...adcom.com>,
        "franky.lin@...adcom.com" <franky.lin@...adcom.com>,
        "hante.meuleman@...adcom.com" <hante.meuleman@...adcom.com>,
        Wright Feng <Wright.Feng@...ress.com>,
        "kvalo@...eaurora.org" <kvalo@...eaurora.org>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "linux-wireless@...r.kernel.org" <linux-wireless@...r.kernel.org>,
        "brcm80211-dev-list.pdl@...adcom.com" 
        <brcm80211-dev-list.pdl@...adcom.com>,
        brcm80211-dev-list <brcm80211-dev-list@...ress.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] brcmfmac: remove Comparison to bool in
 brcmf_p2p_send_action_frame()



On 05/04/2020 7:33, Jason Yan wrote:
> Fix the following coccicheck warning:
> 
> drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c:1781:9-12:
> WARNING: Comparison to bool
> drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c:1785:5-8:
> WARNING: Comparison to bool
> 
> Signed-off-by: Jason Yan <yanaijie@...wei.com>
Reviewed-by: Chi-hsien Lin <chi-hsien.lin@...ress.com>

> ---
>   drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 5 ++---
>   1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
> index 1f5deea5a288..16b193d13a2f 100644
> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
> @@ -1777,12 +1777,11 @@ bool brcmf_p2p_send_action_frame(struct brcmf_cfg80211_info *cfg,
>   	}
>   
>   	tx_retry = 0;
> -	while (!p2p->block_gon_req_tx &&
> -	       (ack == false) && (tx_retry < P2P_AF_TX_MAX_RETRY)) {
> +	while (!p2p->block_gon_req_tx && !ack && (tx_retry < P2P_AF_TX_MAX_RETRY)) {
>   		ack = !brcmf_p2p_tx_action_frame(p2p, af_params);
>   		tx_retry++;
>   	}
> -	if (ack == false) {
> +	if (!ack) {
>   		bphy_err(drvr, "Failed to send Action Frame(retry %d)\n",
>   			 tx_retry);
>   		clear_bit(BRCMF_P2P_STATUS_GO_NEG_PHASE, &p2p->status);
> 

Powered by blists - more mailing lists