Messages in this thread | | | From | Andi Kleen <> | Subject | Re: [PATCH] f2fs: add unlikely() macro for compiler more aggressively | Date | Fri, 06 Dec 2013 10:24:31 -0800 |
| |
Jaegeuk Kim <jaegeuk.kim@samsung.com> writes: > struct page *page; > repeat: > page = grab_cache_page(mapping, index); > - if (!page) { > + if (unlikely(!page)) {
This is completely pointless, gcc already considers any test for NULL unlikely.
In general i would advise against splattering unlikely all over your code, the benefits are very minimal and programers often get it wrong.
-Andi
-- ak@linux.intel.com -- Speaking for myself only
| |