From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751616AbaK2Mkk (ORCPT ); Sat, 29 Nov 2014 07:40:40 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:29596 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751502AbaK2Mki (ORCPT ); Sat, 29 Nov 2014 07:40:38 -0500 X-IronPort-AV: E=Sophos;i="5.07,483,1413237600"; d="scan'208";a="110209811" Date: Sat, 29 Nov 2014 13:40:34 +0100 (CET) From: Julia Lawall X-X-Sender: jll@hadrien To: OGAWA Hirofumi cc: SF Markus Elfring , Julia Lawall , linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, trivial@kernel.org, Coccinelle Subject: Re: [PATCH v2] fs-fat: Less function calls in fat_fill_super() after error detection In-Reply-To: <87sih22sn8.fsf@devron.myhome.or.jp> Message-ID: 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> <5467B12C.4010602@users.sourceforge.net> <54796B5E.5040707@users.sourceforge.net> <87sih22sn8.fsf@devron.myhome.or.jp> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 29 Nov 2014, OGAWA Hirofumi wrote: > SF Markus Elfring writes: > > > From: Markus Elfring > > Date: Sat, 29 Nov 2014 07:37:34 +0100 > > > > The iput() function was called in an inefficient way by the implementation > > of the fat_fill_super() function in case of an allocation failure. > > The corresponding source code was improved by deletion of two unnecessary > > null pointer checks and a few adjustments for jump labels. > > iput() checks NULL of inode. What is wrong just remove NULL check, > instead of adding new jump labels? Personally, I prefer that code that can be statically determined not to need to be executed not to be executed. It can make the code easier to understand, because each function is only called when doing so is useful, and it can be helpful to static analysis. julia From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julia Lawall Date: Sat, 29 Nov 2014 12:40:34 +0000 Subject: Re: [PATCH v2] fs-fat: Less function calls in fat_fill_super() after error detection Message-Id: List-Id: 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> <5467B12C.4010602@users.sourceforge.net> <54796B5E.5040707@users.sourceforge.net> <87sih22sn8.fsf@devron.myhome.or.jp> In-Reply-To: <87sih22sn8.fsf@devron.myhome.or.jp> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: cocci@systeme.lip6.fr On Sat, 29 Nov 2014, OGAWA Hirofumi wrote: > SF Markus Elfring writes: > > > From: Markus Elfring > > Date: Sat, 29 Nov 2014 07:37:34 +0100 > > > > The iput() function was called in an inefficient way by the implementation > > of the fat_fill_super() function in case of an allocation failure. > > The corresponding source code was improved by deletion of two unnecessary > > null pointer checks and a few adjustments for jump labels. > > iput() checks NULL of inode. What is wrong just remove NULL check, > instead of adding new jump labels? Personally, I prefer that code that can be statically determined not to need to be executed not to be executed. It can make the code easier to understand, because each function is only called when doing so is useful, and it can be helpful to static analysis. julia From mboxrd@z Thu Jan 1 00:00:00 1970 From: julia.lawall@lip6.fr (Julia Lawall) Date: Sat, 29 Nov 2014 13:40:34 +0100 (CET) Subject: [Cocci] [PATCH v2] fs-fat: Less function calls in fat_fill_super() after error detection In-Reply-To: <87sih22sn8.fsf@devron.myhome.or.jp> 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> <5467B12C.4010602@users.sourceforge.net> <54796B5E.5040707@users.sourceforge.net> <87sih22sn8.fsf@devron.myhome.or.jp> Message-ID: To: cocci@systeme.lip6.fr List-Id: cocci@systeme.lip6.fr On Sat, 29 Nov 2014, OGAWA Hirofumi wrote: > SF Markus Elfring writes: > > > From: Markus Elfring > > Date: Sat, 29 Nov 2014 07:37:34 +0100 > > > > The iput() function was called in an inefficient way by the implementation > > of the fat_fill_super() function in case of an allocation failure. > > The corresponding source code was improved by deletion of two unnecessary > > null pointer checks and a few adjustments for jump labels. > > iput() checks NULL of inode. What is wrong just remove NULL check, > instead of adding new jump labels? Personally, I prefer that code that can be statically determined not to need to be executed not to be executed. It can make the code easier to understand, because each function is only called when doing so is useful, and it can be helpful to static analysis. julia