Thread (125 messages) 125 messages, 36 authors, 2026-04-16

Re: [PATCH 15/61] trace: Prefer IS_ERR_OR_NULL over manual NULL check

From: Steven Rostedt <rostedt@goodmis.org>
Date: 2026-03-11 14:03:44
Also in: amd-gfx, bpf, ceph-devel, cocci, dm-devel, dri-devel, gfs2, intel-gfx, intel-wired-lan, kvm, linux-block, linux-btrfs, linux-cifs, linux-clk, linux-ext4, linux-fsdevel, linux-gpio, linux-hyperv, linux-input, linux-iommu, linux-leds, linux-media, linux-mips, linux-mm, linux-modules, linux-nfs, linux-omap, linux-phy, linux-pm, linux-rockchip, linux-s390, linux-scsi, linux-sctp, linux-security-module, linux-sh, linux-sound, linux-trace-kernel, linux-usb, linux-wireless, lkml, netdev, ntfs3, sched-ext, target-devel, v9fs

On Wed, 11 Mar 2026 14:13:32 +0900
Masami Hiramatsu (Google) [off-list ref] wrote:
Hmm, now IS_ERR_OR_NULL() is an inline function, so it is safe.
But if you want to use IS_ERR_OR_NULL() here, it will be better something like

node = rhashtable_walk_next(&iter);
while (!IS_ERR_OR_NULL(node)) {
	fprobe_remove_node_in_module(mod, node, &alist);
	node = rhashtable_walk_next(&iter);
}
But now you need to have a duplicate code in order to acquire "node"

I think the patch just makes the code worse.

-- Steve
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help