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

From: Bart Van Assche
Date: Fri May 01 2020 - 20:25:10 EST


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@xxxxxxx>