From: Krzysztof Kozlowski <krzk@kernel.org>
To: Maciej Andrzejewski <maciej.andrzejewski@m-works.net>,
linux-arm-kernel@lists.infradead.org,
Michal Simek <michal.simek@amd.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
maciej.andrzejewski@iceye.com
Subject: Re: [PATCH 1/2] Driver for Xilinx ZynqMP AXI Timeout Block (ATB)
Date: Mon, 26 May 2025 06:45:29 +0200 [thread overview]
Message-ID: <15e3f752-3270-488f-b72d-c3cbd0f49c70@kernel.org> (raw)
In-Reply-To: <87943ef2-120f-429e-8de9-50df84caf71a@kernel.org>
On 26/05/2025 05:59, Krzysztof Kozlowski wrote:
...
>> +
>> + return ret;
>> +}
>> +
>> +/**
>> + * read_dts - Read DTS configuration for the driver
>> + * @config: Pointer to driver configuration
>> + * @return: 0 on success, otherwise error code
>> + */
>> +static int read_dts(struct device *dev, struct atb_config *config)
>> +{
>> + struct device_node *np;
>> +
>> + np = of_find_node_by_name(NULL, MOD_NAME);
>
> No, you cannot do such stuff.
>
> Match properly your driver.
>
>> + if (!np) {
>> + dev_err(dev, "unable to find device tree node '%s'", MOD_NAME);
>
> So you will print such error on every machine, x86, arm (other vendors,
> like Qualcomm), riscv64?
I missed the point you added a driver, so obviously this won't print
messages needlessly, but it is just confusing. Looks not needed, because
your device driver should bind to specific node. Why do you need it?
Especially that now you defined undocumented ABI for the node name.
>
>
> No, drop entirely.
Try to find a recently reviewed driver and use it as your template. This
entire code looks very different than others - including naming of
functions.
Best regards,
Krzysztof
prev parent reply other threads:[~2025-05-26 4:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-25 19:59 [PATCH 1/2] Driver for Xilinx ZynqMP AXI Timeout Block (ATB) Maciej Andrzejewski
2025-05-25 20:00 ` [PATCH 2/2] DT bindings docs for Driver " Maciej Andrzejewski
2025-05-26 3:56 ` Krzysztof Kozlowski
2025-05-26 3:59 ` [PATCH 1/2] Driver for " Krzysztof Kozlowski
2025-05-26 4:45 ` Krzysztof Kozlowski [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=15e3f752-3270-488f-b72d-c3cbd0f49c70@kernel.org \
--to=krzk@kernel.org \
--cc=conor+dt@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=maciej.andrzejewski@iceye.com \
--cc=maciej.andrzejewski@m-works.net \
--cc=michal.simek@amd.com \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.