Cheers, Kyle Moffett static inline void kfree(void *ptr) { if (__builtin_constant_p((ptr == NULL))) { if (ptr) kfree_nonnull(ptr); } else { kfree_unknown(ptr); } } void kfree_nonnull(void *ptr) { /* kfree code here, no null check */ } void kfree_unknown(void *ptr) { if (ptr) kfree_nonnull(ptr); } - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: [PATCH] likely cleanup: remove unlikely for kfree(NULL)
- From: Bart Hartgers <[email protected]>
- Re: [PATCH] likely cleanup: remove unlikely for kfree(NULL)
- From: Pekka J Enberg <[email protected]>
- Re: [PATCH] likely cleanup: remove unlikely for kfree(NULL)
- References:
- [PATCH] likely cleanup: remove unlikely for kfree(NULL)
- From: Hua Zhong <[email protected]>
- Re: [PATCH] likely cleanup: remove unlikely for kfree(NULL)
- From: "Pekka Enberg" <[email protected]>
- Re: [PATCH] likely cleanup: remove unlikely for kfree(NULL)
- From: Arjan van de Ven <[email protected]>
- Re: [PATCH] likely cleanup: remove unlikely for kfree(NULL)
- From: Pekka J Enberg <[email protected]>
- Re: [PATCH] likely cleanup: remove unlikely for kfree(NULL)
- From: Arjan van de Ven <[email protected]>
- Re: [PATCH] likely cleanup: remove unlikely for kfree(NULL)
- From: Jörn Engel <[email protected]>
- Re: [PATCH] likely cleanup: remove unlikely for kfree(NULL)
- From: Arjan van de Ven <[email protected]>
- Re: [PATCH] likely cleanup: remove unlikely for kfree(NULL)
- From: Pekka J Enberg <[email protected]>
- Re: [PATCH] likely cleanup: remove unlikely for kfree(NULL)
- From: Arjan van de Ven <[email protected]>
- Re: [PATCH] likely cleanup: remove unlikely for kfree(NULL)
- From: Jörn Engel <[email protected]>
- Re: [PATCH] likely cleanup: remove unlikely for kfree(NULL)
- From: Bart Hartgers <[email protected]>
- Re: [PATCH] likely cleanup: remove unlikely for kfree(NULL)
- From: Bart Hartgers <[email protected]>
- [PATCH] likely cleanup: remove unlikely for kfree(NULL)
- Prev by Date: Re: Highpoint SATA RAID (khe khe) status -- oopses, crashes, etc
- Next by Date: Re: [PATCH 001/001] INPUT: new ioctl's to retrieve values of EV_REP and EV_SND event codes
- Previous by thread: Re: [PATCH] likely cleanup: remove unlikely for kfree(NULL)
- Next by thread: Re: [PATCH] likely cleanup: remove unlikely for kfree(NULL)
- Index(es):