Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

debugobjects: Drop likely() around !IS_ERR_OR_NULL()

IS_ERR_OR_NULL() already uses likely(!ptr) internally. checkpatch points
out the nesting: Remove the explicit use of likely().

Change generated with coccinelle.

Signed-off-by: Philipp Hahn <phahn-oss@avm.de>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20260310-b4-is_err_or_null-v1-59-bd63b656022d@avm.de

authored by

Philipp Hahn and committed by
Thomas Gleixner
723ddce9 c3692998

+1 -1
+1 -1
lib/debugobjects.c
··· 1024 1024 raw_spin_lock_irqsave(&db->lock, flags); 1025 1025 obj = lookup_object_or_alloc(addr, db, descr, false, true); 1026 1026 raw_spin_unlock_irqrestore(&db->lock, flags); 1027 - if (likely(!IS_ERR_OR_NULL(obj))) 1027 + if (!IS_ERR_OR_NULL(obj)) 1028 1028 return; 1029 1029 1030 1030 /* If NULL the allocation has hit OOM */