From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752576AbaLABeu (ORCPT ); Sun, 30 Nov 2014 20:34:50 -0500 Received: from mout.web.de ([212.227.17.11]:57714 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752167AbaLABes (ORCPT ); Sun, 30 Nov 2014 20:34:48 -0500 Message-ID: <547BC5AD.6090500@users.sourceforge.net> Date: Mon, 01 Dec 2014 02:34:37 +0100 From: SF Markus Elfring User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Lino Sanfilippo , Olof Johansson , netdev@vger.kernel.org, backports@vger.kernel.org CC: LKML , kernel-janitors@vger.kernel.org, Julia Lawall , "Luis R. Rodriguez" Subject: Re: net-PA Semi: Deletion of unnecessary checks before the function call "pci_dev_put" References: <5307CAA2.8060406@users.sourceforge.net> <530A086E.8010901@users.sourceforge.net> <530A72AA.3000601@users.sourceforge.net> <530B5FB6.6010207@users.sourceforge.net> <530C5E18.1020800@users.sourceforge.net> <530CD2C4.4050903@users.sourceforge.net> <530CF8FF.8080600@users.sourceforge.net> <530DD06F.4090703@users.sourceforge.net> <5317A59D.4@users.sourceforge.net> <547A09B1.9090102@users.sourceforge.net> <547B579F.10709@gmx.de> In-Reply-To: <547B579F.10709@gmx.de> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:Jlz7sGMncV9s6QFuymnry8Y4B4TTxFekSUI16grUtYLnCIdiFhJ H+IoAe1pWbyprHoriBS6q6t12YLkOpzFy3lon/f0/gfgV1Cn7wy3grooZbJrDM4rxdyYE2C WFrrl5a64/fGaI3eO0WzsrfXBFVDdnbsB32pPronCRg9ZW74jPpHz78cSJ1UmSXEPF4ohUd ZNuXe5NacypQp7QEwma3A== X-UI-Out-Filterresults: notjunk:1; Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > I know there has been some criticism about those kind of "code > improvements" already but i would like to point out just one more thing: > > Some of those NULL pointer checks on input parameters may have been > added subsequently to functions. So there may be older kernel versions > out there in which those checks dont exists in some cases. If some of > the now "cleaned up" code is backported to such a kernel chances are > good that those missing checks are overseen. And then neither caller nor > callee is doing the NULL pointer check. I guess that the Coccinelle software can also help you in this use case. How do you think about to shield against "unwanted" or unexpected collateral evolutions with additional inline functions? I assume that a few backporters can tell you more about their corresponding software development experiences. http://www.do-not-panic.com/2014/04/automatic-linux-kernel-backporting-with-coccinelle.html Regards, Markus