From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754613AbbILLut (ORCPT ); Sat, 12 Sep 2015 07:50:49 -0400 Received: from mail-pa0-f49.google.com ([209.85.220.49]:33536 "EHLO mail-pa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754488AbbILLur (ORCPT ); Sat, 12 Sep 2015 07:50:47 -0400 Date: Sat, 12 Sep 2015 17:20:36 +0530 From: Sudip Mukherjee To: Shraddha Barke Cc: Greg Kroah-Hartman , Jes Sorensen , Julia Lawall , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 3/4] Staging: rtl8712: Bool tests don't need comparisons Message-ID: <20150912115036.GA15967@sudip-pc> References: <1442055931-6056-1-git-send-email-shraddha.6596@gmail.com> <1442055931-6056-3-git-send-email-shraddha.6596@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1442055931-6056-3-git-send-email-shraddha.6596@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Sep 12, 2015 at 04:35:30PM +0530, Shraddha Barke wrote: > This patch removes comparisons to true/false values on bool variables. > Fix made using Coccinelle > > Changes in v2- > More instances covered > > Signed-off-by: Shraddha Barke > --- You have not even build tested before sending. > drivers/staging/rtl8712/rtl871x_ioctl_set.c | 24 ++++----- > drivers/staging/rtl8712/rtl871x_mlme.c | 77 ++++++++++++++--------------- > 2 files changed, 50 insertions(+), 51 deletions(-) > > @@ -1131,9 +1130,9 @@ int r8712_select_and_join_from_scan(struct mlme_priv *pmlmepriv) > phead = &queue->queue; > pmlmepriv->pscanned = phead->next; > while (1) { > - if (end_of_queue_search(phead, pmlmepriv->pscanned) == true) { > - if ((pmlmepriv->assoc_by_rssi == true) && > - (pnetwork_max_rssi != NULL)) { > + if (end_of_queue_search(phead, pmlmepriv->pscanned)) { > + if ((pmlmepriv->assoc_by_rssi) && > + (pnetwork_max_rssi)) Coccinelle will not remove the opening brace. And in one part of the patch one test for !=NULL was modified. regards sudip