From cefdb366dcbe97908b6055595a15bf7689556bf8 Mon Sep 17 00:00:00 2001 From: Michael Ellerman Date: Thu, 14 Dec 2023 21:31:49 +1100 Subject: of: Change of_machine_is_compatible() to return bool of_machine_is_compatible() currently returns a positive integer if it finds a match. However none of the callers ever check the value, they all treat it as a true/false. So change of_machine_is_compatible() to return bool, which will allow the implementation to be changed in a subsequent patch. Suggested-by: Rob Herring Signed-off-by: Michael Ellerman Link: https://msgid.link/20231214103152.12269-2-mpe@ellerman.id.au --- drivers/of/base.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'drivers/of/base.c') diff --git a/drivers/of/base.c b/drivers/of/base.c index 3c85afb2697c..faa88eb518a9 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -419,10 +419,9 @@ bool of_machine_compatible_match(const char *const *compats) * of_machine_is_compatible - Test root of device tree for a given compatible value * @compat: compatible string to look for in root node's compatible property. * - * Return: A positive integer if the root node has the given value in its - * compatible property. + * Return: true if the root node has the given value in its compatible property. */ -int of_machine_is_compatible(const char *compat) +bool of_machine_is_compatible(const char *compat) { struct device_node *root; int rc = 0; -- cgit v1.2.3