Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4320791yba; Sun, 12 May 2019 10:02:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqzwUZdrkp+ACDgzQKkJY5o/NROIeiLAsHUr/MMCLWKzo6t96t+7ssPknT8U0Hg6HZSa7mjO X-Received: by 2002:a65:5304:: with SMTP id m4mr5966832pgq.126.1557680563808; Sun, 12 May 2019 10:02:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557680563; cv=none; d=google.com; s=arc-20160816; b=HvDvCtf489wsF3yzmVSK+vSghh/tEjT8KyD+AVbCJ272k/qNYU2C8Gh+dU1zYTZXV3 g8i4E8mbJjS5F3rDmXU7sfL1dhFHoIhb7jGftKX5MuKC/jnO8SI4cRLwypeQz/Ex56l9 tVpCM07uflWL3CP9UWLZ+LaAh7H2nEI+q0bAJ6VPzZD7ZFVb/u1JZhlHRyb+Ocv393E6 1atbk0z6vD1+yE2FLokbGzzGNtK8SF5/nww0aY0KC4cWpLhMPUiJvJKn6U3oP45zN8Ix DW8MzPKPskRxefC81nf7wQwua0BXjtf0RQtdDVNhX9A3xBa/Dc9BC7CKHdmm8wpbjdiH ydRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:to:from:subject:message-id; bh=rTfnBYJ9sknWSeFEwpQQKZumJKLA0blsE9FZYmgP6q8=; b=lO9skvNfjf5SYkYWe58/m12BX6gXMlEYD0UnUPpyOfGUI2J9o0D4rDKjEkwrOGNN/y ch7Aco0IzIEFx5CfGe7AtFeDIHzr1GsFISFzv4RjKJTRubVt4K/3ilACHtuP7rJkwwGC avqMwLLXD/nNtFupcYlAF6GwzTE/mCOqCSL/qFPmF9XyeyyhY8zpNp9QNDT9FCFPy6Cm UFdjEkl209rhZek2kog0R8hIDR5bw40QHYyhVKD6CXvlCUStWGv/w8qru2sNE0jKH966 Q7y+Jrn31t1uVboN7qkx//WcTETptQBp18ErLFXJEC+qrTuE5mbZc/+vrcKjmJ0VMcBb iadg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d31si13839367pla.89.2019.05.12.10.02.27; Sun, 12 May 2019 10:02:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726885AbfELQ7r (ORCPT + 99 others); Sun, 12 May 2019 12:59:47 -0400 Received: from smtprelay0075.hostedemail.com ([216.40.44.75]:49252 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726531AbfELQ7r (ORCPT ); Sun, 12 May 2019 12:59:47 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay03.hostedemail.com (Postfix) with ESMTP id 94B86837F24C; Sun, 12 May 2019 16:59:45 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::::::,RULES_HIT:41:355:379:599:973:988:989:1260:1277:1311:1313:1314:1345:1359:1381:1437:1515:1516:1518:1534:1540:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:3870:3873:4321:5007:6119:6737:7903:10004:10400:10848:11026:11657:11658:11914:12043:12048:12295:12438:12740:12760:12895:13069:13161:13229:13311:13357:13439:14659:14721:21060:21080:21451:21627:30054:30070:30091,0,RBL:23.242.196.136:@perches.com:.lbl8.mailshell.net-62.8.0.180 64.201.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:26,LUA_SUMMARY:none X-HE-Tag: brain49_37d5198bb7c08 X-Filterd-Recvd-Size: 2095 Received: from XPS-9350.home (cpe-23-242-196-136.socal.res.rr.com [23.242.196.136]) (Authenticated sender: joe@perches.com) by omf01.hostedemail.com (Postfix) with ESMTPA; Sun, 12 May 2019 16:59:43 +0000 (UTC) Message-ID: Subject: Re: [PATCH] staging: rtl8723bs: core fix warning "Comparison to bool" From: Joe Perches To: Hariprasad Kelam , Greg Kroah-Hartman , Madhumitha Prabakaran , Hans de Goede , Arnd Bergmann , Emanuel Bennici , Dan Carpenter , Hardik Singh Rathore , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, viswanath.barenkala@gmail.com Date: Sun, 12 May 2019 09:59:42 -0700 In-Reply-To: <20190512121923.GA28044@hari-Inspiron-1545> References: <20190512121923.GA28044@hari-Inspiron-1545> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.30.1-1build1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 2019-05-12 at 17:49 +0530, Hariprasad Kelam wrote: > fix below issue reported by coccicheck > drivers/staging/rtl8723bs/core/rtw_cmd.c:1741:7-17: WARNING: Comparison > to bool [] > diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c [] > @@ -1738,7 +1738,7 @@ static void rtw_chk_hi_queue_hdl(struct adapter *padapter) > pstapriv->tim_bitmap &= ~BIT(0); > pstapriv->sta_dz_bitmap &= ~BIT(0); > > - if (update_tim == true) > + if (update_tim) > update_beacon(padapter, _TIM_IE_, NULL, true); > } else {/* re check again */ > rtw_chk_hi_queue_cmd(padapter); There are dozens of these in this file and even more in the subsystem. $ git grep -P '(==|!=)\s*(true|false)' drivers/staging/rtl8723bs/core/rtw_cmd.c | wc -l 22 When you submit a patch for a single file, at least please try to do all the instances in the file.