[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADnq5_Nei-XHsD8DQkpUGZwZAik5X-S1R3znOJGD1X2jAxD6_g@mail.gmail.com>
Date: Mon, 15 May 2023 10:11:39 -0400
From: Alex Deucher <alexdeucher@...il.com>
To: Dan Carpenter <dan.carpenter@...aro.org>
Cc: Su Hui <suhui@...china.com>, Xinhui.Pan@....com,
kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org,
amd-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
Alex Deucher <alexander.deucher@....com>,
christian.koenig@....com
Subject: Re: [PATCH] drm/amdgpu: remove unnecessary (void*) conversions
On Mon, May 15, 2023 at 3:17 AM Dan Carpenter <dan.carpenter@...aro.org> wrote:
>
> On Mon, May 15, 2023 at 09:34:28AM +0800, Su Hui wrote:
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
> > index f60753f97ac5..c837e0bf2cfc 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
> > @@ -1470,7 +1470,7 @@ int amdgpu_debugfs_regs_init(struct amdgpu_device *adev)
> >
> > static int amdgpu_debugfs_test_ib_show(struct seq_file *m, void *unused)
> > {
> > - struct amdgpu_device *adev = (struct amdgpu_device *)m->private;
> > + struct amdgpu_device *adev = m->private;
> > struct drm_device *dev = adev_to_drm(adev);
> > int r = 0, i;
> >
>
> This declaration block was originally written in reverse Christmas tree
> order:
>
> long long long variable name;
> medium length name;
> short name;
>
> So you probably want to change the order now that the lengths have
> changed. Same in the other places as well.
I don't think it's possible due to the variable dependencies unless
you separate the declarations and assignments which doesn't seem like
a net win to me.
Alex
>
> regards,
> dan carpenter
>
Powered by blists - more mailing lists