Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1064106yba; Sat, 6 Apr 2019 02:44:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqyWpIPHNgv3ffh+KYp1SZyMh/qDQGuH4+Gm6Tl+aKEY3icgo7Uu7C3A1L47+SpoxcxcaqDm X-Received: by 2002:a63:570d:: with SMTP id l13mr16928479pgb.55.1554543851901; Sat, 06 Apr 2019 02:44:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554543851; cv=none; d=google.com; s=arc-20160816; b=WuvnhzJdQoAj4GF/1O7Vic7cSgABrMJqGQRTaeQJOduwLhAYm2ZsWkfo1gm2+RLP6H a9rzct17EoUUTQ1L+Gye3HiAKT2McXikJs4oIPqRw5dsr9U2kNnoVKu/6VoRDXSEDQc1 EmHompJ7dqGiy1VnrPqtjymoASj08AMVPGQJk1OMwEBuwM0uS4m/N5coPR2v240LfDZQ KkIEmRAct4gM969WX3Pp9JZxFyBUIfZXyLeczJ0ka+P668tS5sTHAHYooYErWlbhgAdr nJJZJviECKJcxjTCpXauy3bfRiPo1vMdXeXsOlU9miBbuFG32ae9nh/XRjSorLOS8wvw mjpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=ak0Qbo8kf9en6rIE7yhL0j6IP5ASkK/EvT7gWvY6tss=; b=jBQNY4UJAjMdbgwFog8p2jj3eh87FP3bnDh7H6UmaUERJ0u8CViP+745mpoU0fPMlY Pq4S9fNC9TokXitpIOdKkBYPK/YIP9qBuroSTM5onzBnDbId2AgcJa1oK2p5WIKvq4jl GVOYtaPc/xXxELa0bxERab4q8Tr/ywFQt4eV4EAg3zoptpUZ0372RW0eNIN+w6Vf95FP ge/nDgxvGw9w4Pf5gTZigVuNgYw9dPP0sYm8ITHj49tpa+yptLH0tJs7JF/ncpxWOEsS c1o4GIBDtiS3j8epnzuq7Jfg7VprC1IYs5waqR5CRR6jk01SjIWshD7O0nsGEi5CTCJJ +rDg== 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 j30si21239399pgl.338.2019.04.06.02.43.56; Sat, 06 Apr 2019 02:44:11 -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 S1726431AbfDFJnV (ORCPT + 99 others); Sat, 6 Apr 2019 05:43:21 -0400 Received: from 178.115.242.59.static.drei.at ([178.115.242.59]:60729 "EHLO mail.osadl.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726036AbfDFJnV (ORCPT ); Sat, 6 Apr 2019 05:43:21 -0400 X-Greylist: delayed 419 seconds by postgrey-1.27 at vger.kernel.org; Sat, 06 Apr 2019 05:43:19 EDT Received: by mail.osadl.at (Postfix, from userid 1001) id 384AB5C36D6; Sat, 6 Apr 2019 11:35:34 +0200 (CEST) Date: Sat, 6 Apr 2019 11:35:34 +0200 From: Nicholas Mc Guire To: Julian Calaby Cc: Nicholas Mc Guire , Adham Abozaeid , Ajay Singh , Greg Kroah-Hartman , linux-wireless@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH V2] staging: wilc1000: drop explicit conversion to bool Message-ID: <20190406093534.GA3972@osadl.at> References: <1554540030-12740-1-git-send-email-hofrat@osadl.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Apr 06, 2019 at 08:11:55PM +1100, Julian Calaby wrote: > Hi Nicholas, > > On Sat, Apr 6, 2019 at 7:48 PM Nicholas Mc Guire wrote: > > > > As the expression evaluates to a boolean anyway (relational and logical > > operators) conversion with the ternary operator is not needed here as > > coccinelle notes (boolconv.cocci) > > > > Signed-off-by: Nicholas Mc Guire > > --- > > > > V2: sent out the wrong version - the commit message was longer than 75 > > chars - only change here is the commit message wrapping. > > > > scripts/coccinelle/misc/boolconv.cocci warned about: > > drivers/staging/wilc1000/wilc_wlan.c:14:48-53: WARNING: conversion to bool not needed here > > > > Patch was compile tested with: x86_64_defconfig + Staging=y, > > WILC1000_SDIO=m, WILC1000_SPI=m, WILC1000=m > > (checkpatch, sparse and cocci clean otherwise) > > > > Patch is against 5.1-rc3 (localversion-next is -next-20190403) > > > > drivers/staging/wilc1000/wilc_wlan.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c > > index c238969..6c9fd3a 100644 > > --- a/drivers/staging/wilc1000/wilc_wlan.c > > +++ b/drivers/staging/wilc1000/wilc_wlan.c > > @@ -11,7 +11,7 @@ > > > > static inline bool is_wilc1000(u32 id) > > { > > - return ((id & 0xfffff000) == 0x100000 ? true : false); > > + return ((id & 0xfffff000) == 0x100000); > > Whilst you're here, you might as well remove the superfluous parentheses. > fine - there are a few other places though that this would need to be cleaned up to be consistent e.g. entries = ((reg >> 3) & 0x3f); wilc_wlan.c > Other than that, > > Reviewed-by: Julian Calaby > will resend with outer () dropped and Reviewed-by: added thx! hofrat > Thanks, > > -- > Julian Calaby > > Email: julian.calaby@gmail.com > Profile: http://www.google.com/profiles/julian.calaby/