* [PATCH] power: reset: Read "priority" as unsigned
@ 2026-06-12 21:53 Rob Herring (Arm)
2026-07-20 21:43 ` Sebastian Reichel
0 siblings, 1 reply; 2+ messages in thread
From: Rob Herring (Arm) @ 2026-06-12 21:53 UTC (permalink / raw)
To: Sebastian Reichel; +Cc: linux-pm, linux-kernel
The restart-handler binding documents "priority" as a uint32 value in
the range 0 to 255. The syscon reboot driver stored it in an int and
used the signed DT helper, which makes the helper type disagree with
the schema.
Read "priority" as u32 so the driver follows the binding while
preserving the same default value.
Assisted-by: Codex:gpt-5-5
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
---
drivers/power/reset/syscon-reboot.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/power/reset/syscon-reboot.c b/drivers/power/reset/syscon-reboot.c
index 2e2cf5f62d73..60e855cae68e 100644
--- a/drivers/power/reset/syscon-reboot.c
+++ b/drivers/power/reset/syscon-reboot.c
@@ -67,7 +67,7 @@ static int syscon_reboot_probe(struct platform_device *pdev)
{
struct syscon_reboot_context *ctx;
struct device *dev = &pdev->dev;
- int priority;
+ u32 priority;
int err;
ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL);
@@ -81,7 +81,7 @@ static int syscon_reboot_probe(struct platform_device *pdev)
return PTR_ERR(ctx->map);
}
- if (of_property_read_s32(pdev->dev.of_node, "priority", &priority))
+ if (of_property_read_u32(pdev->dev.of_node, "priority", &priority))
priority = 192;
ctx->rd = of_device_get_match_data(dev);
--
2.53.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] power: reset: Read "priority" as unsigned
2026-06-12 21:53 [PATCH] power: reset: Read "priority" as unsigned Rob Herring (Arm)
@ 2026-07-20 21:43 ` Sebastian Reichel
0 siblings, 0 replies; 2+ messages in thread
From: Sebastian Reichel @ 2026-07-20 21:43 UTC (permalink / raw)
To: Sebastian Reichel, Rob Herring (Arm); +Cc: linux-pm, linux-kernel
On Fri, 12 Jun 2026 16:53:24 -0500, Rob Herring (Arm) wrote:
> The restart-handler binding documents "priority" as a uint32 value in
> the range 0 to 255. The syscon reboot driver stored it in an int and
> used the signed DT helper, which makes the helper type disagree with
> the schema.
>
> Read "priority" as u32 so the driver follows the binding while
> preserving the same default value.
>
> [...]
Applied, thanks!
[1/1] power: reset: Read "priority" as unsigned
commit: 6539d798e9faf6e98d64ad7cb3af91d42180a886
Best regards,
--
Sebastian Reichel <sebastian.reichel@collabora.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-07-20 21:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-12 21:53 [PATCH] power: reset: Read "priority" as unsigned Rob Herring (Arm)
2026-07-20 21:43 ` Sebastian Reichel
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®