Skip to contentSkip to conversation

platform/chrome: cros_ec: remove reference to nonexistent CONFIG_SLEEP_TIMEOUT_MS

PATCH In review Ethan Nelson-Moore 2 participants 3 messages Jun 16 – Jun 19 ChromeOS EC subdrivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 platform/chrome: cros_ec: remove reference to nonexistent CONFIG_SLEEP_TIMEOUT_MS

A comment in <linux/platform_data/cros_ec_commands.h> refers to CONFIG_SLEEP_TIMEOUT_MS, which has never existed in the kernel. Simply remove this reference, as the default timeout is defined immediately below the comment.

Discovered while searching for CONFIG_* symbols referenced in code but not defined in any Kconfig file.

---
 include/linux/platform_data/cros_ec_commands.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
include/linux/platform_data/cros_ec_commands.h +1 -2
index 749d985e9da2..3c0b9dff80b3 100644
@@ -4368,8 +4368,7 @@ struct ec_params_host_sleep_event {
 } __ec_align1;
 
 /*
- * Use a default timeout value (CONFIG_SLEEP_TIMEOUT_MS) for detecting sleep
- * transition failures
+ * Use a default timeout value for detecting sleep transition failures
  */
 #define EC_HOST_SLEEP_TIMEOUT_DEFAULT 0
 
Signature · 1 line
2.43.0
#1 lore raw
Quoted 7 lines · Ethan Nelson-Moore

A comment in <linux/platform_data/cros_ec_commands.h> refers to CONFIG_SLEEP_TIMEOUT_MS, which has never existed in the kernel. Simply remove this reference, as the default timeout is defined immediately below the comment.

Discovered while searching for CONFIG_* symbols referenced in code but not defined in any Kconfig file.

Thanks for the patch.

NACK. This file is intended to stay in sync with the EC firmware header[1]. While the CONFIG_SLEEP_TIMEOUT_MS is indeed unfortunate for a non-Kconfig macro in the kernel, we have historically kept it for consistency with the firmware code[2]."

[1] https://chromium.googlesource.com/chromiumos/platform/ec/+/refs/heads/main/include/ec_commands.h#5248
[2] https://chromium.googlesource.com/chromiumos/platform/ec/+/refs/heads/main/include/config.h#7178

#2 lore raw

Hi, Tzung-Bi,

Quoted 7 lines · Tzung-Bi Shih

NACK. This file is intended to stay in sync with the EC firmware header[1]. While the CONFIG_SLEEP_TIMEOUT_MS is indeed unfortunate for a non-Kconfig macro in the kernel, we have historically kept it for consistency with the firmware code[2]."

[1] https://chromium.googlesource.com/chromiumos/platform/ec/+/refs/heads/main/include/ec_commands.h#5248
[2] https://chromium.googlesource.com/chromiumos/platform/ec/+/refs/heads/main/include/config.h#7178

Thank you for explaining this. There are a few other suspect CONFIG_* symbol uses in Chrome EC code; I will check if they are also used by the EC firmware before submitting patches to remove them.

Ethan