Thread (19 messages) 19 messages, 3 authors, 2024-04-01

Re: [PATCH v5 4/4] clk: imx: add i.MX95 BLK CTL clk driver

From: Krzysztof Kozlowski <hidden>
Date: 2024-03-31 19:52:49
Also in: imx, linux-clk, linux-devicetree, lkml

On 31/03/2024 14:01, Peng Fan wrote:
quoted
Subject: Re: [PATCH v5 4/4] clk: imx: add i.MX95 BLK CTL clk driver

On 24/03/2024 08:52, Peng Fan (OSS) wrote:
quoted
From: Peng Fan <peng.fan@nxp.com>
...
quoted
+
+static const struct of_device_id imx95_bc_of_match[] = {
+	{ .compatible = "nxp,imx95-camera-csr", .data = &camblk_dev_data },
+	{ .compatible = "nxp,imx95-display-master-csr", },
+	{ .compatible = "nxp,imx95-lvds-csr", .data = &lvds_csr_dev_data },
+	{ .compatible = "nxp,imx95-display-csr", .data =
&dispmix_csr_dev_data },
quoted
+	{ .compatible = "nxp,imx95-vpu-csr", .data = &vpublk_dev_data },
+	{ /* Sentinel */ },
+};
+MODULE_DEVICE_TABLE(of, imx95_bc_of_match);
+
+static struct platform_driver imx95_bc_driver = {
+	.probe = imx95_bc_probe,
+	.driver = {
+		.name = "imx95-blk-ctl",
+		.of_match_table = of_match_ptr(imx95_bc_of_match),
Drop of_match_ptr(), causes warnings. From where did you copy such code?
Which mainline driver has such pattern?
I recall that when COMPILE_TEST is selected, OF is not selected, kernel
robot reports warning. This may not be true now.
This itself was never true. Any compilation, not robots, which you can
test by yourself will report warnings if your code is not correct. Don't
use random C syntax to suppress warnings, but actually something which
will work. of_match_ptr does not make sense without maybe_unused or
ifdef. But anyway of_match_ptr is not recommended.

Best regards,
Krzysztof


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help