public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
To: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,
	Vikash Garodia <vikash.garodia@oss.qualcomm.com>,
	Abhinav Kumar <abhinav.kumar@linux.dev>,
	Bryan O'Donoghue <bod@kernel.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Hans Verkuil <hverkuil@kernel.org>,
	Stefan Schmidt <stefan.schmidt@linaro.org>,
	Hans Verkuil <hverkuil+cisco@kernel.org>,
	Deepa Guthyappa Madivalara <deepa.madivalara@oss.qualcomm.com>
Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Subject: Re: [PATCH 4/7] media: qcom: iris: Remove dead assignment in iris_hfi_gen2_set_tier()
Date: Thu, 23 Apr 2026 10:39:52 +0530	[thread overview]
Message-ID: <87a4a14b-e20a-ef0d-d39a-be11e11d0b74@oss.qualcomm.com> (raw)
In-Reply-To: <5b740daa-132b-4719-baeb-c029bb82f5d0@oss.qualcomm.com>



On 4/22/2026 5:53 PM, Konrad Dybcio wrote:
> On 4/22/26 1:16 PM, Dikshita Agarwal wrote:
>> Fold the ternary initialiser directly into the variable declaration,
>> removing the dead store that was immediately overwritten.
>>
>> Fixes: 2af481a459a4 ("media: iris: Define AV1-specific platform capabilities and properties")
>> Signed-off-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
>> ---
>>  drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c | 5 ++---
>>  1 file changed, 2 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c b/drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c
>> index 30bfd90d423ba024caf6ececc827f7102e8f3324..06698fde639ec654ff9ec78a178271ab2284f5f0 100644
>> --- a/drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c
>> +++ b/drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c
>> @@ -536,10 +536,9 @@ static int iris_hfi_gen2_set_tier(struct iris_inst *inst, u32 plane)
>>  {
>>  	u32 port = iris_hfi_gen2_get_port(inst, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE);
>>  	struct iris_inst_hfi_gen2 *inst_hfi_gen2 = to_iris_inst_hfi_gen2(inst);
>> -	u32 tier = inst->fw_caps[TIER].value;
>> -
>> -	tier = (inst->codec == V4L2_PIX_FMT_AV1) ? inst->fw_caps[TIER_AV1].value :
>> +	u32 tier = (inst->codec == V4L2_PIX_FMT_AV1) ? inst->fw_caps[TIER_AV1].value :
>>  							inst->fw_caps[TIER].value;
>> +
> 
> Since you're touching this already, I think the cleanest way to handle
> it would be to do 'tier_cap = (inst->codec == V4L2_PIX_FMT_AV1) ? TIER_AV1 : TIER`
> and then use that index 

Ack.

> 
> Also, the namespacing here is mediocre - "TIER" doesn't indicate it's an index
> of the fw caps array

For now, I’d prefer to keep the existing TIER / TIER_AV1 naming, as many
other fw caps follow the same pattern and renaming them would cause
unrelated churn. Happy to revisit naming consistency as a separate cleanup.

Thanks,
Dikshita
> 
> Konrad

  reply	other threads:[~2026-04-23  5:10 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-22 11:16 [PATCH 0/7] media: qcom: iris: miscellaneous code-quality fixes Dikshita Agarwal
2026-04-22 11:16 ` [PATCH 1/7] media: qcom: iris: Centralize internal buffer table selection Dikshita Agarwal
2026-04-23  9:17   ` Bryan O'Donoghue
2026-04-22 11:16 ` [PATCH 2/7] media: qcom: iris: fix state-change debug log printing stale value Dikshita Agarwal
2026-04-22 12:20   ` Konrad Dybcio
2026-04-23  9:18   ` Bryan O'Donoghue
2026-04-22 11:16 ` [PATCH 3/7] media: qcom: iris: Fix bitmask test in iris_allow_cmd() Dikshita Agarwal
2026-04-23  9:23   ` Bryan O'Donoghue
2026-04-22 11:16 ` [PATCH 4/7] media: qcom: iris: Remove dead assignment in iris_hfi_gen2_set_tier() Dikshita Agarwal
2026-04-22 12:23   ` Konrad Dybcio
2026-04-23  5:09     ` Dikshita Agarwal [this message]
2026-04-23  9:25   ` Bryan O'Donoghue
2026-04-23  9:52     ` Dikshita Agarwal
2026-04-22 11:16 ` [PATCH 5/7] media: qcom: iris: Remove duplicate HFI_PROP_OPB_ENABLE entry Dikshita Agarwal
2026-04-22 12:25   ` Konrad Dybcio
2026-04-22 11:16 ` [PATCH 6/7] media: qcom: iris: Add missing break in iris_hfi_gen2_session_set_codec() Dikshita Agarwal
2026-04-22 12:25   ` Konrad Dybcio
2026-04-23  9:32   ` Bryan O'Donoghue
2026-04-22 11:16 ` [PATCH 7/7] media: qcom: iris: Make iris_destroy_internal_buffer() return void Dikshita Agarwal
2026-04-22 12:26   ` Konrad Dybcio
2026-04-22 12:26   ` Konrad Dybcio
2026-04-23  9:42   ` Bryan O'Donoghue

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=87a4a14b-e20a-ef0d-d39a-be11e11d0b74@oss.qualcomm.com \
    --to=dikshita.agarwal@oss.qualcomm.com \
    --cc=abhinav.kumar@linux.dev \
    --cc=bod@kernel.org \
    --cc=bryan.odonoghue@linaro.org \
    --cc=deepa.madivalara@oss.qualcomm.com \
    --cc=hverkuil+cisco@kernel.org \
    --cc=hverkuil@kernel.org \
    --cc=konrad.dybcio@oss.qualcomm.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=stefan.schmidt@linaro.org \
    --cc=vikash.garodia@oss.qualcomm.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