Re: [PATCH v23 03/13] power: reset: reboot-mode: Add support for predefined reboot modes
From: Shivendra Pratap
Date: Thu Jul 23 2026 - 09:23:35 EST
On 22-07-2026 14:34, Pavan Kondeti wrote:
On Tue, Jul 14, 2026 at 10:46:31PM +0530, Shivendra Pratap wrote:
diff --git a/include/linux/reboot-mode.h b/include/linux/reboot-mode.h
index 34a81e4b4f95..b216c7595f7e 100644
--- a/include/linux/reboot-mode.h
+++ b/include/linux/reboot-mode.h
@@ -4,18 +4,34 @@
#include <linux/types.h>
+struct reboot_mode_entry {
+ const char *name;
+ u32 magic[3];
+ int count;
+};
+
I see some where `count < 0` check, should not this be size_t or u32?
--
count = device_property_count_u32(reboot->dev, prop->name);
--
this can return -ve values on error. and we store the count in info-
>count. Still the count in above struct can be a u32. Let me review this.
thanks,
Shivendra