[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <0c9ff8b4-9e69-41cc-a622-2aea11def2e2@kernel.org>
Date: Sat, 7 Sep 2024 15:20:33 +0200
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Yann Sionneau <ysionneau@...rayinc.com>, linux-kernel@...r.kernel.org,
Thomas Gleixner <tglx@...utronix.de>
Cc: Jonathan Borne <jborne@...rayinc.com>,
Julian Vetter <jvetter@...rayinc.com>,
Clement Leger <clement@...ment-leger.fr>,
Guillaume Thouvenin <thouveng@...il.com>, Luc Michel <luc@...chel.fr>,
Jules Maselbas <jmaselbas@...v.net>, bpf@...r.kernel.org
Subject: Re: [RFC PATCH v3 35/37] kvx: Add IPI driver
On 23/08/2024 16:46, Yann Sionneau wrote:
> Hello Krzysztof,
>
> On 22/07/2024 14:39, Krzysztof Kozlowski wrote:
>> On 22/07/2024 11:41, ysionneau@...rayinc.com wrote:
>>> From: Yann Sionneau <ysionneau@...rayinc.com>
>>>
>>> [...]
>>> +
>>> +int __init kvx_ipi_ctrl_init(struct device_node *node,
>>> + struct device_node *parent)
>>> +{
>>> + int ret;
>>> + unsigned int ipi_irq;
>>> + void __iomem *ipi_base;
>>> +
>>> + BUG_ON(!node);
>> Fix your code instead.
>
> I am not sure I understand your comment here, I don't have the control over what the kernel passes to my driver, do I?
In general you have. Investigate the path and check whether NULL is
allowed. If it is allowed, then this should be handled correctly and
gracefully. If it is not allowed, then BUG_ON() is not welcomed in general.
>
> On the other hand, "node" being the node that matches the compatible, maybe it can never be NULL, is that what you're saying?
I don't remember the context anymore. You responded one month after my
review. But if this is about matching, then obviously this cannot happen
for DT platforms. If this can be matched via different methods then it
should not be BUG_ON...
Best regards,
Krzysztof
Powered by blists - more mailing lists