[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20141112220840.GL5351@mwanda>
Date: Thu, 13 Nov 2014 01:08:40 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: SF Markus Elfring <elfring@...rs.sourceforge.net>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
devel@...verdev.osuosl.org, trivial@...nel.org,
kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org,
Coccinelle <cocci@...teme.lip6.fr>
Subject: Re: [PATCH v2 1/2] staging: rtl8188eu: Deletion of unnecessary
checks before three function calls
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists