[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CADnq5_N8_VjK17iWMp2q3p5QHtHM7wH1HmX7qLPoL6e2WS_kRQ@mail.gmail.com>
Date: Mon, 28 Apr 2025 13:24:10 -0400
From: Alex Deucher <alexdeucher@...il.com>
To: R Sundar <prosunofficial@...il.com>
Cc: Alex Deucher <alexander.deucher@....com>,
Christian König <christian.koenig@....com>,
David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>, Sunil Khatri <sunil.khatri@....com>,
Tim Huang <Tim.Huang@....com>, "Jesse . zhang @ amd . com" <Jesse.zhang@....com>,
Boyuan Zhang <boyuan.zhang@....com>,
Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@....com>, Yang Wang <kevinyang.wang@....com>,
Peyton Lee <peytolee@....com>, amd-gfx@...ts.freedesktop.org,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
kernel test robot <lkp@...el.com>, Julia Lawall <julia.lawall@...ia.fr>
Subject: Re: [PATCH linux-next] drm/amdgpu: use string choice helpers
On Sun, Apr 27, 2025 at 5:46 AM R Sundar <prosunofficial@...il.com> wrote:
>
> Use string choice helpers for better readability.
>
> Reported-by: kernel test robot <lkp@...el.com>
> Reported-by: Julia Lawall <julia.lawall@...ia.fr>
> Closes: https://lore.kernel.org/r/202503222049.sUXL3q6w-lkp@intel.com/
> Signed-off-by: R Sundar <prosunofficial@...il.com>
> ---
>
> Reported in linux repository.
>
> cocci warnings: (new ones prefixed by >>)
> >> drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c:311:49-70: opportunity for str_true_false(vpe -> collaborate_mode)
>
> vim +311 drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c
>
> for linux-next:
>
> drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c
> index 121ee17b522b..442d137e0fed 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c
> @@ -317,7 +317,7 @@ static int vpe_early_init(struct amdgpu_ip_block *ip_block)
> vpe_set_ring_funcs(adev);
> vpe_set_regs(vpe);
>
> - dev_info(adev->dev, "VPE: collaborate mode %s", vpe->collaborate_mode ? "true" : "false");
> + dev_info(adev->dev, "VPE: collaborate mode %s", str_true_false(vpe->collaborate_mode));
I'm not opposed to this change if there is a general initiative to
convert everyone over to using this for some useful reason, but I
personally don't think it helps readability at all. If anything it
makes it worse in my opinion.
Alex
>
> return 0;
> }
> --
> 2.34.1
>
Powered by blists - more mailing lists