Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753328AbdDJLv4 (ORCPT ); Mon, 10 Apr 2017 07:51:56 -0400 Received: from mail.us.es ([193.147.175.20]:43450 "EHLO mail.us.es" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751615AbdDJLvy (ORCPT ); Mon, 10 Apr 2017 07:51:54 -0400 Date: Mon, 10 Apr 2017 13:51:44 +0200 From: Pablo Neira Ayuso To: Arushi Singhal Cc: Jan Engelhardt , Jozsef Kadlecsik , "David S. Miller" , netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, LKML Subject: Re: [PATCH] net: netfilter: Replace explicit NULL comparisons Message-ID: <20170410115144.GA2155@salvia> References: <20170408172113.GA9352@arushi-HP-Pavilion-Notebook> <20170408201438.GC2679@salvia> 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 List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 951 Lines: 21 On Sun, Apr 09, 2017 at 09:12:18AM +0530, Arushi Singhal wrote: > On Sun, Apr 9, 2017 at 1:44 AM, Pablo Neira Ayuso > wrote: > > > On Sat, Apr 08, 2017 at 08:21:56PM +0200, Jan Engelhardt wrote: > > > On Saturday 2017-04-08 19:21, Arushi Singhal wrote: > > > > > > >Replace explicit NULL comparison with ! operator to simplify code. > > > > > > I still wouldn't do this, for the same reason as before. Comparing to > > > NULL explicitly more or less gave an extra guarantee that the other > > > operand was also a pointer. > > > > Arushi, where does it say in the coding style that this is prefered? > > This is reported by checkpatch.pl script. I don't find it in the coding style. I think this is what it stands as preference in this case IMO. Otherwise, it would be good to get the kernel coding style document in sync with it, including the reason why this way to express thing is cleaner. We have to justify the changes.