Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964812AbVJMUjM (ORCPT ); Thu, 13 Oct 2005 16:39:12 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S964805AbVJMUjM (ORCPT ); Thu, 13 Oct 2005 16:39:12 -0400 Received: from ccerelbas03.cce.hp.com ([161.114.21.106]:36797 "EHLO ccerelbas03.cce.hp.com") by vger.kernel.org with ESMTP id S964812AbVJMUjK convert rfc822-to-8bit (ORCPT ); Thu, 13 Oct 2005 16:39:10 -0400 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT Subject: RE: [PATCH 09/14] Big kfree NULL check cleanup - misc remaining drivers Date: Thu, 13 Oct 2005 15:39:03 -0500 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH 09/14] Big kfree NULL check cleanup - misc remaining drivers Thread-Index: AcXQMin43or95+rvQGiYFKDHqz3czQAA8aIA From: "Miller, Mike (OS Dev)" To: "Jesper Juhl" Cc: "linux-kernel" , "Andrew Morton" , "Len Brown" , "ISS StorageDev" , "Jakub Jelinek" , "Frodo Looijaard" , "Jean Delvare" , "Bartlomiej Zolnierkiewicz" , "Jens Axboe" , "Roland Dreier" , "Sergio Rozanski Filho" , "Benjamin Herrenschmidt" , "Pierre Ossman" , "Carsten Gross" , "Greg Kroah-Hartman" , "David Hinds" , "Vinh Truong" , "Mark Douglas Corner" , "Michael Downey" , "Antonino Daplas" , "Ben Gardner" X-OriginalArrivalTime: 13 Oct 2005 20:39:05.0563 (UTC) FILETIME=[2745E2B0:01C5D036] Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1154 Lines: 43 > From: Jesper Juhl [mailto:jesper.juhl@gmail.com] > > On 10/13/05, Miller, Mike (OS Dev) wrote: > > > > I'm not sure I agree that these are pointless checks. > They're not in > > the main code path so nothing is lost by checking first. > What if the > > pointer is NULL???? > > > > If the pointer is NULL then this bit of code in kfree takes > care of things : > > void kfree(const void *objp) > { > ... > > if (unlikely(!objp)) > return; > ... > > Runtime behaviour is exactely the same. > kfree checks if the pointer passed to it is NULL in any case > and just returns if it is. okay, I'm convinced. Signed-off-by: Mike Miller > > > -- > Jesper Juhl > Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html > Plain text mails only, please http://www.expita.com/nomime.html > - 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/