[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <37905097-ec5a-4922-a34a-7cf0ddce33f4@oss.qualcomm.com>
Date: Wed, 4 Feb 2026 14:47:43 +0100
From: Konrad Dybcio <konrad.dybcio@....qualcomm.com>
To: Praveen Talari <praveen.talari@....qualcomm.com>,
Andi Shyti <andi.shyti@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley
<conor+dt@...nel.org>,
Mukesh Kumar Savaliya <mukesh.savaliya@....qualcomm.com>,
Viken Dadhaniya <viken.dadhaniya@....qualcomm.com>,
Bjorn Andersson <andersson@...nel.org>,
Konrad Dybcio <konradybcio@...nel.org>, linux-arm-msm@...r.kernel.org,
linux-i2c@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, bjorn.andersson@....qualcomm.com,
dmitry.baryshkov@....qualcomm.com
Cc: prasad.sodagudi@....qualcomm.com, quic_vtanuku@...cinc.com,
aniket.randive@....qualcomm.com, chandana.chiluveru@....qualcomm.com,
jyothi.seerapu@....qualcomm.com
Subject: Re: [PATCH v4 12/13] i2c: qcom-geni: Store of_device_id data in
driver private struct
On 2/4/26 6:04 AM, Praveen Talari wrote:
> Hi Konrad,
>
> On 2/3/2026 5:55 PM, Konrad Dybcio wrote:
>> On 2/2/26 7:09 PM, Praveen Talari wrote:
>>> To avoid repeatedly fetching and checking platform data across various
>>> functions, store the struct of_device_id data directly in the i2c
>>> private structure. This change enhances code maintainability and reduces
>>> redundancy.
>>>
>>> Acked-by: Viken Dadhaniya <viken.dadhaniya@....qualcomm.com>
>>> Signed-off-by: Praveen Talari <praveen.talari@....qualcomm.com>
>>> ---
>>
>> [...]
>>
>>> - desc = device_get_match_data(&pdev->dev);
>>> + gi2c->dev_data = device_get_match_data(&pdev->dev);
>>
>> Because you dereference it unconditionally later, this should be
>> null-checked
>
> Initially this was added, but based on Bjorn’s comment like there is no possibility of getting a null value here since we are already adding the platform data to compatibles
The ACPI match entries don't have it, which I think gives a good
example of how easy this may be overlooked
Konrad
Powered by blists - more mailing lists