Messages in this thread | | | From | Martin Blumenstingl <> | Date | Mon, 20 Mar 2023 16:39:46 +0100 | Subject | Re: [PATCH 1/2] base: soc: populate machine name in soc_device_register if empty |
| |
On Fri, Mar 17, 2023 at 1:37 PM Heiner Kallweit <hkallweit1@gmail.com> wrote: [...] > +static void soc_device_get_machine(struct soc_device_attribute *soc_dev_attr) > +{ > + struct device_node *np; > + > + if (soc_dev_attr->machine) > + return; > + > + np = of_find_node_by_path("/"); > + of_property_read_string(np, "model", &soc_dev_attr->machine); > + of_node_put(np); At first I thought there's a problem with non-OF machines here. But if CONFIG_OF is disabled the code above is a no-op because we're not checking any error/return codes.
So this gets my: Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
| |