lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240807075714.2156445-1-arnd@kernel.org>
Date: Wed,  7 Aug 2024 09:56:58 +0200
From: Arnd Bergmann <arnd@...nel.org>
To: Geert Uytterhoeven <geert+renesas@...der.be>,
	Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
Cc: Arnd Bergmann <arnd@...db.de>,
	Michael Turquette <mturquette@...libre.com>,
	Stephen Boyd <sboyd@...nel.org>,
	linux-renesas-soc@...r.kernel.org,
	linux-clk@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH] clk: renesas: fix r9a09g057_cpg_info link error

From: Arnd Bergmann <arnd@...db.de>

The rzv2g-cpg.c driver unconditionally links into the r9a09g057
one, but that may be disabled:

aarch64-linux-ld: drivers/clk/renesas/rzv2h-cpg.o:(.rodata+0x440): undefined reference to `r9a09g057_cpg_info'

Use the same approach here as with the rzg2l variant, using an #ifdef
around tha data.

I think both drivers would be better off doing the abstraction the other
way round, with the platform_driver structure defined in the most specific
file and the common bits as a library that exports common functions.
Changing it that way would require a larger rework of course.

Fixes: 42b54d52ecb7 ("clk: renesas: Add RZ/V2H(P) CPG driver")
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
 drivers/clk/renesas/rzv2h-cpg.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/clk/renesas/rzv2h-cpg.c b/drivers/clk/renesas/rzv2h-cpg.c
index bc0c3bbdb997..34221046dc46 100644
--- a/drivers/clk/renesas/rzv2h-cpg.c
+++ b/drivers/clk/renesas/rzv2h-cpg.c
@@ -664,10 +664,12 @@ static int __init rzv2h_cpg_probe(struct platform_device *pdev)
 }
 
 static const struct of_device_id rzv2h_cpg_match[] = {
+#ifdef CONFIG_CLK_R9A09G057
 	{
 		.compatible = "renesas,r9a09g057-cpg",
 		.data = &r9a09g057_cpg_info,
 	},
+#endif
 	{ /* sentinel */ }
 };
 
-- 
2.39.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ