diff mbox series

[v1,03/14] media: qcom: camss: Drop useless NULL assignment for ispif resources

Message ID 20230814162907.3878421-4-bryan.odonoghue@linaro.org
State Superseded
Headers show
Series media: qcom: camss: Add parameter passing to remove several outstanding bugs | expand

Commit Message

Bryan O'Donoghue Aug. 14, 2023, 4:28 p.m. UTC
The NULL pointer assignement is a redundant step our compiler will
initialize unpopulated fields as zero. We check for logical ! later on
in the code as opposed to NULL anyway.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
 drivers/media/platform/qcom/camss/camss.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Konrad Dybcio Aug. 16, 2023, 5:10 p.m. UTC | #1
On 14.08.2023 18:28, Bryan O'Donoghue wrote:
> The NULL pointer assignement is a redundant step our compiler will
> initialize unpopulated fields as zero. We check for logical ! later on
> in the code as opposed to NULL anyway.
> 
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> ---
Just squash it with patch 2?

Konrad
Bryan O'Donoghue Aug. 16, 2023, 7:06 p.m. UTC | #2
On 16/08/2023 18:10, Konrad Dybcio wrote:
> On 14.08.2023 18:28, Bryan O'Donoghue wrote:
>> The NULL pointer assignement is a redundant step our compiler will
>> initialize unpopulated fields as zero. We check for logical ! later on
>> in the code as opposed to NULL anyway.
>>
>> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
>> ---
> Just squash it with patch 2?
> 
> Konrad

Yeah but this is zapping an unnecessary NULL, the other patch is about 
condensing down into one common structure. I kind of prefer to keep as 
much granularity as possible.

---
bod
diff mbox series

Patch

diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/platform/qcom/camss/camss.c
index d9e1672b74bd7..68eb45b2c0aaa 100644
--- a/drivers/media/platform/qcom/camss/camss.c
+++ b/drivers/media/platform/qcom/camss/camss.c
@@ -1729,14 +1729,12 @@  static const struct camss_resources sdm660_resources = {
 static const struct camss_resources sdm845_resources = {
 	.csiphy_res = csiphy_res_845,
 	.csid_res = csid_res_845,
-	.ispif_res = NULL,
 	.vfe_res = vfe_res_845,
 };
 
 static const struct camss_resources sm8250_resources = {
 	.csiphy_res = csiphy_res_8250,
 	.csid_res = csid_res_8250,
-	.ispif_res = NULL,
 	.vfe_res = vfe_res_8250,
 };