[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ded49af5-0f5a-4eb9-acde-7cc73db76e60@oss.qualcomm.com>
Date: Wed, 4 Feb 2026 22:02:17 +0530
From: Praveen Talari <praveen.talari@....qualcomm.com>
To: Konrad Dybcio <konrad.dybcio@....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
Hi Konrad,
On 2/4/2026 7:17 PM, Konrad Dybcio wrote:
> 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
Sure, will update in next patch.
Thanks,
Praveen Talari
>
> Konrad
Powered by blists - more mailing lists