ec: change usage of "sane" per inclusive language

Google is working to change its source code to use more inclusive
language. To that end, replace the terms "sane", "sanity check", and
similar with inclusive/non-stigmatizing alternatives.

BUG=b:161832469
BRANCH=None
TEST=`make buildall -j` succeeds. `grep -Eir "sane|sanity" .` shows
results only in third-party code or documentation.

Signed-off-by: Paul Fagerburg <pfagerburg@chromium.org>
Change-Id: I29e78ab27f84f17b1ded75cfa10868fa4e5ae88c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2311169
Reviewed-by: Jett Rink <jettrink@chromium.org>
This commit is contained in:
Paul Fagerburg 2020-07-21 13:12:02 -06:00 committed by Commit Bot
parent b93f139e47
commit 514923bc59
61 changed files with 70 additions and 70 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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 */

View File

@ -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)

View File

@ -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 */
}

View File

@ -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 */

View File

@ -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"

View File

@ -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);
}

View File

@ -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)
{

View File

@ -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;
}

View File

@ -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)) {

View File

@ -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);

View File

@ -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);

View File

@ -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)

View File

@ -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))

View File

@ -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);

View File

@ -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)));

View File

@ -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)));

View File

@ -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

View File

@ -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)));

View File

@ -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

View File

@ -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)));

View File

@ -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)
*/

View File

@ -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):

View File

@ -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)

View File

@ -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.

View File

@ -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);

View File

@ -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;
};

View File

@ -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

View File

@ -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. */

View File

@ -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

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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

View File

@ -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);

View File

@ -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);

View File

@ -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",