Re: [PATCH] drm/msm/dp: Simplify the dp_debug debugfs show function

From: Stephen Boyd
Date: Thu Oct 07 2021 - 14:46:00 EST


Quoting Bjorn Andersson (2021-10-07 11:33:41)
> The "dp_debug" show function allocates a buffer and piecemeal appends
> line by line, checking for buffer overflows etc.
>
> Migrate the function to seq_file, to remove all the extra book keeping
> and simplify the function.
>
> Signed-off-by: Bjorn Andersson <bjorn.andersson@xxxxxxxxxx>
> ---

Thanks

Reviewed-by: Stephen Boyd <swboyd@xxxxxxxxxxxx>

> drivers/gpu/drm/msm/dp/dp_debug.c | 161 +++++-------------------------
> 1 file changed, 24 insertions(+), 137 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/dp/dp_debug.c b/drivers/gpu/drm/msm/dp/dp_debug.c
> index 2f6247e80e9d..566037942343 100644
> --- a/drivers/gpu/drm/msm/dp/dp_debug.c
> +++ b/drivers/gpu/drm/msm/dp/dp_debug.c
> -static ssize_t dp_debug_read_info(struct file *file, char __user *user_buff,
> - size_t count, loff_t *ppos)
> -{
> - struct dp_debug_private *debug = file->private_data;
> - char *buf;
> - u32 len = 0, rc = 0;
> + struct dp_debug_private *debug = seq->private;

const?

> u64 lclk = 0;