From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753337AbaKLWJA (ORCPT ); Wed, 12 Nov 2014 17:09:00 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:18120 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752597AbaKLWI6 (ORCPT ); Wed, 12 Nov 2014 17:08:58 -0500 Date: Thu, 13 Nov 2014 01:08:40 +0300 From: Dan Carpenter To: SF Markus Elfring Cc: Greg Kroah-Hartman , devel@driverdev.osuosl.org, trivial@kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, Coccinelle Subject: Re: [PATCH v2 1/2] staging: rtl8188eu: Deletion of unnecessary checks before three function calls Message-ID: <20141112220840.GL5351@mwanda> References: <5317A59D.4@users.sourceforge.net> <544954FD.8040607@users.sourceforge.net> <20141029084702.GA18675@kroah.com> <5453CD0D.9010206@users.sourceforge.net> <5463C10D.6020409@users.sourceforge.net> <5463C22B.7060405@users.sourceforge.net> <20141112211815.GJ6749@mwanda> <5463D109.4020702@users.sourceforge.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5463D109.4020702@users.sourceforge.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: ucsinet21.oracle.com [156.151.31.93] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 12, 2014 at 10:28:41PM +0100, SF Markus Elfring wrote: > > This is especially true if you have trained yourself to know that > > free_netdev() can't accept NULL pointers. > > Do you need to adjust your concerns a bit over time when function variants > provide a corresponding safety check in their implementations? No. Really, free_netdev vs rtw_free_netdev is just an example where it is really bad, but I feel that all of these patches are misguided and harmful. We should have an if statement if the allocation is optional, we should not have an if statement if the allocation is required. regards, dan carpenter