Re: [PATCH 12/25] drm: kirin: Reanme dc_ops to kirin_drm_data

Sam Ravnborg
2019-04-24T16:57:57Z

Hi again.

On Wed, Apr 24, 2019 at 06:52:26PM +0200, Sam Ravnborg wrote:
> Hi John.
>
> On Tue, Apr 23, 2019 at 04:20:43PM -0700, John Stultz wrote:
> > From: Xu YiPing <xuyiping@hisilicon.com>
> >
> > As part of refactoring the kirin driver to better support
> > different hardware revisions, this patch renames the
> > struct kirin_dc_ops to struct kirin_drm_data and cleans
> > up the related variable names.
> >
> > Cc: Xinliang Liu <z.liuxinliang@hisilicon.com>
> > Cc: Rongrong Zou <zourongrong@gmail.com>
> > Cc: Xinwei Kong <kong.kongxinwei@hisilicon.com>
> > Cc: Chen Feng <puck.chen@hisilicon.com>
> > Cc: David Airlie <airlied@linux.ie>
> > Cc: Daniel Vetter <daniel@ffwll.ch>
> > Cc: dri-devel <dri-devel@lists.freedesktop.org>
> > Signed-off-by: Xu YiPing <xuyiping@hisilicon.com>
> > [jstultz: reworded commit message]
> > Signed-off-by: John Stultz <john.stultz@linaro.org>
> > ---
> > drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 2 +-
> > drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 16 ++++++++--------
> > drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.h | 4 ++--
> > 3 files changed, 11 insertions(+), 11 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
> > index 69604ad..221bfbb 100644
> > --- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
> > +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
> > @@ -1055,7 +1055,7 @@ static void ade_drm_cleanup(struct platform_device *pdev)
> > {
> > }
> >
> > -const struct kirin_dc_ops ade_dc_ops = {
> > +struct kirin_drm_data ade_driver_data = {
> > .init = ade_drm_init,
> > .cleanup = ade_drm_cleanup
> > };
> This rename does not help readability. An _ops often/always hold
> function pointers. Where _data hold data.
> So it looks wrong to name this _data.
Reading later pathes the rename makes good sense, so disregard this.

Sam