Re: [PATCH] no need to check for NULL before calling kfree()-fs/ext2/

From: Lee Revell
Date: Sat Mar 26 2005 - 19:07:01 EST


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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/