From nobody Thu Apr 9 13:30:34 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3EEFD407566; Mon, 2 Mar 2026 16:29:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772468962; cv=none; b=qXyXnflIDY3k+F78F/ygjYr54iRI/NrWC5YrGCRrvflGnyAB0gxeKacdQ6sAN7sZUmXEMgYojxjvMi1vf+GSaG6LECNHHOWoJz/W44V7JMRZsr46jqJ7d8BtO+zOBGgTwt8+757qPsxmCr7MEP/74uSCO+1djWCKLKGN8P/CvFA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772468962; c=relaxed/simple; bh=sUEuLuxqaHTydElKH3+3XhMBxxOOI7n7jh2RJTRoQwo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bQLViinjlshJEJSwY/Jtq3yLAgORI6FYSiWOZuE8YFxy2i1eOdsP2xgeO7gku/Z2Z0n8+15FR0Pqs0oSmoN9F6MiMENzgS6cP1SuzXzUzSXFrvG3bQnjAgMpC8qG46fVsPr901Dtw8ArvnNn6hvCeUnbbW/x9D7oJIqFyT/B0ok= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id BE0C2C19423; Mon, 2 Mar 2026 16:29:18 +0000 (UTC) From: Geert Uytterhoeven To: Bartosz Golaszewski , Rob Herring , Saravana Kannan Cc: "Rafael J . Wysocki" , Viresh Kumar , Ilia Lin , Bjorn Andersson , Konrad Dybcio , Magnus Damm , devicetree@vger.kernel.org, linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 1/7] of: Add of_machine_get_match() helper Date: Mon, 2 Mar 2026 17:29:05 +0100 Message-ID: <14e1c03d443b1a5f210609ec3a1ebbaeab8fb3d9.1772468323.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Currently, there are two helpers to match the root compatible value against an of_device_id array: - of_machine_device_match() returns true if a match is found, - of_machine_get_match_data() returns the match data if a match is found. However, there is no helper that returns the actual of_device_id structure corresponding to the match, leading to code duplication in various drivers. Fix this by reworking of_machine_device_match() to return the actual match structure, and renaming it to of_machine_get_match(). Retain the old of_machine_device_match() functionality using a cheap static inline wrapper around the new of_machine_get_match() helper. Signed-off-by: Geert Uytterhoeven Acked-by: Viresh Kumar --- drivers/of/base.c | 11 +++++------ include/linux/of.h | 11 ++++++++--- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/drivers/of/base.c b/drivers/of/base.c index 46ebd61655930857..3f061f10aff8fca9 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -435,13 +435,12 @@ bool of_machine_compatible_match(const char *const *c= ompats) EXPORT_SYMBOL(of_machine_compatible_match); =20 /** - * of_machine_device_match - Test root of device tree against a of_device_= id array + * of_machine_get_match - Test root of device tree against an of_device_id= array * @matches: NULL terminated array of of_device_id match structures to sea= rch in * - * Returns true if the root node has any of the given compatible values in= its - * compatible property. + * Returns matched entry or NULL */ -bool of_machine_device_match(const struct of_device_id *matches) +const struct of_device_id *of_machine_get_match(const struct of_device_id = *matches) { struct device_node *root; const struct of_device_id *match =3D NULL; @@ -452,9 +451,9 @@ bool of_machine_device_match(const struct of_device_id = *matches) of_node_put(root); } =20 - return match !=3D NULL; + return match; } -EXPORT_SYMBOL(of_machine_device_match); +EXPORT_SYMBOL(of_machine_get_match); =20 /** * of_machine_get_match_data - Tell if root of device tree has a matching = of_match structure diff --git a/include/linux/of.h b/include/linux/of.h index 5dc394e626a48952..c70f7b05c59bceda 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -410,7 +410,7 @@ extern int of_alias_get_id(const struct device_node *np= , const char *stem); extern int of_alias_get_highest_id(const char *stem); =20 bool of_machine_compatible_match(const char *const *compats); -bool of_machine_device_match(const struct of_device_id *matches); +const struct of_device_id *of_machine_get_match(const struct of_device_id = *matches); const void *of_machine_get_match_data(const struct of_device_id *matches); =20 /** @@ -866,9 +866,9 @@ static inline bool of_machine_compatible_match(const ch= ar *const *compats) return false; } =20 -static inline bool of_machine_device_match(const struct of_device_id *matc= hes) +static inline const struct of_device_id *of_machine_get_match(const struct= of_device_id *matches) { - return false; + return NULL; } =20 static inline const void * @@ -976,6 +976,11 @@ static inline int of_numa_init(void) } #endif =20 +static inline bool of_machine_device_match(const struct of_device_id *matc= hes) +{ + return of_machine_get_match(matches) !=3D NULL; +} + static inline struct device_node *of_find_matching_node( struct device_node *from, const struct of_device_id *matches) --=20 2.43.0 From nobody Thu Apr 9 13:30:34 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D13B9407566; Mon, 2 Mar 2026 16:29:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772468965; cv=none; b=IYAHytHhosdhTDHvRjyfMwbeBLtgF7wPRlZfieBn5QwmtKnvqyDHPhUkFRLwSu7pdnMjAMrMD7Xp5nlnJRnejS5WTuBE9ISK4Pkec85d3Mdbs1ddAx6C1NOMZoD3hCKUCaOyEVKoJNokGnTQdeGHFlGNt9gAilhJ4+U3pB3aFn0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772468965; c=relaxed/simple; bh=j0nghKavfgGKqIjOQAxB28jB0MbHHOyVxmtOg9K4sAE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=j3t9bSMFZru99eSFIhrYIIwYqf+giUp912t8CcvdmKADQKlvCfmOFDRJibmpr4PDbxEwhPTIlEB5lBwTYN+xmdExnGDDSL0gLLsL4DvhmmQ5tGGxs54pIyTWJJCLEEU8iqOB10XCfPxH6Ubd/U3eXTMxNrtq7sIbfK5A0oemKis= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 59D96C19423; Mon, 2 Mar 2026 16:29:22 +0000 (UTC) From: Geert Uytterhoeven To: Bartosz Golaszewski , Rob Herring , Saravana Kannan Cc: "Rafael J . Wysocki" , Viresh Kumar , Ilia Lin , Bjorn Andersson , Konrad Dybcio , Magnus Damm , devicetree@vger.kernel.org, linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 2/7] of: Convert to of_machine_get_match() Date: Mon, 2 Mar 2026 17:29:06 +0100 Message-ID: <83ed49314b94dab7781e1d74236af72dd5c349c6.1772468323.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the of_machine_get_match() helper instead of open-coding the same operation. Signed-off-by: Geert Uytterhoeven Acked-by: Viresh Kumar --- drivers/of/base.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/of/base.c b/drivers/of/base.c index 3f061f10aff8fca9..39e751df9daf689f 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -504,15 +504,8 @@ EXPORT_SYMBOL(of_machine_get_match); const void *of_machine_get_match_data(const struct of_device_id *matches) { const struct of_device_id *match; - struct device_node *root; - - root =3D of_find_node_by_path("/"); - if (!root) - return NULL; - - match =3D of_match_node(matches, root); - of_node_put(root); =20 + match =3D of_machine_get_match(matches); if (!match) return NULL; =20 --=20 2.43.0 From nobody Thu Apr 9 13:30:34 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2B4983E0C71; Mon, 2 Mar 2026 16:29:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772468969; cv=none; b=ClKA7Bg95dyee/0QH9bd1WWFZ+DNBSbC9X1TxBIX7E+fqnIqAmwwkB8TIzWiDN0zIDuwVa/rb3BquioJqUUZH0ECmYKHpTdvLlssLMVhOHleqym9boTJriUzHG1hUcDuB49bB/Lo1JW1QJfJ8q+9cdD1MlzSKoaeRALGv35AjUs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772468969; c=relaxed/simple; bh=NnNVhciZ+OeoyJYyEx22r9S20DC6u7nMNN6WCTZJ8xk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fsSxnBOmdCN0KLRwkC1hF/ixpPlIvRDRgpBm8vMrVj2nMs/yG6oGalb0zGDD599dH3Y++9/k9YN1mfumH5j2Fc5z3IohK1md0XoeasXWNYN43nBj5gccbuD5Gn6y50n0DCnB22WOyrX8IZtwqK/jl2HcFQMStvPz+cUAGBv9m6Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E4BF7C2BC86; Mon, 2 Mar 2026 16:29:25 +0000 (UTC) From: Geert Uytterhoeven To: Bartosz Golaszewski , Rob Herring , Saravana Kannan Cc: "Rafael J . Wysocki" , Viresh Kumar , Ilia Lin , Bjorn Andersson , Konrad Dybcio , Magnus Damm , devicetree@vger.kernel.org, linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 3/7] cpufreq: airoha: Convert to of_machine_get_match() Date: Mon, 2 Mar 2026 17:29:07 +0100 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the of_machine_get_match() helper instead of open-coding the same operation. Signed-off-by: Geert Uytterhoeven Acked-by: Viresh Kumar --- Compile-tested only. --- drivers/cpufreq/airoha-cpufreq.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/cpufreq/airoha-cpufreq.c b/drivers/cpufreq/airoha-cpuf= req.c index b6b1cdc4d11d6962..3e7770860d13c8f4 100644 --- a/drivers/cpufreq/airoha-cpufreq.c +++ b/drivers/cpufreq/airoha-cpufreq.c @@ -115,15 +115,10 @@ MODULE_DEVICE_TABLE(of, airoha_cpufreq_match_list); =20 static int __init airoha_cpufreq_init(void) { - struct device_node *np =3D of_find_node_by_path("/"); const struct of_device_id *match; int ret; =20 - if (!np) - return -ENODEV; - - match =3D of_match_node(airoha_cpufreq_match_list, np); - of_node_put(np); + match =3D of_machine_get_match(airoha_cpufreq_match_list); if (!match) return -ENODEV; =20 --=20 2.43.0 From nobody Thu Apr 9 13:30:34 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BA91441C0D8; Mon, 2 Mar 2026 16:29:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772468972; cv=none; b=u/EMxcdOEaG4BeoIdLfQnI1TuiQ/j+KcmZi7NglzgHzM1V8ghIrIOhH34VPcveH4pVekzoIW9xlyDkuEYOfbqCBGuuvh4aKTqGannv8HrPaKKUb0ZXA/YZTMofXBvUdcVbM6b2FWOfzz6kXRvnAshD2Lubt9C+htyta0YoNDA2I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772468972; c=relaxed/simple; bh=nKOzMWy5NQmQ/BiC/zb6DajxLD2ayrekplORUnjvHQ8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Ui7fCl+6OTVH3APKGTjTUe4lzv2/bHWqOKY4du1vqJ3WeJ69bknXA0nozBcK7z5BktCWF5z0PzANHotnsOwWwLcKRd+JjTkrc4sLdT8J79f7jopqaqRafrSUATAv20GdD4O7oFTaHzpH3sBut3ZcNia+lYy+JOF0CfmiC8JVMSE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 803E9C4AF0F; Mon, 2 Mar 2026 16:29:29 +0000 (UTC) From: Geert Uytterhoeven To: Bartosz Golaszewski , Rob Herring , Saravana Kannan Cc: "Rafael J . Wysocki" , Viresh Kumar , Ilia Lin , Bjorn Andersson , Konrad Dybcio , Magnus Damm , devicetree@vger.kernel.org, linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 4/7] cpufreq: qcom-nvmem: Convert to of_machine_get_match() Date: Mon, 2 Mar 2026 17:29:08 +0100 Message-ID: <886a603a7a1de6c8cb14ee0783ee0bceea4d914a.1772468323.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the of_machine_get_match() helper instead of open-coding the same operation. Signed-off-by: Geert Uytterhoeven Acked-by: Viresh Kumar --- Compile-tested only. --- drivers/cpufreq/qcom-cpufreq-nvmem.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/drivers/cpufreq/qcom-cpufreq-nvmem.c b/drivers/cpufreq/qcom-cp= ufreq-nvmem.c index b8081acba928f5a9..e6d28d162442a085 100644 --- a/drivers/cpufreq/qcom-cpufreq-nvmem.c +++ b/drivers/cpufreq/qcom-cpufreq-nvmem.c @@ -291,17 +291,9 @@ static int qcom_cpufreq_ipq8064_name_version(struct de= vice *cpu_dev, ret =3D qcom_smem_get_soc_id(&msm_id); if (ret =3D=3D -ENODEV) { const struct of_device_id *match; - struct device_node *root; - - root =3D of_find_node_by_path("/"); - if (!root) { - ret =3D -ENODEV; - goto exit; - } =20 /* Fallback to compatible match with no SMEM initialized */ - match =3D of_match_node(qcom_cpufreq_ipq806x_match_list, root); - of_node_put(root); + match =3D of_machine_get_match(qcom_cpufreq_ipq806x_match_list); if (!match) { ret =3D -ENODEV; goto exit; @@ -647,14 +639,10 @@ MODULE_DEVICE_TABLE(of, qcom_cpufreq_match_list); */ static int __init qcom_cpufreq_init(void) { - struct device_node *np __free(device_node) =3D of_find_node_by_path("/"); const struct of_device_id *match; int ret; =20 - if (!np) - return -ENODEV; - - match =3D of_match_node(qcom_cpufreq_match_list, np); + match =3D of_machine_get_match(qcom_cpufreq_match_list); if (!match) return -ENODEV; =20 --=20 2.43.0 From nobody Thu Apr 9 13:30:34 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 67B8D41C319; Mon, 2 Mar 2026 16:29:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772468976; cv=none; b=SK5dVF6FxJeaylA81xFR16kjKkgjZbV+v9Nghhg9pQch2aF3KIc5d4ZjOuZ8o/fb3cEVOa+MIMIbMvaKvmvwIfF54EUKOsDDZuBOO4AfiUvhU23z2ghf30rmzzqKEtULJrJwZcDWUzL3HtoP4TSiii4dfbhgxufOf1cxCMB5OWw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772468976; c=relaxed/simple; bh=HWj2r1flt4YHyfpgbLhCJo6W+JNQ6Ii3NFEV4LeMofE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=sq84HB9dCENiuFxNKLVrjULbbTK43y/0XcW65U9SQsmE+6aGNX/AXufkV4PaIQPm2lWwqjeeTi+gHTM+GiWJmjlGON9Jzd0TPLGrfzrxBHZiHKxsoI+pRIIHYmmWn+yPGNmmWVD6Gf0nME2XkiJ2PQkML3otsgiFyvZztSnLkmE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1C0CDC2BCB5; Mon, 2 Mar 2026 16:29:32 +0000 (UTC) From: Geert Uytterhoeven To: Bartosz Golaszewski , Rob Herring , Saravana Kannan Cc: "Rafael J . Wysocki" , Viresh Kumar , Ilia Lin , Bjorn Andersson , Konrad Dybcio , Magnus Damm , devicetree@vger.kernel.org, linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 5/7] cpufreq: ti-cpufreq: Convert to of_machine_get_match() Date: Mon, 2 Mar 2026 17:29:09 +0100 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the of_machine_get_match() helper instead of open-coding the same operation. Signed-off-by: Geert Uytterhoeven Acked-by: Viresh Kumar --- Compile-tested only. --- drivers/cpufreq/ti-cpufreq.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/cpufreq/ti-cpufreq.c b/drivers/cpufreq/ti-cpufreq.c index 3d1129aeed02b06f..a01abc1622eb712b 100644 --- a/drivers/cpufreq/ti-cpufreq.c +++ b/drivers/cpufreq/ti-cpufreq.c @@ -502,16 +502,6 @@ static const struct of_device_id ti_cpufreq_of_match[]= __maybe_unused =3D { {}, }; =20 -static const struct of_device_id *ti_cpufreq_match_node(void) -{ - struct device_node *np __free(device_node) =3D of_find_node_by_path("/"); - const struct of_device_id *match; - - match =3D of_match_node(ti_cpufreq_of_match, np); - - return match; -} - static int ti_cpufreq_probe(struct platform_device *pdev) { u32 version[VERSION_COUNT]; @@ -596,7 +586,7 @@ static int __init ti_cpufreq_init(void) const struct of_device_id *match; =20 /* Check to ensure we are on a compatible platform */ - match =3D ti_cpufreq_match_node(); + match =3D of_machine_get_match(ti_cpufreq_of_match); if (match) platform_device_register_data(NULL, "ti-cpufreq", -1, match, sizeof(*match)); --=20 2.43.0 From nobody Thu Apr 9 13:30:34 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3946B41C30C; Mon, 2 Mar 2026 16:29:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772468980; cv=none; b=XVlP5GCsrTaE0YgSd3XtVdN8s5coBzofNSkO6M1EJ8RurQ22XFgtGllDd+vTg722VXIILJRN7fIyvEZPpaj04gQ4U3rJH93cAhK5lMw9C4yP19jPnF9MUGx+y42yK4mSI5k2c3zkh7KtWyePC9XioGGVBkmG9dLcV/5WhnGCG/c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772468980; c=relaxed/simple; bh=Fryt+iLjvYlcGVDTyLcBys0mXgeoSXsfTLwhJH6ij8g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Ah5dL3oMkMj2XJN+vetL9yAMrHkT3w89DX4xVXKiUK7fe3HNANeYq16Psf7A26DPXXS4W5eDeefSFaSelGnpx98Fc1R4WLBK5t57cswtTXHTZsl2uWTjIW3yTXyB10Sn5drgVULKSV44ENg0EZy6m1VvWGu8ECIc+Re0LO05tqg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B0F6BC2BC87; Mon, 2 Mar 2026 16:29:36 +0000 (UTC) From: Geert Uytterhoeven To: Bartosz Golaszewski , Rob Herring , Saravana Kannan Cc: "Rafael J . Wysocki" , Viresh Kumar , Ilia Lin , Bjorn Andersson , Konrad Dybcio , Magnus Damm , devicetree@vger.kernel.org, linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 6/7] soc: qcom: pd-mapper: Convert to of_machine_get_match() Date: Mon, 2 Mar 2026 17:29:10 +0100 Message-ID: <0d23a449e62ac85f04ff07bc2758efbaa709c9d1.1772468323.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the of_machine_get_match() helper instead of open-coding the same operation. Signed-off-by: Geert Uytterhoeven Acked-by: Bjorn Andersson Acked-by: Viresh Kumar Reviewed-by: Konrad Dybcio --- Compile-tested only. --- drivers/soc/qcom/qcom_pd_mapper.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/soc/qcom/qcom_pd_mapper.c b/drivers/soc/qcom/qcom_pd_m= apper.c index dc10bc859ff4170c..8a1a18f8c859496f 100644 --- a/drivers/soc/qcom/qcom_pd_mapper.c +++ b/drivers/soc/qcom/qcom_pd_mapper.c @@ -615,15 +615,9 @@ static struct qcom_pdm_data *qcom_pdm_start(void) const struct qcom_pdm_domain_data * const *domains; const struct of_device_id *match; struct qcom_pdm_data *data; - struct device_node *root; int ret, i; =20 - root =3D of_find_node_by_path("/"); - if (!root) - return ERR_PTR(-ENODEV); - - match =3D of_match_node(qcom_pdm_domains, root); - of_node_put(root); + match =3D of_machine_get_match(qcom_pdm_domains); if (!match) { pr_notice("PDM: no support for the platform, userspace daemon might be r= equired.\n"); return ERR_PTR(-ENODEV); --=20 2.43.0 From nobody Thu Apr 9 13:30:34 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0D623421884; Mon, 2 Mar 2026 16:29:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772468984; cv=none; b=dnnk3AJU1auQpovsBkamgD910/10HE3rhihbTyNPVufu87e+C+YqKObnhzBwUuzDIwAo/evRLtOKJcXhBFAnu3p/19kgJLBGsGnvF7zP4kwe8GYDGZZyynvwbDumGrqGu0wBrs396hYxXnXjAACj6JN+wXx2ymIQF6honHgXkoE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772468984; c=relaxed/simple; bh=H699tkmcb0/p+AtH2UBRINNfPTDUWZvLZ/ClznhC4k8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bm84XURTGCzEPmmH7uQkK2QvT6M0fpqh7QFXw9hBt0PmZFuX7sGc0rMhce1185rBfuh81yvwlrHulJyIDLdG+UJhq8l7TY3aJ0tIa2rP9Z5wFioFAVq8ZG+BMNnQeC+GgnRGou77FAG7TrDvX/5sRyrzbTnMlLqELNwMV55pLnk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4BDA3C2BC9E; Mon, 2 Mar 2026 16:29:40 +0000 (UTC) From: Geert Uytterhoeven To: Bartosz Golaszewski , Rob Herring , Saravana Kannan Cc: "Rafael J . Wysocki" , Viresh Kumar , Ilia Lin , Bjorn Andersson , Konrad Dybcio , Magnus Damm , devicetree@vger.kernel.org, linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 7/7] soc: renesas: Convert to of_machine_get_match() Date: Mon, 2 Mar 2026 17:29:11 +0100 Message-ID: <10876b30a8bdb7d1cfcc2f23fb859f2ffea335fe.1772468323.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the of_machine_get_match() helper to avoid accessing of_root directly, which is planned to become private. Signed-off-by: Geert Uytterhoeven Acked-by: Viresh Kumar --- This is an alternative solution to "[PATCH v2 8/9] soc: renesas: don't access of_root directly" https://lore.kernel.org/20260223-soc-of-root-v2-8-b45da45903c8@oss.qualcomm= .com --- drivers/soc/renesas/renesas-soc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/renesas/renesas-soc.c b/drivers/soc/renesas/renesa= s-soc.c index f6c41892fbe549e8..bcba01acf283003d 100644 --- a/drivers/soc/renesas/renesas-soc.c +++ b/drivers/soc/renesas/renesas-soc.c @@ -488,7 +488,7 @@ static int __init renesas_soc_init(void) const char *soc_id; int ret; =20 - match =3D of_match_node(renesas_socs, of_root); + match =3D of_machine_get_match(renesas_socs); if (!match) return -ENODEV; =20 --=20 2.43.0