Re: [PATCH] drm/panel: visionox-rm69299: Remove redundant assignments of panel fields

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 2, 2024 at 8:50 PM Dmitry Baryshkov
<dmitry.baryshkov@xxxxxxxxxx> wrote:
>
> On Mon, Dec 02, 2024 at 02:24:48PM +0800, Chen-Yu Tsai wrote:
> > drm_panel_init() was made to initialize the fields in |struct drm_panel|.
> > There is no need to separately initialize them again.
> >
> > Drop the separate assignments that are redundant.
> >
> > Signed-off-by: Chen-Yu Tsai <wenst@xxxxxxxxxxxx>
> > ---
> >  drivers/gpu/drm/panel/panel-visionox-rm69299.c | 3 ---
> >  1 file changed, 3 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/panel/panel-visionox-rm69299.c b/drivers/gpu/drm/panel/panel-visionox-rm69299.c
> > index 272490b9565b..1df5303eb57c 100644
> > --- a/drivers/gpu/drm/panel/panel-visionox-rm69299.c
> > +++ b/drivers/gpu/drm/panel/panel-visionox-rm69299.c
> > @@ -193,7 +193,6 @@ static int visionox_rm69299_probe(struct mipi_dsi_device *dsi)
> >
> >       mipi_dsi_set_drvdata(dsi, ctx);
> >
> > -     ctx->panel.dev = dev;
>
> No, this will break one of the following function calls. Please refactor
> them too.

You're right. And it mixes usage of `ctx->panel.dev` and `dev`.
I'll send v2 getting rid of `ctx->panel.dev`.

ChenYu

> >       ctx->dsi = dsi;
> >
> >       ctx->supplies[0].supply = "vdda";
> > @@ -215,8 +214,6 @@ static int visionox_rm69299_probe(struct mipi_dsi_device *dsi)
> >
> >       drm_panel_init(&ctx->panel, dev, &visionox_rm69299_drm_funcs,
> >                      DRM_MODE_CONNECTOR_DSI);
> > -     ctx->panel.dev = dev;
> > -     ctx->panel.funcs = &visionox_rm69299_drm_funcs;
> >       drm_panel_add(&ctx->panel);
> >
> >       dsi->lanes = 4;
> > --
> > 2.47.0.338.g60cca15819-goog
> >
>
> --
> With best wishes
> Dmitry




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux