Module Name:    src
Committed By:   thorpej
Date:           Tue Jul  7 16:14:23 UTC 2020

Modified Files:
        src/sys/arch/x86/x86: x86_autoconf.c
        src/sys/dev/i2c: i2c.c i2cvar.h

Log Message:
whitelist -> permitlist


To generate a diff of this commit:
cvs rdiff -u -r1.82 -r1.83 src/sys/arch/x86/x86/x86_autoconf.c
cvs rdiff -u -r1.74 -r1.75 src/sys/dev/i2c/i2c.c
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/i2c/i2cvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x86/x86/x86_autoconf.c
diff -u src/sys/arch/x86/x86/x86_autoconf.c:1.82 src/sys/arch/x86/x86/x86_autoconf.c:1.83
--- src/sys/arch/x86/x86/x86_autoconf.c:1.82	Sat May  2 16:44:36 2020
+++ src/sys/arch/x86/x86/x86_autoconf.c	Tue Jul  7 16:14:23 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: x86_autoconf.c,v 1.82 2020/05/02 16:44:36 bouyer Exp $	*/
+/*	$NetBSD: x86_autoconf.c,v 1.83 2020/07/07 16:14:23 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: x86_autoconf.c,v 1.82 2020/05/02 16:44:36 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: x86_autoconf.c,v 1.83 2020/07/07 16:14:23 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -569,24 +569,24 @@ device_register(device_t dev, void *aux)
 	 */
 	if (device_is_a(dev, "iic") &&
 	    device_is_a(dev->dv_parent, "imcsmb")) {
-		static const char *imcsmb_device_whitelist[] = {
+		static const char *imcsmb_device_permitlist[] = {
 			"spdmem",
 			"sdtemp",
 			NULL,
 		};
-		prop_array_t whitelist = prop_array_create();
+		prop_array_t permitlist = prop_array_create();
 		prop_dictionary_t props = device_properties(dev);
 		int i;
 
-		for (i = 0; imcsmb_device_whitelist[i] != NULL; i++) {
+		for (i = 0; imcsmb_device_permitlist[i] != NULL; i++) {
 			prop_string_t pstr = prop_string_create_cstring_nocopy(
-			    imcsmb_device_whitelist[i]);
-			(void) prop_array_add(whitelist, pstr);
+			    imcsmb_device_permitlist[i]);
+			(void) prop_array_add(permitlist, pstr);
 			prop_object_release(pstr);
 		}
 		(void) prop_dictionary_set(props,
-					   I2C_PROP_INDIRECT_DEVICE_WHITELIST,
-					   whitelist);
+					   I2C_PROP_INDIRECT_DEVICE_PERMITLIST,
+					   permitlist);
 		(void) prop_dictionary_set_cstring_nocopy(props,
 					   I2C_PROP_INDIRECT_PROBE_STRATEGY,
 					   I2C_PROBE_STRATEGY_NONE);

Index: src/sys/dev/i2c/i2c.c
diff -u src/sys/dev/i2c/i2c.c:1.74 src/sys/dev/i2c/i2c.c:1.75
--- src/sys/dev/i2c/i2c.c:1.74	Fri Jun 12 03:32:30 2020
+++ src/sys/dev/i2c/i2c.c	Tue Jul  7 16:14:23 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: i2c.c,v 1.74 2020/06/12 03:32:30 thorpej Exp $	*/
+/*	$NetBSD: i2c.c,v 1.75 2020/07/07 16:14:23 thorpej Exp $	*/
 
 /*
  * Copyright (c) 2003 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i2c.c,v 1.74 2020/06/12 03:32:30 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i2c.c,v 1.75 2020/07/07 16:14:23 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -207,29 +207,30 @@ iic_probe_smbus_receive_byte(struct iic_
 }
 
 static bool
-iic_indirect_driver_is_whitelisted(struct iic_softc *sc, cfdata_t cf)
+iic_indirect_driver_is_permitted(struct iic_softc *sc, cfdata_t cf)
 {
 	prop_object_iterator_t iter;
-	prop_array_t whitelist;
+	prop_array_t permitlist;
 	prop_string_t pstr;
 	prop_type_t ptype;
 	bool rv = false;
 
-	whitelist = prop_dictionary_get(device_properties(sc->sc_dev),
-					I2C_PROP_INDIRECT_DEVICE_WHITELIST);
-	if (whitelist == NULL) {
-		/* No whitelist -> everything allowed */
+	permitlist = prop_dictionary_get(device_properties(sc->sc_dev),
+					 I2C_PROP_INDIRECT_DEVICE_PERMITLIST);
+	if (permitlist == NULL) {
+		/* No permitlist -> everything allowed */
 		return (true);
 	}
 
-	if ((ptype = prop_object_type(whitelist)) != PROP_TYPE_ARRAY) {
+	if ((ptype = prop_object_type(permitlist)) != PROP_TYPE_ARRAY) {
 		aprint_error_dev(sc->sc_dev,
 		    "invalid property type (%d) for '%s'; must be array (%d)\n",
-		    ptype, I2C_PROP_INDIRECT_DEVICE_WHITELIST, PROP_TYPE_ARRAY);
+		    ptype, I2C_PROP_INDIRECT_DEVICE_PERMITLIST,
+		    PROP_TYPE_ARRAY);
 		return (false);
 	}
 
-	iter = prop_array_iterator(whitelist);
+	iter = prop_array_iterator(permitlist);
 	while ((pstr = prop_object_iterator_next(iter)) != NULL) {
 		if (prop_string_equals_string(pstr, cf->cf_name)) {
 			rv = true;
@@ -253,9 +254,9 @@ iic_search(device_t parent, cfdata_t cf,
 
 	/*
 	 * Before we do any more work, consult the allowed-driver
-	 * white-list for this bus (if any).
+	 * permit-list for this bus (if any).
 	 */
-	if (iic_indirect_driver_is_whitelisted(sc, cf) == false)
+	if (iic_indirect_driver_is_permitted(sc, cf) == false)
 		return (0);
 
 	/* default to "quick write". */

Index: src/sys/dev/i2c/i2cvar.h
diff -u src/sys/dev/i2c/i2cvar.h:1.19 src/sys/dev/i2c/i2cvar.h:1.20
--- src/sys/dev/i2c/i2cvar.h:1.19	Sun Dec 22 23:23:32 2019
+++ src/sys/dev/i2c/i2cvar.h	Tue Jul  7 16:14:23 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: i2cvar.h,v 1.19 2019/12/22 23:23:32 thorpej Exp $	*/
+/*	$NetBSD: i2cvar.h,v 1.20 2020/07/07 16:14:23 thorpej Exp $	*/
 
 /*
  * Copyright (c) 2003 Wasabi Systems, Inc.
@@ -61,8 +61,8 @@
 #define	I2C_PROBE_STRATEGY_NONE			\
 				"none"
 
-#define	I2C_PROP_INDIRECT_DEVICE_WHITELIST	\
-				"i2c-indirect-device-whitelist"
+#define	I2C_PROP_INDIRECT_DEVICE_PERMITLIST	\
+				"i2c-indirect-device-permitlist"
 	/* value is a prop_array of prop_strings */
 
 struct ic_intr_list {

Reply via email to