On Fri, 2026-09-11 at 14:34 +0200, Tobias Schaffner wrote:
> +static int rv_edge_stats_create(struct dentry *parent)
> +{
> +     rv_edge_stats_reset();
> +     /* RV_MODE_READ is private to kernel/trace/rv/. */
> +     rv_this_stats_file = tracefs_create_file("stats", 0440, parent,
> +                                              NULL, &rv_edge_stats_fops);
> +     return rv_this_stats_file ? 0 : -ENOMEM;
> +}
> +
> +static void rv_edge_stats_remove(void)
> +{
> +     tracefs_remove(rv_this_stats_file);
> +     rv_this_stats_file = NULL;
> +}

Very minor nit, just for consistency you may want to use the macros
rv_create_file() / rv_remove(). You also probably don't need to include
tracefs.
You can also just include "rv.h" instead of <linux/rv.h> and
<linux/tracefs.h>.

> +
> +/* A zero timestamp marks resets, which can run on a different CPU. */
> +#define da_state_entered(s)  da_state_pack((s), local_clock() &
> RV_TS_MASK)

Isn't this masking already happening in da_state_pack() ?

Thanks,
Gabriele


Reply via email to