lkml.org 
[lkml]   [2023]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2 3/3] media: exynos4-is: fimc-is: replace duplicate pmu node with phandle
From
On 11/08/2023 11:49, Hans Verkuil wrote:
> Hi Krzysztof,
>
> On 08/08/2023 01:13, Andi Shyti wrote:
>> Hi Krzysztof,
>>
>> [...]
>>
>>> +static void __iomem *fimc_is_get_pmu_regs(struct device *dev)
>>> +{
>>> + struct device_node *node;
>>> + void __iomem *regs;
>>> +
>>> + node = of_parse_phandle(dev->of_node, "samsung,pmu-syscon", 0);
>>> + if (!node) {
>>> + dev_warn(dev, "Finding PMU node via deprecated method, update your DTB\n");
>>> + node = of_get_child_by_name(dev->of_node, "pmu");
>>> + if (!node)
>>> + return IOMEM_ERR_PTR(-ENODEV);
>>
>> in my opinion this should be:
>>
>> ...
>> if (!node)
>> return IOMEM_ERR_PTR(-ENODEV);
>>
>> dev_warn(dev, "Finding PMU node via deprecated method, update your DTB\n");
>>
>> Because if you don't have both "samsung,pmu-syscon and "pmu" then
>> the warning should not be printed and you need to return -ENODEV.
>
> I agree with Andi for this part.
>
> The only time you want to see this message is if samsung,pmu-syscon is
> missing AND pmu is present. If both are missing, then just return ENODEV as
> it was before.

OK, understood. I will send a v3.

Best regards,
Krzysztof

\
 
 \ /
  Last update: 2023-08-15 08:04    [W:0.057 / U:2.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site