From: R Sundar <prosunofficial@gmail.com>
To: "Alex Deucher" <alexander.deucher@amd.com>,
"Christian König" <christian.koenig@amd.com>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Sunil Khatri" <sunil.khatri@amd.com>,
"Tim Huang" <Tim.Huang@amd.com>,
"Jesse . zhang @ amd . com" <Jesse.zhang@amd.com>,
"Boyuan Zhang" <boyuan.zhang@amd.com>,
"Pierre-Eric Pelloux-Prayer" <pierre-eric.pelloux-prayer@amd.com>,
"Yang Wang" <kevinyang.wang@amd.com>,
"Peyton Lee" <peytolee@amd.com>
Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org, R Sundar <prosunofficial@gmail.com>,
kernel test robot <lkp@intel.com>,
Julia Lawall <julia.lawall@inria.fr>
Subject: [PATCH linux-next] drm/amdgpu: use string choice helpers
Date: Sun, 27 Apr 2025 15:15:36 +0530 [thread overview]
Message-ID: <20250427094536.353823-1-prosunofficial@gmail.com> (raw)
Use string choice helpers for better readability.
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Julia Lawall <julia.lawall@inria.fr>
Closes: https://lore.kernel.org/r/202503222049.sUXL3q6w-lkp@intel.com/
Signed-off-by: R Sundar <prosunofficial@gmail.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));
return 0;
}
--
2.34.1
next reply other threads:[~2025-04-27 10:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-27 9:45 R Sundar [this message]
2025-04-28 17:24 ` [PATCH linux-next] drm/amdgpu: use string choice helpers Alex Deucher
-- strict thread matches above, loose matches on Subject: below --
2024-10-27 14:05 R Sundar
2024-10-29 13:41 ` Alex Deucher
2024-10-29 17:05 ` R Sundar
2024-10-29 17:13 ` Alex Deucher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250427094536.353823-1-prosunofficial@gmail.com \
--to=prosunofficial@gmail.com \
--cc=Jesse.zhang@amd.com \
--cc=Tim.Huang@amd.com \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=boyuan.zhang@amd.com \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=julia.lawall@inria.fr \
--cc=kevinyang.wang@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=peytolee@amd.com \
--cc=pierre-eric.pelloux-prayer@amd.com \
--cc=simona@ffwll.ch \
--cc=sunil.khatri@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox