[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <250cdec3-1437-4c45-aab1-0428218b9437@linaro.org>
Date: Fri, 2 May 2025 13:22:32 +0100
From: Bryan O'Donoghue <bryan.odonoghue@...aro.org>
To: Dikshita Agarwal <quic_dikshita@...cinc.com>,
Vikash Garodia <quic_vgarodia@...cinc.com>,
Abhinav Kumar <quic_abhinavk@...cinc.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Stefan Schmidt <stefan.schmidt@...aro.org>, Hans Verkuil
<hverkuil@...all.nl>, Bjorn Andersson <andersson@...nel.org>,
Konrad Dybcio <konradybcio@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>
Cc: Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>,
Neil Armstrong <neil.armstrong@...aro.org>,
Nicolas Dufresne <nicolas.dufresne@...labora.com>,
linux-media@...r.kernel.org, linux-arm-msm@...r.kernel.org,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
20250417-topic-sm8x50-iris-v10-v7-0-f020cb1d0e98@...aro.org,
20250424-qcs8300_iris-v5-0-f118f505c300@...cinc.com, stable@...r.kernel.org
Subject: Re: [PATCH v3 05/23] media: iris: Prevent HFI queue writes when core
is in deinit state
On 01/05/2025 20:13, Dikshita Agarwal wrote:
> - if (core->state == IRIS_CORE_ERROR)
> + if (core->state == IRIS_CORE_ERROR || core->state == IRIS_CORE_DEINIT)
> return -EINVAL;
Instead of checking for 2/3 of the states why not just check for the 1/3 ?
enum iris_core_state {
IRIS_CORE_DEINIT,
IRIS_CORE_INIT,
IRIS_CORE_ERROR,
};
if (core->state != IRIS_CORE_INIT)
return -EINVAL;
Cleaner and more explicit - declaring the state you must be in, as
opposed to a list of states you should not be in.
Assuming you accept that suggested change:
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@...aro.org>
Powered by blists - more mailing lists