Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261349AbVC0AF7 (ORCPT ); Sat, 26 Mar 2005 19:05:59 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261367AbVC0AF7 (ORCPT ); Sat, 26 Mar 2005 19:05:59 -0500 Received: from mustang.oldcity.dca.net ([216.158.38.3]:26067 "HELO mustang.oldcity.dca.net") by vger.kernel.org with SMTP id S261349AbVC0AF4 (ORCPT ); Sat, 26 Mar 2005 19:05:56 -0500 Subject: Re: [PATCH] no need to check for NULL before calling kfree() -fs/ext2/ From: Lee Revell To: Jesper Juhl Cc: linux-os , Arjan van de Ven , ext2-devel@lists.sourceforge.net, Linux kernel In-Reply-To: References: <1111825958.6293.28.camel@laptopd505.fenrus.org> Content-Type: text/plain Date: Sat, 26 Mar 2005 19:05:55 -0500 Message-Id: <1111881955.957.11.camel@mindpipe> Mime-Version: 1.0 X-Mailer: Evolution 2.2.1.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 532 Lines: 15 On Sun, 2005-03-27 at 00:54 +0100, Jesper Juhl wrote: > I'd say that the general rule should > be "don't check for NULL first unless you *know* the pointer will be NULL > >50% of the time"... How about running the same tests but using likely()/unlikely() for the '1 in 50' cases? Lee - 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/