Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2741596ybi; Sun, 9 Jun 2019 19:55:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqzBcK9C9HqYhITCMv5UWhjG+LimN5rN9wc51fdGd5HBTWzW1jhkC4DO6CSdttCgRmzBUFvI X-Received: by 2002:a17:90a:8415:: with SMTP id j21mr18761745pjn.21.1560135349160; Sun, 09 Jun 2019 19:55:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560135349; cv=none; d=google.com; s=arc-20160816; b=WcDLBTrpZjVgSY7SZNBVcB6wG4ZPQgW6Aum0u87sfIwl+ae2cHwlZvMF3VV0Ymnwk7 8xuCN1h6K4Jonr1f+HGPnUrjMgEqUMYP3jC/Wa5tlP1dTEX7MMDHhyAvUc3ly/QInm96 0xBbH/jgGTx9AEFqMSJlYUj7BpJBp14uRPx/IC0GIEFPjZq0UrBGhuqbrxv15BA1UBWP UMkuau+5pFQWiNECFs6IuMBOhHEXdZE21duvQV6BX4+YlLAGeuGRyhrlRjWhjYmNxnt9 l4LOSFHdxYe0NTY7xwN5UMrAw4Qwsl+ehXeM5g9WRjqjwfQTNZFwmOPRPtKXY+4v/wkM 79WQ== 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 :references:in-reply-to:from:subject:cc:to:message-id:date; bh=eWVtt3EkL6LezHwDY3qZvuOPmNlAb03g61Jq6IxWP7s=; b=i78b2mROUhT8UDNs3UPgZxxFxEg9TVWbzczJFC5z9lY6WjJZP6J5ZPQkPdQ5aNPp+L qmBdia+8dVszihO/u8AJzevZjkSgY95Dre7d1zf8XVIN6vsLjEHtvtGiAG9ZoLjZ5r2f MvFlHMyZ6ZkzGY42zFfDVFUnYBapwNRXvjWUXOuoCWUIl6NnGK3+ORqsTLAw6r/wtfu1 SLhbUSYBPEs/vz4U2gKfNrZdr3WzYs77QG1AwJ/hQZ1/zW+wLuyBfBMMrXxsa+cgNlq4 TyYrGarva5avpZLKMVoTDx4gy19vi7ILPUBSWKhlKtr9vZdl/VUPSkAJ0tR5tSNnJTSa mPUw== 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 i36si8742132pgl.491.2019.06.09.19.55.33; Sun, 09 Jun 2019 19:55:49 -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 S2387483AbfFJCyW (ORCPT + 99 others); Sun, 9 Jun 2019 22:54:22 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:48896 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387400AbfFJCyW (ORCPT ); Sun, 9 Jun 2019 22:54:22 -0400 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::3d5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 5BE0114EADFBE; Sun, 9 Jun 2019 19:54:21 -0700 (PDT) Date: Sun, 09 Jun 2019 19:54:20 -0700 (PDT) Message-Id: <20190609.195420.1742255944804133266.davem@davemloft.net> To: hariprasad.kelam@gmail.com Cc: kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ipv6: exthdrs: fix warning comparison to bool From: David Miller In-Reply-To: <20190608083532.GA7288@hari-Inspiron-1545> References: <20190608083532.GA7288@hari-Inspiron-1545> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Sun, 09 Jun 2019 19:54:21 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hariprasad Kelam Date: Sat, 8 Jun 2019 14:05:33 +0530 > Fix below warning reported by coccicheck > > net/ipv6/exthdrs.c:180:9-29: WARNING: Comparison to bool > > Signed-off-by: Hariprasad Kelam ... > diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c > index ab5add0..e137325 100644 > --- a/net/ipv6/exthdrs.c > +++ b/net/ipv6/exthdrs.c > @@ -177,7 +177,7 @@ static bool ip6_parse_tlv(const struct tlvtype_proc *procs, > /* type specific length/alignment > checks will be performed in the > func(). */ > - if (curr->func(skb, off) == false) > + if (!curr->func(skb, off)) curr->func() returns type 'bool', whats wrong with comparing against the same type? I'm not applying stuff like this, sorry.