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.

tracefs: Removed unused 'ret' variable in eventfs_iterate()

Moving to guard() usage removed the need of using the 'ret' variable but
it wasn't removed. As it was set to zero, the compiler in use didn't warn
(although some compilers do).

Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Link: https://patch.msgid.link/20260414110344.75c0663f@robin
Fixes: 4d9b262031f ("eventfs: Simplify code using guard()s")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202604100111.AAlbQKmK-lkp@intel.com/
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>

-2
-2
fs/tracefs/event_inode.c
··· 574 574 struct eventfs_inode *ei; 575 575 const char *name; 576 576 umode_t mode; 577 - int ret = -EINVAL; 578 577 int ino; 579 578 int i, r, c; 580 579 ··· 598 599 * Need to create the dentries and inodes to have a consistent 599 600 * inode number. 600 601 */ 601 - ret = 0; 602 602 603 603 /* Start at 'c' to jump over already read entries */ 604 604 for (i = c; i < ei->nr_entries; i++, ctx->pos++) {