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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d6986e8a-e3d6-4974-acda-962e1c240121@kernel.org>
Date: Mon, 19 Jan 2026 12:06:28 +0100
From: "Christophe Leroy (CS GROUP)" <chleroy@...nel.org>
To: Bartosz Golaszewski <bartosz.golaszewski@....qualcomm.com>,
 Rob Herring <robh@...nel.org>, Saravana Kannan <saravanak@...nel.org>,
 Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
 "Rafael J. Wysocki" <rafael@...nel.org>, Danilo Krummrich <dakr@...nel.org>,
 Shawn Guo <shawnguo@...nel.org>, Sascha Hauer <s.hauer@...gutronix.de>,
 Pengutronix Kernel Team <kernel@...gutronix.de>,
 Fabio Estevam <festevam@...il.com>,
 Geert Uytterhoeven <geert+renesas@...der.be>,
 Magnus Damm <magnus.damm@...il.com>, Chen-Yu Tsai <wens@...nel.org>,
 Jernej Skrabec <jernej.skrabec@...il.com>,
 Samuel Holland <samuel@...lland.org>
Cc: devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
 linuxppc-dev@...ts.ozlabs.org, linux-arm-kernel@...ts.infradead.org,
 imx@...ts.linux.dev, linux-renesas-soc@...r.kernel.org,
 linux-sunxi@...ts.linux.dev
Subject: Re: [PATCH 4/8] soc: fsl: guts: don't access of_root directly



Le 19/01/2026 à 11:40, Bartosz Golaszewski a écrit :
> Don't access of_root directly as it reduces the build test coverage for
> this driver with COMPILE_TEST=y and OF=n. Use existing helper functions
> to retrieve the relevant information.
> 
> Suggested-by: Rob Herring <robh@...nel.org>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@....qualcomm.com>

Reviewed-by: Christophe Leroy (CS GROUP) <chleroy@...nel.org>
Acked-by: Christophe Leroy (CS GROUP) <chleroy@...nel.org>

> ---
>   drivers/soc/fsl/guts.c | 12 +++---------
>   1 file changed, 3 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/soc/fsl/guts.c b/drivers/soc/fsl/guts.c
> index 6bf3e6a980ffc67c21ed7b62b5b638e37f27454e..88ba32a40f6a27f8ffd13624e940aa0edf48586f 100644
> --- a/drivers/soc/fsl/guts.c
> +++ b/drivers/soc/fsl/guts.c
> @@ -186,7 +186,6 @@ static int __init fsl_guts_init(void)
>   	const struct fsl_soc_data *soc_data;
>   	const struct of_device_id *match;
>   	struct ccsr_guts __iomem *regs;
> -	const char *machine = NULL;
>   	struct device_node *np;
>   	bool little_endian;
>   	u64 soc_uid = 0;
> @@ -217,13 +216,9 @@ static int __init fsl_guts_init(void)
>   	if (!soc_dev_attr)
>   		return -ENOMEM;
>   
> -	if (of_property_read_string(of_root, "model", &machine))
> -		of_property_read_string_index(of_root, "compatible", 0, &machine);
> -	if (machine) {
> -		soc_dev_attr->machine = kstrdup(machine, GFP_KERNEL);
> -		if (!soc_dev_attr->machine)
> -			goto err_nomem;
> -	}
> +	ret = soc_device_get_machine(soc_dev_attr);
> +	if (ret)
> +		of_machine_get_compatible(&soc_dev_attr->machine);
>   
>   	soc_die = fsl_soc_die_match(svr, fsl_soc_die);
>   	if (soc_die) {
> @@ -267,7 +262,6 @@ static int __init fsl_guts_init(void)
>   err_nomem:
>   	ret = -ENOMEM;
>   err:
> -	kfree(soc_dev_attr->machine);
>   	kfree(soc_dev_attr->family);
>   	kfree(soc_dev_attr->soc_id);
>   	kfree(soc_dev_attr->revision);
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ