IS_ERR_OR_NULL() already uses likely(!ptr) internally. checkpatch does not like nesting it: > WARNING: nested (un)?likely() calls, IS_ERR_OR_NULL already uses > unlikely() internally Remove the explicit use of likely().
Change generated with coccinelle. To: Andrew Morton <[email protected]> To: Thomas Gleixner <[email protected]> Cc: [email protected] Signed-off-by: Philipp Hahn <[email protected]> --- lib/debugobjects.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/debugobjects.c b/lib/debugobjects.c index 12f50de85b621a743a5b6f2638a308f6162c6fcc..12e2e42e6a31aa8706e859aca41b81c03889cffe 100644 --- a/lib/debugobjects.c +++ b/lib/debugobjects.c @@ -1024,7 +1024,7 @@ void debug_object_assert_init(void *addr, const struct debug_obj_descr *descr) raw_spin_lock_irqsave(&db->lock, flags); obj = lookup_object_or_alloc(addr, db, descr, false, true); raw_spin_unlock_irqrestore(&db->lock, flags); - if (likely(!IS_ERR_OR_NULL(obj))) + if (!IS_ERR_OR_NULL(obj)) return; /* If NULL the allocation has hit OOM */ -- 2.43.0
