linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [f2fs-dev] [PATCH v1 1/1] f2fs: Use return value of strreplace()
@ 2023-06-28 15:02 Andy Shevchenko
  2023-07-10 22:43 ` Steven Rostedt
  0 siblings, 1 reply; 3+ messages in thread
From: Andy Shevchenko @ 2023-06-28 15:02 UTC (permalink / raw)
  To: Jaegeuk Kim, Chao Yu, linux-f2fs-devel, linux-kernel,
	linux-trace-kernel
  Cc: Andy Shevchenko, Masami Hiramatsu, Steven Rostedt

Since strreplace() returns the pointer to the string itself,
we may use it directly in the code.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 include/trace/events/f2fs.h | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h
index 793f82cc1515..f5994515290c 100644
--- a/include/trace/events/f2fs.h
+++ b/include/trace/events/f2fs.h
@@ -2234,13 +2234,11 @@ DECLARE_EVENT_CLASS(f2fs__rw_start,
 		 * because this screws up the tooling that parses
 		 * the traces.
 		 */
-		__assign_str(pathbuf, pathname);
-		(void)strreplace(__get_str(pathbuf), ' ', '_');
+		__assign_str(pathbuf, strreplace(pathname, ' ', '_'));
 		__entry->offset = offset;
 		__entry->bytes = bytes;
 		__entry->i_size = i_size_read(inode);
-		__assign_str(cmdline, command);
-		(void)strreplace(__get_str(cmdline), ' ', '_');
+		__assign_str(cmdline, strreplace(command, ' ', '_'));
 		__entry->pid = pid;
 		__entry->ino = inode->i_ino;
 	),
-- 
2.40.0.1.gaa8946217a0b



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-07-11  1:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-28 15:02 [f2fs-dev] [PATCH v1 1/1] f2fs: Use return value of strreplace() Andy Shevchenko
2023-07-10 22:43 ` Steven Rostedt
2023-07-11  1:58   ` Jaegeuk Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).