Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754535AbbKQSF6 (ORCPT ); Tue, 17 Nov 2015 13:05:58 -0500 Received: from mout.web.de ([212.227.15.4]:54914 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753841AbbKQSFz (ORCPT ); Tue, 17 Nov 2015 13:05:55 -0500 Subject: Re: net-scm: Delete an unnecessary check before the function call "kfree" To: Daniel Borkmann , netdev@vger.kernel.org, "David S. Miller" 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> <564B5937.1070707@users.sourceforge.net> <564B602F.2020302@iogearbox.net> Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Julia Lawall , eric.dumazet@gmail.com From: SF Markus Elfring Message-ID: <564B6C6F.3070809@users.sourceforge.net> Date: Tue, 17 Nov 2015 19:05:35 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <564B602F.2020302@iogearbox.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:vvXgTot3L8PIgeyOhYM8JnjgFGQm1ipnPZCCxrbbgco6Qq2ZivO +tQpaOjXrVQElMJMbXIiJG37qLbEbeP9ejLQ+mprPXSxtYaHLFSTOwLMPgp9lUe7PsaCPQE iRnNGr7eKPZV8duzFm6bVde0BeyfKOobMotiNG50eH66VUwPj6G7W2qQPkxwUry+y8Q/n4e 8/hqDIYGQbSux8yW8u+UA== X-UI-Out-Filterresults: notjunk:1;V01:K0:GK1I/L6pxm8=:IEhJU1QEearMdzl7rND7wO e8jrUHHvdVDytBRAhF68wF+YiVzgQhSaSskYVh2YeIiCEdWsXqYFKDwXx6iWlzYHb/Fr8dia8 z0nTaaW8lzc/c11zmOvdGzqtuXLox0++toRGGrVi1zeuNEUkpJvG6kvAx2Vq6l1ubPmSsUyNf lxG5/9eLrw+JtX4cgieXZSly/HYlFG3nfaFnDs/vJnfKJQjdNkQjwgXSk8qY2nLXLwpN0vvTk iecQicj4pJEr8fIpFxmosT3GYWYkPyU99L7pnRu1K01YlJDYj9zK0D0zll9NfZQPcAZs4U/QH o1xcOrCyicDBVkfEf5sx3OGmuBCfOBjRO9LtaImL2CZL3WD3FzOk0ljXn9KuQvJQw4/pdTI8P NrYQVx6yDbdWHyPGUnSm3o07O8CGHC0Y8sFQ0LhhD9FUn0IIqAeFr+Ao6EJIiszCSgoEpxWg2 SCcRoe+uh30Y22iSaic/QqRncev8CxJaRPy+8rkVoEofnsed7U1zTh4QQlFMsOipLwjDEsl4E buVN/LnU88clAMNBTWuqSZcCys/z8tq0g0ofWqbVUfqfzCS66yHWfr1+K0orKb1E3TxPAlteC 5HPg5NaOT2xHmsC+zCPPw+okquWdkPMbMsW80+zMvQVEvtMvKZRWZPs4y7MSROxVDjYsTCoqV q9rS8EGFcUe8+Fii29uh61e49iU+zvvWJN1Jo9BuxdSSohT2k45Kutm283Yg0d33ShQyTx5Ao 2RbRKOJkBSOMeRYdJt0+4MpqPROlI7AnTJdvitSDGSWZQq3uUtlfps8lNN2FD4dYgMrbRSIPy dO4uRkc Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 590 Lines: 15 > Eric already mentioned that in some situations where it's critical, > it actually slows down the code, i.e. you'll have an extra > function call to get there and inside kfree() / kfree_skb() / etc, > the test is actually marked as unlikely(). How do you think about to add similar annotations to any more source code places? Regards, Markus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/