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.anders...@linaro.org> > ---
Thanks Reviewed-by: Stephen Boyd <swb...@chromium.org> > 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;