From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH] net: net_cls: remove a NULL check for css_cls_state Date: Wed, 25 Apr 2018 11:00:32 -0400 (EDT) Message-ID: <20180425.110032.442063451061637265.davem@davemloft.net> References: <1524113961-30166-1-git-send-email-lirongqing@baidu.com> <20180420.103725.37816458687606953.davem@davemloft.net> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: lirongqing@baidu.com, netdev@vger.kernel.org To: roy.qing.li@gmail.com Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:50472 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753571AbeDYPAe (ORCPT ); Wed, 25 Apr 2018 11:00:34 -0400 In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: From: Li RongQing Date: Wed, 25 Apr 2018 16:35:02 +0800 > On 4/20/18, David Miller wrote: >> From: Li RongQing >> Date: Thu, 19 Apr 2018 12:59:21 +0800 >> >>> The input of css_cls_state() is impossible to NULL except >>> cgrp_css_online, so simplify it >>> >>> Signed-off-by: Li RongQing >> >> I don't view this as an improvement. Just let the helper always check >> NULL and that way there are less situations to audit. >> > css_cls_state maybe return NULL, but nearly no places check the return > value with NULL, this seems unreadable. I saw this email of your's the first few times, you don't need to post it again. I still disagree with your analysis, and I do not see your change as an overall improvement. Thank you.