From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A1CDFF4BB71 for ; Tue, 24 Feb 2026 18:32:19 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4fL5t94Nrnz3cZp; Wed, 25 Feb 2026 05:32:17 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip="2600:3c0a:e001:78e:0:1991:8:25" ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1771957937; cv=none; b=JqkCbys9RdhL3cdTvKWWrXXcAW8tTywZ86tAkDRte5KPoOAu/UUuMVA5KBW90j2n3Pf53U6WK70wxy/9o5dnZRWK4unOok5arD2lCKXzmB2FXDVXBaRZ9VZ5llDJBbck5ePJZz69O1Jkvi2IqDyGEi5K65Qs3Nqow9QXhxQzkhXi5aqu6XRm7Rutl7NXz5/ORlVahc8j3ih8WOwwxlpVfEKGeLiPETJXhz4ko8NP8wkkaftenbS+a0d54QVfdhRhEa4nDazUNihbU8FxnslNtcJyF2vcJSSgzNLOxgCcbsnYHhMY2w8x+s13bUj+s5FUcR8f9DqivQ5BYE7Fe17XPQ== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1771957937; c=relaxed/relaxed; bh=zPZuuyOkZlhki+7UWHq16YlQwKX4HwZ3acsGMHI5nBc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=dzdxSPJokjd5SWACZjl00se+7W6kym3fPoptcayrPOhhcM394zmcV38kjtSeLELezJHWX4wsQzxyaN8VuOaNwE3OPiT1KbeSCumWixJvt91ZVJg2E0o8T8YzfC/pRW+ZeAlNXmiqO2kQg5RF8Szjt1t27ZclEn/QcJIcZwDKwB0128XUrGt6mHT7vpoR4whg/OFwnFy2d/yFJJvTLBDqkL0Q+3reevRfVheBFSn5X78K3KUFBRwqYOuf7VmPDVizQGr92LWQZ+UK0KKxMfMPOa3GmGtMI/YFMWHJDuBYgv8RY+obYM2EnI6MUg85S3eoZRiT3Mn+8VHuJPqkUMaIaA== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=c7knNeoc; dkim-atps=neutral; spf=pass (client-ip=2600:3c0a:e001:78e:0:1991:8:25; helo=sea.source.kernel.org; envelope-from=robh@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=c7knNeoc; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=2600:3c0a:e001:78e:0:1991:8:25; helo=sea.source.kernel.org; envelope-from=robh@kernel.org; receiver=lists.ozlabs.org) Received: from sea.source.kernel.org (sea.source.kernel.org [IPv6:2600:3c0a:e001:78e:0:1991:8:25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4fL5t90N2bz3cZj for ; Wed, 25 Feb 2026 05:32:17 +1100 (AEDT) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 9C02743DD9; Tue, 24 Feb 2026 18:32:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 52733C116D0; Tue, 24 Feb 2026 18:32:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1771957934; bh=pjvAYBrvNS02jtvepugyA12PJiegFiNTbfdgM5xo/i4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=c7knNeoc9b86Pn0zEU+63t097NFo8V1DiirlR+tFZ1FEmys2K12aiKxgV26a+Iq89 RW6s0i4WgFsU7xqxe8QBZwCYJNTIVU3fAwl3MGD7Aj4aB1OoJndbEf2iR6U88immAp lZ+ZXHG/Xi72zzK8VDXb1mAK2vZ0209HXQk7MRNvlQC+u2HbsY+3zcDZ+XYAve07YX j2P8qGLxSyl/X5aalMr+ZIKOrye9wAb9AsuokDyn+o7qEDIc7rs0g0ENF+WykPsMJB rB53ZMhwaMGyIXtt5iQf/o7438b0ko4vJZyN2r+EDkjhge4ukxBR8Fm0m2Acp8dlEu cszWkbq8B5NMg== Date: Tue, 24 Feb 2026 12:32:13 -0600 From: Rob Herring To: Bartosz Golaszewski Cc: Saravana Kannan , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , "Christophe Leroy (CS GROUP)" , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Geert Uytterhoeven , Magnus Damm , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Frank Li , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, linux-renesas-soc@vger.kernel.org, linux-sunxi@lists.linux.dev, driver-core@lists.linux.dev Subject: Re: [PATCH v2 8/9] soc: renesas: don't access of_root directly Message-ID: <20260224183213.GA3239922-robh@kernel.org> References: <20260223-soc-of-root-v2-0-b45da45903c8@oss.qualcomm.com> <20260223-soc-of-root-v2-8-b45da45903c8@oss.qualcomm.com> X-Mailing-List: linuxppc-dev@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260223-soc-of-root-v2-8-b45da45903c8@oss.qualcomm.com> On Mon, Feb 23, 2026 at 02:37:23PM +0100, Bartosz Golaszewski wrote: > 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 > Signed-off-by: Bartosz Golaszewski > --- > drivers/soc/renesas/renesas-soc.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/drivers/soc/renesas/renesas-soc.c b/drivers/soc/renesas/renesas-soc.c > index 38ff0b823bdaf1ba106bfb57ed423158d9103f8d..bd8ba0ac30fa91fcf2a10edd0d58b064650085cf 100644 > --- a/drivers/soc/renesas/renesas-soc.c > +++ b/drivers/soc/renesas/renesas-soc.c > @@ -6,6 +6,7 @@ > */ > > #include > +#include > #include > #include > #include > @@ -468,7 +469,11 @@ static int __init renesas_soc_init(void) > const char *soc_id; > int ret; > > - match = of_match_node(renesas_socs, of_root); > + struct device_node *root __free(device_node) = of_find_node_by_path("/"); > + if (!root) > + return -ENOENT; > + > + match = of_match_node(renesas_socs, root); Doesn't of_machine_device_match() work here?