Thread (33 messages) 33 messages, 6 authors, 2020-05-04

Re: [PATCH v3 3/6] blktrace: move blktrace debugfs creation to helper function

From: Bart Van Assche <bvanassche@acm.org>
Date: 2020-05-02 00:25:12
Also in: linux-fsdevel, linux-mm, lkml

On 2020-04-29 00:46, Luis Chamberlain wrote:
+static struct dentry *blk_trace_debugfs_dir(struct blk_user_trace_setup *buts,
+					    struct blk_trace *bt)
+{
+	struct dentry *dir = NULL;
+
+	dir = debugfs_lookup(buts->name, blk_debugfs_root);
+	if (!dir)
+		bt->dir = dir = debugfs_create_dir(buts->name, blk_debugfs_root);
+
+	return dir;
+}
Initializing 'dir' is not necessary since the first statement overwrites
'dir'. Anyway:

Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help