summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--board/akemi/board.c2
-rw-r--r--board/bloog/board.c2
-rw-r--r--board/bobba/board.c2
-rw-r--r--board/casta/board.c2
-rw-r--r--board/dood/board.c2
-rw-r--r--board/dratini/board.c2
-rw-r--r--board/fleex/board.c2
-rw-r--r--board/foob/board.c2
-rw-r--r--board/garg/board.c2
-rw-r--r--board/hatch/board.c2
-rw-r--r--board/helios/board.c2
-rw-r--r--board/jinlon/board.c2
-rw-r--r--board/kindred/board.c2
-rw-r--r--board/kohaku/board.c2
-rw-r--r--board/lick/board.c2
-rw-r--r--board/meep/board.c2
-rw-r--r--board/mushu/board.c2
-rw-r--r--board/nightfury/board.c2
-rw-r--r--board/nocturne/board.c2
-rw-r--r--board/palkia/board.c2
-rw-r--r--board/phaser/board.c2
-rw-r--r--board/puff/board.c2
-rw-r--r--board/stryke/board.c2
-rw-r--r--board/sushi/board.c2
-rw-r--r--board/yorp/board.c2
-rw-r--r--chip/ish/aontaskfw/ish_aon_share.h2
-rw-r--r--chip/lm4/chip_temp_sensor.c2
-rw-r--r--chip/lm4/peci.c2
-rw-r--r--chip/npcx/peci.c2
-rw-r--r--common/blink.c2
-rw-r--r--common/keyboard_mkbp.c2
-rw-r--r--common/mag_cal.c4
-rw-r--r--common/printf.c4
-rw-r--r--common/rwsig.c2
-rw-r--r--common/temp_sensor.c4
-rw-r--r--common/thermal.c2
-rw-r--r--common/vboot/vb21_lib.c2
-rw-r--r--common/vboot_hash.c4
-rw-r--r--core/cortex-m/task.c2
-rw-r--r--core/cortex-m0/task.c2
-rw-r--r--core/minute-ia/task.c2
-rw-r--r--core/nds32/init.S2
-rw-r--r--core/nds32/task.c2
-rw-r--r--core/riscv-rv32i/init.S2
-rw-r--r--core/riscv-rv32i/task.c2
-rw-r--r--driver/touchpad_elan.c2
-rwxr-xr-xextra/usb_updater/servo_updater.py8
-rw-r--r--include/config.h4
-rw-r--r--include/host_command.h2
-rw-r--r--include/lb_common.h2
-rw-r--r--include/rtc.h4
-rw-r--r--power/cometlake-discrete.c2
-rw-r--r--power/sc7180.c2
-rw-r--r--test/timer_jump.py2
-rw-r--r--test/usb_pe_drp.c2
-rw-r--r--test/usb_prl.c2
-rw-r--r--test/usb_prl_old.c2
-rw-r--r--test/usb_sm_checks.h2
-rw-r--r--test/usb_typec_ctvpd.c2
-rw-r--r--test/usb_typec_drp_acc_trysrc.c2
-rw-r--r--util/ectool_keyscan.c2
61 files changed, 70 insertions, 70 deletions
diff --git a/board/akemi/board.c b/board/akemi/board.c
index ad5fce6d71..cc78e77f0c 100644
--- a/board/akemi/board.c
+++ b/board/akemi/board.c
@@ -367,7 +367,7 @@ DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT);
void board_overcurrent_event(int port, int is_overcurrented)
{
- /* Sanity check the port. */
+ /* Check that port number is valid. */
if ((port < 0) || (port >= CONFIG_USB_PD_PORT_MAX_COUNT))
return;
diff --git a/board/bloog/board.c b/board/bloog/board.c
index 5a7d31ebea..2973b5c6dd 100644
--- a/board/bloog/board.c
+++ b/board/bloog/board.c
@@ -317,7 +317,7 @@ const int keyboard_factory_scan_pins_used =
void board_overcurrent_event(int port, int is_overcurrented)
{
- /* Sanity check the port. */
+ /* Check that port number is valid. */
if ((port < 0) || (port >= CONFIG_USB_PD_PORT_MAX_COUNT))
return;
diff --git a/board/bobba/board.c b/board/bobba/board.c
index 7f20c820fd..90bfaf74ce 100644
--- a/board/bobba/board.c
+++ b/board/bobba/board.c
@@ -418,7 +418,7 @@ void lid_angle_peripheral_enable(int enable)
void board_overcurrent_event(int port, int is_overcurrented)
{
- /* Sanity check the port. */
+ /* Check that port number is valid. */
if ((port < 0) || (port >= CONFIG_USB_PD_PORT_MAX_COUNT))
return;
diff --git a/board/casta/board.c b/board/casta/board.c
index d277ab3b1c..e1d7630e3f 100644
--- a/board/casta/board.c
+++ b/board/casta/board.c
@@ -156,7 +156,7 @@ DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT);
void board_overcurrent_event(int port, int is_overcurrented)
{
- /* Sanity check the port. */
+ /* Check that port number is valid. */
if ((port < 0) || (port >= CONFIG_USB_PD_PORT_MAX_COUNT))
return;
diff --git a/board/dood/board.c b/board/dood/board.c
index 25db730c85..62109a3c56 100644
--- a/board/dood/board.c
+++ b/board/dood/board.c
@@ -301,7 +301,7 @@ void lid_angle_peripheral_enable(int enable)
void board_overcurrent_event(int port, int is_overcurrented)
{
- /* Sanity check the port. */
+ /* Check that port number is valid. */
if ((port < 0) || (port >= CONFIG_USB_PD_PORT_MAX_COUNT))
return;
diff --git a/board/dratini/board.c b/board/dratini/board.c
index 83aa24de7c..b10c299af1 100644
--- a/board/dratini/board.c
+++ b/board/dratini/board.c
@@ -434,7 +434,7 @@ DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT);
void board_overcurrent_event(int port, int is_overcurrented)
{
- /* Sanity check the port. */
+ /* Check that port number is valid. */
if ((port < 0) || (port >= CONFIG_USB_PD_PORT_MAX_COUNT))
return;
diff --git a/board/fleex/board.c b/board/fleex/board.c
index d6d4903686..c487da68f2 100644
--- a/board/fleex/board.c
+++ b/board/fleex/board.c
@@ -254,7 +254,7 @@ void lid_angle_peripheral_enable(int enable)
void board_overcurrent_event(int port, int is_overcurrented)
{
- /* Sanity check the port. */
+ /* Check that port number is valid. */
if ((port < 0) || (port >= CONFIG_USB_PD_PORT_MAX_COUNT))
return;
diff --git a/board/foob/board.c b/board/foob/board.c
index 98c03c2b01..87a5c656de 100644
--- a/board/foob/board.c
+++ b/board/foob/board.c
@@ -289,7 +289,7 @@ DECLARE_HOOK(HOOK_CHIPSET_SUSPEND, board_chipset_suspend, HOOK_PRIO_DEFAULT);
void board_overcurrent_event(int port, int is_overcurrented)
{
- /* Sanity check the port. */
+ /* Check that port number is valid. */
if ((port < 0) || (port >= CONFIG_USB_PD_PORT_MAX_COUNT))
return;
diff --git a/board/garg/board.c b/board/garg/board.c
index 937e8c2d31..44cc3b3759 100644
--- a/board/garg/board.c
+++ b/board/garg/board.c
@@ -288,7 +288,7 @@ void lid_angle_peripheral_enable(int enable)
void board_overcurrent_event(int port, int is_overcurrented)
{
- /* Sanity check the port. */
+ /* Check that port number is valid. */
if ((port < 0) || (port >= CONFIG_USB_PD_PORT_MAX_COUNT))
return;
diff --git a/board/hatch/board.c b/board/hatch/board.c
index a5715d2cfa..69da3f5328 100644
--- a/board/hatch/board.c
+++ b/board/hatch/board.c
@@ -485,7 +485,7 @@ DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT);
void board_overcurrent_event(int port, int is_overcurrented)
{
- /* Sanity check the port. */
+ /* Check that port number is valid. */
if ((port < 0) || (port >= CONFIG_USB_PD_PORT_MAX_COUNT))
return;
diff --git a/board/helios/board.c b/board/helios/board.c
index ac7bfb1d7e..87b2b89702 100644
--- a/board/helios/board.c
+++ b/board/helios/board.c
@@ -386,7 +386,7 @@ DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT);
void board_overcurrent_event(int port, int is_overcurrented)
{
- /* Sanity check the port. */
+ /* Check that port number is valid. */
if ((port < 0) || (port >= CONFIG_USB_PD_PORT_MAX_COUNT))
return;
diff --git a/board/jinlon/board.c b/board/jinlon/board.c
index e2b14b5c5e..f789b15590 100644
--- a/board/jinlon/board.c
+++ b/board/jinlon/board.c
@@ -467,7 +467,7 @@ DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT);
void board_overcurrent_event(int port, int is_overcurrented)
{
- /* Sanity check the port. */
+ /* Check that port number is valid. */
if ((port < 0) || (port >= CONFIG_USB_PD_PORT_MAX_COUNT))
return;
diff --git a/board/kindred/board.c b/board/kindred/board.c
index c3c802136b..0ee52f7095 100644
--- a/board/kindred/board.c
+++ b/board/kindred/board.c
@@ -457,7 +457,7 @@ DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT);
void board_overcurrent_event(int port, int is_overcurrented)
{
- /* Sanity check the port. */
+ /* Check that port number is valid. */
if ((port < 0) || (port >= CONFIG_USB_PD_PORT_MAX_COUNT))
return;
diff --git a/board/kohaku/board.c b/board/kohaku/board.c
index 4893359d56..8f261dff23 100644
--- a/board/kohaku/board.c
+++ b/board/kohaku/board.c
@@ -460,7 +460,7 @@ DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT);
void board_overcurrent_event(int port, int is_overcurrented)
{
- /* Sanity check the port. */
+ /* Check that port number is valid. */
if ((port < 0) || (port >= CONFIG_USB_PD_PORT_MAX_COUNT))
return;
diff --git a/board/lick/board.c b/board/lick/board.c
index 510c7a1bb1..71512249be 100644
--- a/board/lick/board.c
+++ b/board/lick/board.c
@@ -283,7 +283,7 @@ DECLARE_HOOK(HOOK_CHIPSET_SUSPEND, board_chipset_suspend, HOOK_PRIO_DEFAULT);
void board_overcurrent_event(int port, int is_overcurrented)
{
- /* Sanity check the port. */
+ /* Check that port number is valid. */
if ((port < 0) || (port >= CONFIG_USB_PD_PORT_MAX_COUNT))
return;
diff --git a/board/meep/board.c b/board/meep/board.c
index bee35e828d..a497e337fb 100644
--- a/board/meep/board.c
+++ b/board/meep/board.c
@@ -325,7 +325,7 @@ const int keyboard_factory_scan_pins_used =
void board_overcurrent_event(int port, int is_overcurrented)
{
- /* Sanity check the port. */
+ /* Check that port number is valid. */
if ((port < 0) || (port >= CONFIG_USB_PD_PORT_MAX_COUNT))
return;
diff --git a/board/mushu/board.c b/board/mushu/board.c
index c4186e4be5..dd407091c5 100644
--- a/board/mushu/board.c
+++ b/board/mushu/board.c
@@ -547,7 +547,7 @@ DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT);
void board_overcurrent_event(int port, int is_overcurrented)
{
- /* Sanity check the port. */
+ /* Check that port number is valid. */
if ((port < 0) || (port >= CONFIG_USB_PD_PORT_MAX_COUNT))
return;
diff --git a/board/nightfury/board.c b/board/nightfury/board.c
index 32be32b32d..0dcee3a1cf 100644
--- a/board/nightfury/board.c
+++ b/board/nightfury/board.c
@@ -401,7 +401,7 @@ DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT);
void board_overcurrent_event(int port, int is_overcurrented)
{
- /* Sanity check the port. */
+ /* Check that port number is valid. */
if ((port < 0) || (port >= CONFIG_USB_PD_PORT_MAX_COUNT))
return;
diff --git a/board/nocturne/board.c b/board/nocturne/board.c
index b5472ee456..6a45cabf4c 100644
--- a/board/nocturne/board.c
+++ b/board/nocturne/board.c
@@ -560,7 +560,7 @@ void board_overcurrent_event(int port, int is_overcurrented)
{
int lvl;
- /* Sanity check the port. */
+ /* Check that port number is valid. */
if ((port < 0) || (port >= CONFIG_USB_PD_PORT_MAX_COUNT))
return;
diff --git a/board/palkia/board.c b/board/palkia/board.c
index 3688064811..939447fc17 100644
--- a/board/palkia/board.c
+++ b/board/palkia/board.c
@@ -255,7 +255,7 @@ DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT);
void board_overcurrent_event(int port, int is_overcurrented)
{
- /* Sanity check the port. */
+ /* Check that port number is valid. */
if ((port < 0) || (port >= CONFIG_USB_PD_PORT_MAX_COUNT))
return;
diff --git a/board/phaser/board.c b/board/phaser/board.c
index 1dae01fc20..0d64934f75 100644
--- a/board/phaser/board.c
+++ b/board/phaser/board.c
@@ -290,7 +290,7 @@ DECLARE_HOOK(HOOK_CHIPSET_SUSPEND, board_chipset_suspend, HOOK_PRIO_DEFAULT);
void board_overcurrent_event(int port, int is_overcurrented)
{
- /* Sanity check the port. */
+ /* Check that port number is valid. */
if ((port < 0) || (port >= CONFIG_USB_PD_PORT_MAX_COUNT))
return;
diff --git a/board/puff/board.c b/board/puff/board.c
index c59ce541ad..3aa156ca6b 100644
--- a/board/puff/board.c
+++ b/board/puff/board.c
@@ -635,7 +635,7 @@ int board_set_active_charge_port(int port)
void board_overcurrent_event(int port, int is_overcurrented)
{
- /* Sanity check the port. */
+ /* Check that port number is valid. */
if ((port < 0) || (port >= CONFIG_USB_PD_PORT_MAX_COUNT))
return;
usbc_overcurrent = is_overcurrented;
diff --git a/board/stryke/board.c b/board/stryke/board.c
index a6396ced52..afec23450c 100644
--- a/board/stryke/board.c
+++ b/board/stryke/board.c
@@ -401,7 +401,7 @@ DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT);
void board_overcurrent_event(int port, int is_overcurrented)
{
- /* Sanity check the port. */
+ /* Check that port number is valid. */
if ((port < 0) || (port >= CONFIG_USB_PD_PORT_MAX_COUNT))
return;
diff --git a/board/sushi/board.c b/board/sushi/board.c
index dea90102f0..f1a7b2b698 100644
--- a/board/sushi/board.c
+++ b/board/sushi/board.c
@@ -485,7 +485,7 @@ DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT);
void board_overcurrent_event(int port, int is_overcurrented)
{
- /* Sanity check the port. */
+ /* Check that port number is valid. */
if ((port < 0) || (port >= CONFIG_USB_PD_PORT_MAX_COUNT))
return;
diff --git a/board/yorp/board.c b/board/yorp/board.c
index d080b8d446..1d4597311a 100644
--- a/board/yorp/board.c
+++ b/board/yorp/board.c
@@ -251,7 +251,7 @@ DECLARE_HOOK(HOOK_INIT, post_old_board_warning, HOOK_PRIO_INIT_I2C + 1);
void board_overcurrent_event(int port, int is_overcurrented)
{
- /* Sanity check the port. */
+ /* Check that port number is valid. */
if ((port < 0) || (port >= CONFIG_USB_PD_PORT_MAX_COUNT))
return;
diff --git a/chip/ish/aontaskfw/ish_aon_share.h b/chip/ish/aontaskfw/ish_aon_share.h
index ff60a004c9..20b36ec2b2 100644
--- a/chip/ish/aontaskfw/ish_aon_share.h
+++ b/chip/ish/aontaskfw/ish_aon_share.h
@@ -10,7 +10,7 @@
#include "ia_structs.h"
#include "power_mgt.h"
-/* magic ID for valid aontask image sanity check */
+/* magic ID for valid aontask image check */
#define AON_MAGIC_ID 0x544E4F41 /*"AONT"*/
/* aontask error code */
diff --git a/chip/lm4/chip_temp_sensor.c b/chip/lm4/chip_temp_sensor.c
index 7dff771d6f..eb1bc4d133 100644
--- a/chip/lm4/chip_temp_sensor.c
+++ b/chip/lm4/chip_temp_sensor.c
@@ -10,7 +10,7 @@
#include "common.h"
#include "hooks.h"
-/* Initialize temperature reading to a sane value (27 C) */
+/* Initialize temperature reading to a valid value (27 C) */
static int last_val = C_TO_K(27);
static void chip_temp_sensor_poll(void)
diff --git a/chip/lm4/peci.c b/chip/lm4/peci.c
index 4c29165c50..b3b54a64bc 100644
--- a/chip/lm4/peci.c
+++ b/chip/lm4/peci.c
@@ -128,7 +128,7 @@ static void peci_init(void)
/* Set initial clock frequency */
peci_freq_changed();
- /* Initialize temperature reading buffer to a sane value. */
+ /* Initialize temperature reading buffer to a valid value. */
for (i = 0; i < TEMP_AVG_LENGTH; ++i)
temp_vals[i] = 300; /* 27 C */
}
diff --git a/chip/npcx/peci.c b/chip/npcx/peci.c
index 2744dbdb00..f3145bd2a7 100644
--- a/chip/npcx/peci.c
+++ b/chip/npcx/peci.c
@@ -255,7 +255,7 @@ static void peci_init(void)
CLEAR_BIT(NPCX_DEVALT(0x0A), 6);
/* Set initial clock frequency */
peci_freq_changed();
- /* Initialize temperature reading buffer to a sane value. */
+ /* Initialize temperature reading buffer to a valid value. */
for (i = 0; i < TEMP_AVG_LENGTH; ++i)
temp_vals[i] = 300; /* 27 C */
diff --git a/common/blink.c b/common/blink.c
index 4231e38195..ed16146f5a 100644
--- a/common/blink.c
+++ b/common/blink.c
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* This is a sanity check program for boards that have LEDs. */
+/* This is a confidence check program for boards that have LEDs. */
#include "common.h"
#include "gpio.h"
diff --git a/common/keyboard_mkbp.c b/common/keyboard_mkbp.c
index 0902a434d7..45cd50f4f5 100644
--- a/common/keyboard_mkbp.c
+++ b/common/keyboard_mkbp.c
@@ -696,7 +696,7 @@ static void keyscan_copy_config(const struct ec_mkbp_config *src,
uint8_t new_flags;
if (valid_mask & EC_MKBP_VALID_FIFO_MAX_DEPTH) {
- /* Sanity check for fifo depth */
+ /* Validity check for fifo depth */
dst->fifo_max_depth = MIN(src->fifo_max_depth,
FIFO_DEPTH);
}
diff --git a/common/mag_cal.c b/common/mag_cal.c
index f7b1945933..13beb93af2 100644
--- a/common/mag_cal.c
+++ b/common/mag_cal.c
@@ -41,8 +41,8 @@ static inline fp_t covariance_element(fp_t sq, fp_t a, fp_t b, fp_t inv)
/*
* eigen value magnitude and ratio test
*
- * Using the magnetometer information, caculate the 3 eigen values/vectors
- * for the transformation. Check the eigen values are sane.
+ * Using the magnetometer information, calculate the 3 eigen values/vectors
+ * for the transformation. Check the eigen values are reasonable.
*/
static int moc_eigen_test(struct mag_cal_t *moc)
{
diff --git a/common/printf.c b/common/printf.c
index 4a28bac215..f876a1da19 100644
--- a/common/printf.c
+++ b/common/printf.c
@@ -182,7 +182,7 @@ int vfnprintf(int (*addchar)(void *context, int c), void *context,
}
}
if (pad_width < 0 || pad_width > MAX_FORMAT) {
- /* Sanity check for precision failed */
+ /* Validity check for precision failed */
format = error_str;
continue;
}
@@ -202,7 +202,7 @@ int vfnprintf(int (*addchar)(void *context, int c), void *context,
}
}
if (precision < 0 || precision > MAX_FORMAT) {
- /* Sanity check for precision failed */
+ /* Validity check for precision failed */
format = error_str;
continue;
}
diff --git a/common/rwsig.c b/common/rwsig.c
index 86d77144d8..e23ca23293 100644
--- a/common/rwsig.c
+++ b/common/rwsig.c
@@ -163,7 +163,7 @@ int rwsig_check_signature(void)
vb21_sig->sig_size != RSANUMBYTES ||
vb21_key->sig_alg != vb21_sig->sig_alg ||
vb21_key->hash_alg != vb21_sig->hash_alg ||
- /* Sanity check signature offset and data size. */
+ /* Validity check signature offset and data size. */
vb21_sig->sig_offset < sizeof(vb21_sig) ||
(vb21_sig->sig_offset + RSANUMBYTES) > CONFIG_RW_SIG_SIZE ||
vb21_sig->data_size > (CONFIG_RW_SIZE - CONFIG_RW_SIG_SIZE)) {
diff --git a/common/temp_sensor.c b/common/temp_sensor.c
index 819da155ac..0f687bb2a2 100644
--- a/common/temp_sensor.c
+++ b/common/temp_sensor.c
@@ -67,8 +67,8 @@ static void temp_sensor_init(void)
/*
* Initialize memory-mapped data so that if a temperature value is read
- * before we actually poll the sensors, we don't end up with an insane
- * value.
+ * before we actually poll the sensors, we don't return an impossible
+ * or out-of-range value.
*/
base = host_get_memmap(EC_MEMMAP_TEMP_SENSOR);
base_b = host_get_memmap(EC_MEMMAP_TEMP_SENSOR_B);
diff --git a/common/thermal.c b/common/thermal.c
index b39dab04cd..d1cc47e924 100644
--- a/common/thermal.c
+++ b/common/thermal.c
@@ -42,7 +42,7 @@ int thermal_fan_percent(int low, int high, int cur)
}
/* The logic below is hard-coded for only three thresholds: WARN, HIGH, HALT.
- * This is just a sanity check to be sure we catch any changes in thermal.h
+ * This is just a validity check to be sure we catch any changes in thermal.h
*/
BUILD_ASSERT(EC_TEMP_THRESH_COUNT == 3);
diff --git a/common/vboot/vb21_lib.c b/common/vboot/vb21_lib.c
index a2b6993c13..4e215c14e5 100644
--- a/common/vboot/vb21_lib.c
+++ b/common/vboot/vb21_lib.c
@@ -35,7 +35,7 @@ int vb21_is_signature_valid(const struct vb21_signature *sig,
return EC_ERROR_VBOOT_SIG_ALGORITHM;
if (key->hash_alg != sig->hash_alg)
return EC_ERROR_VBOOT_HASH_ALGORITHM;
- /* Sanity check signature offset and data size. */
+ /* Validity check signature offset and data size. */
if (sig->sig_offset < sizeof(*sig))
return EC_ERROR_VBOOT_SIG_OFFSET;
if (sig->sig_offset + RSANUMBYTES > CONFIG_RW_SIG_SIZE)
diff --git a/common/vboot_hash.c b/common/vboot_hash.c
index 10de58fcac..a08c707630 100644
--- a/common/vboot_hash.c
+++ b/common/vboot_hash.c
@@ -453,7 +453,7 @@ static void fill_response(struct ec_response_vboot_hash *r,
}
/**
- * Start computing a hash, with sanity checking on params.
+ * Start computing a hash, with validity checking on params.
*
* @return EC_RES_SUCCESS if success, or other result code on error.
*/
@@ -463,7 +463,7 @@ static int host_start_hash(const struct ec_params_vboot_hash *p)
int size = p->size;
int rv;
- /* Sanity-check input params */
+ /* Validity-check input params */
if (p->hash_type != EC_VBOOT_HASH_TYPE_SHA256)
return EC_RES_INVALID_PARAM;
if (p->nonce_size > sizeof(p->nonce_data))
diff --git a/core/cortex-m/task.c b/core/cortex-m/task.c
index 0cf93f2f05..75fbf99155 100644
--- a/core/cortex-m/task.c
+++ b/core/cortex-m/task.c
@@ -161,7 +161,7 @@ static uint32_t task_reset_state[TASK_ID_COUNT] = {
#undef ENABLE_RESET
#endif /* CONFIG_TASK_RESET_LIST */
-/* Sanity checks about static task invariants */
+/* Validity checks about static task invariants */
BUILD_ASSERT(TASK_ID_COUNT <= sizeof(unsigned) * 8);
BUILD_ASSERT(TASK_ID_COUNT < (1 << (sizeof(task_id_t) * 8)));
BUILD_ASSERT(BIT(TASK_ID_COUNT) < TASK_RESET_LOCK);
diff --git a/core/cortex-m0/task.c b/core/cortex-m0/task.c
index 1d085431ac..5fa884fc3e 100644
--- a/core/cortex-m0/task.c
+++ b/core/cortex-m0/task.c
@@ -108,7 +108,7 @@ static const struct {
/* Contexts for all tasks */
static task_ tasks[TASK_ID_COUNT];
-/* Sanity checks about static task invariants */
+/* Validity checks about static task invariants */
BUILD_ASSERT(TASK_ID_COUNT <= sizeof(unsigned) * 8);
BUILD_ASSERT(TASK_ID_COUNT < (1 << (sizeof(task_id_t) * 8)));
diff --git a/core/minute-ia/task.c b/core/minute-ia/task.c
index 75cd09a513..7e7c836f7e 100644
--- a/core/minute-ia/task.c
+++ b/core/minute-ia/task.c
@@ -118,7 +118,7 @@ static const struct {
/* Contexts for all tasks */
static task_ tasks[TASK_ID_COUNT];
-/* Sanity checks about static task invariants */
+/* Validity checks about static task invariants */
BUILD_ASSERT(TASK_ID_COUNT <= sizeof(unsigned) * 8);
BUILD_ASSERT(TASK_ID_COUNT < (1 << (sizeof(task_id_t) * 8)));
diff --git a/core/nds32/init.S b/core/nds32/init.S
index f817aef346..b8e109c434 100644
--- a/core/nds32/init.S
+++ b/core/nds32/init.S
@@ -227,7 +227,7 @@ excep_handler:
la $r0, saved_regs + 4
smw.bim $r1, [$r0], $r10, 0
smw.bim $r15,[$r0], $r15, 0xF
- /* put a sane stack pointer */
+ /* put a valid stack pointer */
la $sp, stack_end
/* add IPC, IPSW to the context */
mfsr $r1, $IPC
diff --git a/core/nds32/task.c b/core/nds32/task.c
index d9aa6beda9..e92e418fba 100644
--- a/core/nds32/task.c
+++ b/core/nds32/task.c
@@ -118,7 +118,7 @@ static const struct {
/* Contexts for all tasks */
static task_ tasks[TASK_ID_COUNT];
-/* Sanity checks about static task invariants */
+/* Validity checks about static task invariants */
BUILD_ASSERT(TASK_ID_COUNT <= sizeof(unsigned) * 8);
BUILD_ASSERT(TASK_ID_COUNT < (1 << (sizeof(task_id_t) * 8)));
diff --git a/core/riscv-rv32i/init.S b/core/riscv-rv32i/init.S
index 2fc47d34d4..0bc99052da 100644
--- a/core/riscv-rv32i/init.S
+++ b/core/riscv-rv32i/init.S
@@ -386,7 +386,7 @@ excep_handler:
la a0, saved_regs
csrr sp, mscratch
sw sp, 30*4(a0)
- /* put a sane stack pointer */
+ /* put a valid stack pointer */
la sp, stack_end
/* jump to panic dump C routine */
jal report_panic
diff --git a/core/riscv-rv32i/task.c b/core/riscv-rv32i/task.c
index 3addbcd91f..14f204f8a2 100644
--- a/core/riscv-rv32i/task.c
+++ b/core/riscv-rv32i/task.c
@@ -114,7 +114,7 @@ static const struct {
/* Contexts for all tasks */
static task_ tasks[TASK_ID_COUNT] __attribute__ ((section(".bss.tasks")));
-/* Sanity checks about static task invariants */
+/* Validity checks about static task invariants */
BUILD_ASSERT(TASK_ID_COUNT <= (sizeof(unsigned) * 8));
BUILD_ASSERT(TASK_ID_COUNT < (1 << (sizeof(task_id_t) * 8)));
diff --git a/driver/touchpad_elan.c b/driver/touchpad_elan.c
index 4c7cb91a61..8838130c60 100644
--- a/driver/touchpad_elan.c
+++ b/driver/touchpad_elan.c
@@ -333,7 +333,7 @@ static void elan_tp_init(void)
#ifdef CONFIG_USB_HID_TOUCHPAD
/*
- * Sanity check dimensions provided at build time.
+ * Validity check dimensions provided at build time.
* - dpi == logical dimension / physical dimension (inches)
* (254 tenths of mm per inch)
*/
diff --git a/extra/usb_updater/servo_updater.py b/extra/usb_updater/servo_updater.py
index f899e158bc..06c36f37b6 100755
--- a/extra/usb_updater/servo_updater.py
+++ b/extra/usb_updater/servo_updater.py
@@ -66,12 +66,12 @@ def flash2(vidpid, serialno, binfile):
print(cmd)
help_cmd = '%s --help' % tool
with open('/dev/null') as devnull:
- sanity_check = subprocess.call(help_cmd.split(), stdout=devnull,
- stderr=devnull)
- if sanity_check:
+ valid_check = subprocess.call(help_cmd.split(), stdout=devnull,
+ stderr=devnull)
+ if valid_check:
raise ServoUpdaterException('%s exit with res = %d. Make sure the tool '
'is available on the device.' % (help_cmd,
- sanity_check))
+ valid_check))
res = subprocess.call(cmd.split())
if res in (0, 1, 2):
diff --git a/include/config.h b/include/config.h
index acc5004b07..2a7235f176 100644
--- a/include/config.h
+++ b/include/config.h
@@ -3652,7 +3652,7 @@
* console logs on SRAM so that the logs will be preserved after EC shutting
* down or sysjumped. It will keep the contents across EC resets, so we have
* more information about system states. The contents on SRAM will be cleared
- * when checksum or sanity check fails.
+ * when checksum or validity check fails.
*/
#undef CONFIG_PRESERVE_LOGS
@@ -5256,7 +5256,7 @@
#include "test_config.h"
/*
- * Sanity checks to make sure some of the configs above make sense.
+ * Validity checks to make sure some of the configs above make sense.
*/
#if (CONFIG_AUX_TIMER_PERIOD_MS) < ((HOOK_TICK_INTERVAL_MS) * 2)
diff --git a/include/host_command.h b/include/host_command.h
index 189def22f2..363dd050db 100644
--- a/include/host_command.h
+++ b/include/host_command.h
@@ -230,7 +230,7 @@ void host_command_received(struct host_cmd_handler_args *args);
/**
* Return the expected host packet size given its header.
*
- * Also does some sanity checking on the host request.
+ * Also does some validity checking on the host request.
*
* @param r Host request header
* @return The expected packet size, or 0 if error.
diff --git a/include/lb_common.h b/include/lb_common.h
index b7cbc1e869..327c810cad 100644
--- a/include/lb_common.h
+++ b/include/lb_common.h
@@ -22,7 +22,7 @@ int lb_get_rgb(unsigned int led, uint8_t *red, uint8_t *green, uint8_t *blue);
void lb_set_brightness(unsigned int newval);
/* Get the overall brighness level. */
uint8_t lb_get_brightness(void);
-/* Initialize the IC controller registers to sane values. */
+/* Initialize the IC controller registers to reasonable values. */
void lb_init(int use_lock);
/* Disable the LED current off (the IC stays on). */
void lb_off(void);
diff --git a/include/rtc.h b/include/rtc.h
index fa56634c5b..c9909bbc48 100644
--- a/include/rtc.h
+++ b/include/rtc.h
@@ -20,9 +20,9 @@
struct calendar_date {
/* The number of years since A.D. 2000, i.e. year = 17 for y2017 */
uint8_t year;
- /* 1-based indexing, i.e. sane values range from 1 to 12 */
+ /* 1-based indexing, i.e. valid values range from 1 to 12 */
uint8_t month;
- /* 1-based indexing, i.e. sane values range from 1 to 31 */
+ /* 1-based indexing, i.e. valid values range from 1 to 31 */
uint8_t day;
};
diff --git a/power/cometlake-discrete.c b/power/cometlake-discrete.c
index 56465ef61f..0cdf8b2d5f 100644
--- a/power/cometlake-discrete.c
+++ b/power/cometlake-discrete.c
@@ -372,7 +372,7 @@ enum power_state power_handle_state(enum power_state state)
#ifdef CONFIG_VBOOT_EFS
/*
- * Called in main() to ensure chipset power is sane.
+ * Called in main() to ensure chipset power is in a good state.
*
* This may be useful because EC reset could happen under unexpected
* conditions and we want to ensure that if the AP is wedged for some
diff --git a/power/sc7180.c b/power/sc7180.c
index c9fb0242e1..88caf81db2 100644
--- a/power/sc7180.c
+++ b/power/sc7180.c
@@ -198,7 +198,7 @@ void chipset_warm_reset_interrupt(enum gpio_signal signal)
* high-Z both AP_RST_L and PS_HOLD.
*/
CPRINTS("Long warm reset ended, "
- "cold resetting to restore sanity.");
+ "cold resetting to restore confidence.");
request_cold_reset();
}
/* If not overdriven, just a normal power-up, do nothing. */
diff --git a/test/timer_jump.py b/test/timer_jump.py
index e367969cc8..f506a69fcf 100644
--- a/test/timer_jump.py
+++ b/test/timer_jump.py
@@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
-# Timer test: check time sanity when jumping between images
+# Timer test: check time consistency when jumping between images
#
import time
diff --git a/test/usb_pe_drp.c b/test/usb_pe_drp.c
index 1060e62304..2d6a849504 100644
--- a/test/usb_pe_drp.c
+++ b/test/usb_pe_drp.c
@@ -164,7 +164,7 @@ void run_test(int argc, char **argv)
RUN_TEST(test_pe_frs);
RUN_TEST(test_vbus_gpio_discharge);
- /* Do basic state machine sanity checks last. */
+ /* Do basic state machine validity checks last. */
RUN_TEST(test_pe_no_parent_cycles);
RUN_TEST(test_pe_no_empty_state);
diff --git a/test/usb_prl.c b/test/usb_prl.c
index 2e7406b4c3..4021ab3881 100644
--- a/test/usb_prl.c
+++ b/test/usb_prl.c
@@ -162,7 +162,7 @@ void run_test(int argc, char **argv)
/* TODO add tests here */
- /* Do basic state machine sanity checks last. */
+ /* Do basic state machine validity checks last. */
RUN_TEST(test_prl_no_parent_cycles);
RUN_TEST(test_prl_no_empty_state);
RUN_TEST(test_prl_all_states_named);
diff --git a/test/usb_prl_old.c b/test/usb_prl_old.c
index 5dd7c58d92..8a2dea0fd0 100644
--- a/test/usb_prl_old.c
+++ b/test/usb_prl_old.c
@@ -1411,7 +1411,7 @@ void run_test(int argc, char **argv)
/* TODO(shurst): More PD 3.0 Tests */
- /* Do basic state machine sanity checks last. */
+ /* Do basic state machine validity checks last. */
RUN_TEST(test_prl_no_parent_cycles);
RUN_TEST(test_prl_no_empty_state);
RUN_TEST(test_prl_all_states_named);
diff --git a/test/usb_sm_checks.h b/test/usb_sm_checks.h
index 0a556518a4..e6b459f1f3 100644
--- a/test/usb_sm_checks.h
+++ b/test/usb_sm_checks.h
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* Sanity tests for a state machine definition */
+/* Validity tests for a state machine definition */
#ifndef __CROS_EC_USB_SM_CHECKS_H
#define __CROS_EC_USB_SM_CHECKS_H
diff --git a/test/usb_typec_ctvpd.c b/test/usb_typec_ctvpd.c
index 79d3a90294..08c23eb284 100644
--- a/test/usb_typec_ctvpd.c
+++ b/test/usb_typec_ctvpd.c
@@ -1521,7 +1521,7 @@ void run_test(int argc, char **argv)
RUN_TEST(test_ctvpd_behavior_case6);
#endif
- /* Do basic state machine sanity checks last. */
+ /* Do basic state machine validity checks last. */
RUN_TEST(test_tc_no_parent_cycles);
RUN_TEST(test_tc_no_empty_state);
RUN_TEST(test_tc_all_states_named);
diff --git a/test/usb_typec_drp_acc_trysrc.c b/test/usb_typec_drp_acc_trysrc.c
index 9c47bedbf0..1578a04390 100644
--- a/test/usb_typec_drp_acc_trysrc.c
+++ b/test/usb_typec_drp_acc_trysrc.c
@@ -709,7 +709,7 @@ void run_test(int argc, char **argv)
RUN_TEST(test_cc_open_on_normal_reset);
RUN_TEST(test_cc_rd_on_por_reset);
- /* Do basic state machine sanity checks last. */
+ /* Do basic state machine validity checks last. */
RUN_TEST(test_tc_no_parent_cycles);
RUN_TEST(test_tc_no_empty_state);
RUN_TEST(test_tc_all_states_named);
diff --git a/util/ectool_keyscan.c b/util/ectool_keyscan.c
index 5d1b77c2c6..293857285a 100644
--- a/util/ectool_keyscan.c
+++ b/util/ectool_keyscan.c
@@ -101,7 +101,7 @@ static int keyscan_read_fdt_matrix(struct keyscan_info *keyscan,
matrix->col = (word >> 16) & 0xff;
matrix->keycode = word & 0xffff;
- /* Hard-code some sanity limits for now */
+ /* Hard-code some limits for now */
if (matrix->row >= KEYBOARD_ROWS ||
matrix->col >= KEYBOARD_COLS_MAX) {
fprintf(stderr, "Matrix pos out of range (%d,%d)\n",