From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Thomas Gleixner <tglx@kernel.org>, Ingo Molnar <mingo@redhat.com>,
Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>
Cc: x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>,
linux-geode@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: [PATCH] x86/geode: use PROPERTY_ENTRY_REF for GPIO properties
Date: Sun, 20 Sep 2026 19:21:31 -0700 [thread overview]
Message-ID: <arCShGpHJo4vY5fP@google.com> (raw)
Now that the PROPERTY_ENTRY_REF macro can accept a pointer to struct
software_node_ref_args directly, we don't need to use the more
cumbersome PROPERTY_ENTRY_REF_ARRAY_LEN(..., 1) variant.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
This patch was originally posted as patch 4/4 of the "Fix handling of
GPIO keys and LEDs on geode" series [1].
From that series:
- Patch 1/4 was applied to tip:x86/urgent as commit b981e9e94c68
("x86/platform/geode: Fix on-stack property data use-after-return
bug").
- Patch 2/4 was merged through the driver-core tree as commit
fe221742e388 ("software node: allow passing reference args to
PROPERTY_ENTRY_REF()").
- Patch 3/4 (stack check in software_node_register()) has been dropped
due to limitations of object_is_on_stack() with CONFIG_VMAP_STACK.
Now that commit fe221742e388 is in mainline, resending patch 4/4 as a
standalone cleanup rebased onto current upstream.
[1] https://lore.kernel.org/all/20260329-property-gpio-fix-v2-4-3cca5ba136d8@gmail.com/
arch/x86/platform/geode/geode-common.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/platform/geode/geode-common.c b/arch/x86/platform/geode/geode-common.c
index 679b4b07b790..e1c434499824 100644
--- a/arch/x86/platform/geode/geode-common.c
+++ b/arch/x86/platform/geode/geode-common.c
@@ -28,7 +28,7 @@ static const struct software_node geode_gpio_keys_node = {
static struct software_node_ref_args geode_restart_gpio_ref;
static const struct property_entry geode_restart_key_props[] = {
- PROPERTY_ENTRY_REF_ARRAY_LEN("gpios", &geode_restart_gpio_ref, 1),
+ PROPERTY_ENTRY_REF("gpios", &geode_restart_gpio_ref),
PROPERTY_ENTRY_U32("linux,code", KEY_RESTART),
PROPERTY_ENTRY_STRING("label", "Reset button"),
PROPERTY_ENTRY_U32("debounce-interval", 100),
@@ -143,7 +143,7 @@ int __init geode_create_leds(const char *label, const struct geode_led *leds,
leds[i].pin,
GPIO_ACTIVE_LOW);
props[i * 3 + 0] =
- PROPERTY_ENTRY_REF_ARRAY_LEN("gpios", &gpio_refs[i], 1);
+ PROPERTY_ENTRY_REF("gpios", &gpio_refs[i]);
props[i * 3 + 1] =
PROPERTY_ENTRY_STRING("linux,default-trigger",
leds[i].default_on ?
--
2.55.0.1082.g2b9226bbc0-goog
--
Dmitry
reply other threads:[~2026-09-21 2:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=arCShGpHJo4vY5fP@google.com \
--to=dmitry.torokhov@gmail.com \
--cc=bartosz.golaszewski@oss.qualcomm.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-geode@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@kernel.org \
--cc=x86@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
all inboxes | Powered by JetHome®