[PATCH v2 3/7] media: venus: use IS_HFI() macro for multi-version check

Jorge Ramirez-Ortiz
2025-06-19T14:20:22Z

Replace repeated hfi_version checks. This improves readability and
avoids repetition of logical OR conditions.

No functional change intended.

Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com>
---
drivers/media/platform/qcom/venus/hfi_venus.c | 2 +-
drivers/media/platform/qcom/venus/vdec.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/platform/qcom/venus/hfi_venus.c b/drivers/media/platform/qcom/venus/hfi_venus.c
index b5f2ea879950..5fab68d530e0 100644
--- a/drivers/media/platform/qcom/venus/hfi_venus.c
+++ b/drivers/media/platform/qcom/venus/hfi_venus.c
@@ -1634,7 +1634,7 @@ static int venus_suspend_3xx(struct venus_core *core)

static int venus_suspend(struct venus_core *core)
{
- if (IS_V3(core) || IS_V4(core) || IS_V6(core))
+ if (IS_HFI(core, V3, V4, V6))
return venus_suspend_3xx(core);

return venus_suspend_1xx(core);
diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c
index 99ce5fd41577..7e4c17f3aa84 100644
--- a/drivers/media/platform/qcom/venus/vdec.c
+++ b/drivers/media/platform/qcom/venus/vdec.c
@@ -823,7 +823,7 @@ static int vdec_output_conf(struct venus_inst *inst)
return ret;
}

- if (IS_V3(core) || IS_V4(core) || IS_V6(core)) {
+ if (IS_HFI(core, V3, V4, V6)) {
ret = venus_helper_get_bufreq(inst, HFI_BUFFER_OUTPUT, &bufreq);
if (ret)
return ret;
--
2.34.1