Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1382596pxb; Wed, 20 Oct 2021 04:05:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxv0+YTTcaOTPfBmJIqfLO50BvOodOMiq6YAox4b30l9q7QE8AD5CwtgznrCEcr46l2rTPx X-Received: by 2002:adf:ca10:: with SMTP id o16mr49734201wrh.212.1634727951320; Wed, 20 Oct 2021 04:05:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634727951; cv=none; d=google.com; s=arc-20160816; b=Tjhq1zkl+BE7XIf28SnMQ/A/k9rlj6Vez/oPeu6D+F5fJeCwKGmQYUv3td9gZ+7+WS c24ZLxpmtaiFeu4+Nox0bThvzP8pCNRfpPp24BPakgQzs3zCAZBAK4C0l2CGbSpMxfZI wZG4djkeOi0JFNml1R7Fd5iQbNbQ8VDgsWPjC5IRLr8kUhjsOV70P9yQxnbNuIBEp5tI vTRDibXc79DeZuoQ7qgZw0mCNBCYil0rJ1gDxwiU6v9Cgv7gX3GcW23MOBGO2KgBLF05 7k48SvmLBLHGWWkPpzPALltqf173mXEe9Vnamcr7OKqPqCL3ojYB/TaupEak+74J+z+f RQgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=KJUoWWS50AJCzcW+X67eTS+oGOVOsfqp2FnJa9erQtc=; b=kc8VB4NbvP6nOqg/qivM5mCSQsF+OQHKlxq1JN/Z9fkSMQwF5zP3KPWh3tMsJ614N8 7wVcsHLKbEo1lh2+NUBLAVbmzJXhWLEx8Gs9qmgwBB0GSoIiYyl1rFXr+wZb8+pQScgL l460i+vkdL4MuGDabrra+4y/60mm8kZcYKikdBY/kebKueVLn50ks/3cageLFIlac3xX ss7mdGk32R2x+Eg6hxtBPmddW6+tyTQyr0YyAs06CCiDZOYKg393dRHT0x+BNPBioJux IisyYEOGmQUvCb1JRWxXQZj6IAXEiEoEeT5NZyyD5NtM0l16OOxSkpRYWJyzJL9VM8Hk PMaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=gmEfXtL7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s1si2113329ejs.162.2021.10.20.04.05.26; Wed, 20 Oct 2021 04:05:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=gmEfXtL7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230111AbhJTLFw (ORCPT + 99 others); Wed, 20 Oct 2021 07:05:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:39738 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229910AbhJTLFv (ORCPT ); Wed, 20 Oct 2021 07:05:51 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B2C61613A7; Wed, 20 Oct 2021 11:03:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1634727817; bh=f8Lhl6mKTN67y6PmZ1jxu5lUkqjWdReY/Zc4Ljiid30=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gmEfXtL79/x0McMbGKjYTAyrQtrnRA0L51KbagBD9VaMI0GUfTiyjT8bmVRyN97l8 PPRA0ia9CTILPeI/dKA3q/wDzdOFpwbM04/aHf6lDnzBQDRYM9lxXb5MGjEdCGh35+ +KxIO2Ift22K328aJIu2x9yRbTEvt/aN4p+z7LDQ= Date: Wed, 20 Oct 2021 13:03:34 +0200 From: Greg KH To: Kushal Kothari Cc: fabioaiuto83@gmail.com, marcocesati@gmail.com, dan.carpenter@oracle.com, ross.schm.dev@gmail.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, outreachy-kernel@googlegroups.com, mike.rapoport@gmail.com, staging@lists.linux.dev Subject: Re: [PATCH v2] staging: rtl8723bs: core: Remove true and false comparison Message-ID: References: <20211020105401.131254-1-kushalkothari285@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211020105401.131254-1-kushalkothari285@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 20, 2021 at 04:24:01PM +0530, Kushal Kothari wrote: > Remove comparison to true and false in if statement. > Issue found with checkpatch.pl. > CHECK: Using comparison to true is error prone > CHECK: Using comparison to false is error prone > > Signed-off-by: Kushal Kothari > --- > > Changes in v2: Remove unnecessary parentheses. > > drivers/staging/rtl8723bs/core/rtw_cmd.c | 50 ++++++++++++------------ > 1 file changed, 25 insertions(+), 25 deletions(-) > > diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c > index efc9b1974e38..3e0b910114da 100644 > --- a/drivers/staging/rtl8723bs/core/rtw_cmd.c > +++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c > @@ -309,8 +309,8 @@ int rtw_cmd_filter(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj) > if (cmd_obj->cmdcode == GEN_CMD_CODE(_SetChannelPlan)) > bAllow = true; > > - if ((pcmdpriv->padapter->hw_init_completed == false && bAllow == false) > - || atomic_read(&(pcmdpriv->cmdthd_running)) == false /* com_thread not running */ > + if ((!pcmdpriv->padapter->hw_init_completed && !bAllow) || > + !atomic_read(&pcmdpriv->cmdthd_running) /* com_thread not running */ > ) > return _FAIL; > > @@ -372,7 +372,7 @@ void rtw_free_cmd_obj(struct cmd_obj *pcmd) > void rtw_stop_cmd_thread(struct adapter *adapter) > { > if (adapter->cmdThread && > - atomic_read(&(adapter->cmdpriv.cmdthd_running)) == true && > + atomic_read(&adapter->cmdpriv.cmdthd_running) && > adapter->cmdpriv.stop_req == 0) { > adapter->cmdpriv.stop_req = 1; > complete(&adapter->cmdpriv.cmd_queue_comp); > @@ -388,7 +388,7 @@ int rtw_cmd_thread(void *context) > u8 (*cmd_hdl)(struct adapter *padapter, u8 *pbuf); > void (*pcmd_callback)(struct adapter *dev, struct cmd_obj *pcmd); > struct adapter *padapter = context; > - struct cmd_priv *pcmdpriv = &(padapter->cmdpriv); > + struct cmd_priv *pcmdpriv = &padapter->cmdpriv; This is not described in your changelog text and has nothing to do with booleans :(