diff options
author | Mary Ruthven <mruthven@chromium.org> | 2020-12-22 07:40:57 +1100 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-12-22 21:02:11 +0000 |
commit | dbe87fb73f561bfa7ae62da17cbf979eb00732a4 (patch) | |
tree | ecee56caabd3366b5f1e72653ee9c160d6165c27 | |
parent | 5e1a54f157554153973bc9422b3fe1d90aa1c8a5 (diff) | |
download | chrome-ec-dbe87fb73f561bfa7ae62da17cbf979eb00732a4.tar.gz |
coil: Replace "whitelist"
Replace "whitelist" with "allowlist".
BUG=b:175244613
TEST=make buildall -j
Change-Id: Ie0a23cb33722fe27b76d97c2ebdd548c2ecc2aa6
Signed-off-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2600299
Reviewed-by: Namyoon Woo <namyoon@chromium.org>
-rw-r--r-- | board/cr50/tpm2/nvmem_ops.c | 4 | ||||
-rw-r--r-- | common/usb_pd_policy.c | 2 | ||||
-rw-r--r-- | common/usb_pd_protocol.c | 8 | ||||
-rw-r--r-- | common/usbc/usb_pe_drp_sm.c | 10 | ||||
-rwxr-xr-x | extra/cr50_rma_open/cr50_rma_open.py | 2 | ||||
-rw-r--r-- | include/usb_pd.h | 2 | ||||
-rwxr-xr-x | util/config_option_check.py | 6 |
7 files changed, 17 insertions, 17 deletions
diff --git a/board/cr50/tpm2/nvmem_ops.c b/board/cr50/tpm2/nvmem_ops.c index 4281d5f944..68aff86dc0 100644 --- a/board/cr50/tpm2/nvmem_ops.c +++ b/board/cr50/tpm2/nvmem_ops.c @@ -13,9 +13,9 @@ void nvmem_wipe_cache(void) * Inclusive list of NV indices not to be wiped out when invalidating * the cache. */ - const uint16_t whitelist_range[] = { 0x1007, 0x100b }; + const uint16_t allowlist_range[] = { 0x1007, 0x100b }; - NvSelectivelyInvalidateCache(whitelist_range); + NvSelectivelyInvalidateCache(allowlist_range); /* * Wipe some confidential persistent data diff --git a/common/usb_pd_policy.c b/common/usb_pd_policy.c index 4b8fa85071..2a843b97d0 100644 --- a/common/usb_pd_policy.c +++ b/common/usb_pd_policy.c @@ -156,7 +156,7 @@ int pd_charge_from_device(uint16_t vid, uint16_t pid) { /* TODO: rewrite into table if we get more of these */ /* - * White-list Apple charge-through accessory since it doesn't set + * Allow-list Apple charge-through accessory since it doesn't set * externally powered bit, but we still need to charge from it when * we are a sink. */ diff --git a/common/usb_pd_protocol.c b/common/usb_pd_protocol.c index fc8b28f29f..8303f9de62 100644 --- a/common/usb_pd_protocol.c +++ b/common/usb_pd_protocol.c @@ -1550,12 +1550,12 @@ static void pd_update_pdo_flags(int port, uint32_t pdo) { #ifdef CONFIG_CHARGE_MANAGER #ifdef CONFIG_USB_PD_ALT_MODE_DFP - int charge_whitelisted = + int charge_allowlisted = (pd[port].power_role == PD_ROLE_SINK && pd_charge_from_device(pd_get_identity_vid(port), pd_get_identity_pid(port))); #else - const int charge_whitelisted = 0; + const int charge_allowlisted = 0; #endif #endif @@ -1590,11 +1590,11 @@ static void pd_update_pdo_flags(int port, uint32_t pdo) * Treat device as a dedicated charger (meaning we should charge * from it) if it does not support power swap, or if it is externally * powered, or if we are a sink and the device identity matches a - * charging white-list. + * charging allowlist. */ if (!(pd[port].flags & PD_FLAGS_PARTNER_DR_POWER) || (pd[port].flags & PD_FLAGS_PARTNER_EXTPOWER) || - charge_whitelisted) + charge_allowlisted) charge_manager_update_dualrole(port, CAP_DEDICATED); else charge_manager_update_dualrole(port, CAP_DUALROLE); diff --git a/common/usbc/usb_pe_drp_sm.c b/common/usbc/usb_pe_drp_sm.c index 7521db7edb..cf9945abdc 100644 --- a/common/usbc/usb_pe_drp_sm.c +++ b/common/usbc/usb_pe_drp_sm.c @@ -881,12 +881,12 @@ static void pe_update_pdo_flags(int port, uint32_t pdo) { #ifdef CONFIG_CHARGE_MANAGER #ifdef CONFIG_USB_PD_ALT_MODE_DFP - int charge_whitelisted = + int charge_allowlisted = (tc_get_power_role(port) == PD_ROLE_SINK && pd_charge_from_device(pd_get_identity_vid(port), pd_get_identity_pid(port))); #else - const int charge_whitelisted = 0; + const int charge_allowlisted = 0; #endif #endif @@ -919,10 +919,10 @@ static void pe_update_pdo_flags(int port, uint32_t pdo) * Treat device as a dedicated charger (meaning we should charge * from it) if it does not support power swap, or if it is externally * powered, or if we are a sink and the device identity matches a - * charging white-list. + * charging allowlist. */ if (!(pdo & PDO_FIXED_DUAL_ROLE) || (pdo & PDO_FIXED_EXTERNAL) || - charge_whitelisted) { + charge_allowlisted) { PE_CLR_FLAG(port, PE_FLAGS_PORT_PARTNER_IS_DUALROLE); charge_manager_update_dualrole(port, CAP_DEDICATED); } else { @@ -4431,7 +4431,7 @@ int pd_charge_from_device(uint16_t vid, uint16_t pid) { /* TODO: rewrite into table if we get more of these */ /* - * White-list Apple charge-through accessory since it doesn't set + * Allow-list Apple charge-through accessory since it doesn't set * externally powered bit, but we still need to charge from it when * we are a sink. */ diff --git a/extra/cr50_rma_open/cr50_rma_open.py b/extra/cr50_rma_open/cr50_rma_open.py index 44038ab660..917ce26984 100755 --- a/extra/cr50_rma_open/cr50_rma_open.py +++ b/extra/cr50_rma_open/cr50_rma_open.py @@ -262,7 +262,7 @@ class RMAOpen(object): url = URL % (challenge, hwid) logging.info('GOTO:\n %s', url) logging.info('If the server fails to debug the challenge make sure the ' - 'RLZ is whitelisted') + 'RLZ is allowlisted') def try_authcode(self, authcode): """Try opening cr50 with the authcode diff --git a/include/usb_pd.h b/include/usb_pd.h index 08236b8813..dcd1586486 100644 --- a/include/usb_pd.h +++ b/include/usb_pd.h @@ -1677,7 +1677,7 @@ void pd_check_dr_role(int port, int dr_role, int flags); /** * Check if we should charge from this device. This is - * basically a white-list for chargers that are dual-role, + * basically a allow-list for chargers that are dual-role, * don't set the externally powered bit, but we should charge * from by default. * diff --git a/util/config_option_check.py b/util/config_option_check.py index 46b0c5b922..179d9d2299 100755 --- a/util/config_option_check.py +++ b/util/config_option_check.py @@ -48,7 +48,7 @@ class Hunk(object): CONFIG_FILE = 'include/config.h' # Specific files which the checker should ignore. -WHITELIST = [CONFIG_FILE, 'util/config_option_check.py'] +ALLOWLIST = [CONFIG_FILE, 'util/config_option_check.py'] def obtain_current_config_options(): """Obtains current config options from include/config.h. @@ -294,8 +294,8 @@ def get_hunks(): match = filename_re.search(line) if match: filename = match.groups(1)[0] - if filename in WHITELIST: - # Skip the file if it's whitelisted. + if filename in ALLOWLIST: + # Skip the file if it's allowlisted. current_state = 'new_file' else: current_state = 'hunk' |