From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
To: Heiner Kallweit <hkallweit1@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Jerome Brunet <jbrunet@baylibre.com>,
Neil Armstrong <neil.armstrong@linaro.org>,
Kevin Hilman <khilman@baylibre.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
"open list:ARM/Amlogic Meson..."
<linux-amlogic@lists.infradead.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 1/2] base: soc: populate machine name in soc_device_register if empty
Date: Mon, 20 Mar 2023 16:39:46 +0100 [thread overview]
Message-ID: <CAFBinCBHLEAJo8r8kKU-Tou0esM0J=dnh-RO5heO+O9w0jRS5g@mail.gmail.com> (raw)
In-Reply-To: <6dbdf458-9f46-613e-de58-b4a56a6cdd9f@gmail.com>
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>
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
next prev parent reply other threads:[~2023-03-20 15:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-17 12:35 [PATCH 0/2] base: soc: populate machine name in soc_device_register if empty Heiner Kallweit
2023-03-17 12:36 ` [PATCH 1/2] " Heiner Kallweit
2023-03-20 15:39 ` Martin Blumenstingl [this message]
2023-03-17 12:37 ` [PATCH 2/2] soc: amlogic: meson-gx-socinfo: use new soc_device_register functionality to populate machine name Heiner Kallweit
2023-03-20 15:40 ` Martin Blumenstingl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAFBinCBHLEAJo8r8kKU-Tou0esM0J=dnh-RO5heO+O9w0jRS5g@mail.gmail.com' \
--to=martin.blumenstingl@googlemail.com \
--cc=gregkh@linuxfoundation.org \
--cc=hkallweit1@gmail.com \
--cc=jbrunet@baylibre.com \
--cc=khilman@baylibre.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=rafael@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).