Module Name: src
Committed By: pgoyette
Date: Mon Jul 25 03:40:52 UTC 2016
Modified Files:
src/sys/dev [pgoyette-localcount]: cgd.c
Log Message:
Add a comment to describe why we didn't convert one caller of
device_lokup_private().
To generate a diff of this commit:
cvs rdiff -u -r1.108.2.13 -r1.108.2.14 src/sys/dev/cgd.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/cgd.c
diff -u src/sys/dev/cgd.c:1.108.2.13 src/sys/dev/cgd.c:1.108.2.14
--- src/sys/dev/cgd.c:1.108.2.13 Sun Jul 24 10:44:57 2016
+++ src/sys/dev/cgd.c Mon Jul 25 03:40:52 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: cgd.c,v 1.108.2.13 2016/07/24 10:44:57 pgoyette Exp $ */
+/* $NetBSD: cgd.c,v 1.108.2.14 2016/07/25 03:40:52 pgoyette Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.108.2.13 2016/07/24 10:44:57 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.108.2.14 2016/07/25 03:40:52 pgoyette Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -910,6 +910,11 @@ cgd_ioctl_get(dev_t dev, void *data, str
return EINVAL; /* XXX: should this be ENXIO? */
}
+ /*
+ * XXX This appears to be redundant, given the initialization
+ * XXX when it was declared. Leave it for now, but don't
+ * XXX take an extra reference to the device!
+ */
cs = device_lookup_private(&cgd_cd, unit);
if (cs == NULL || !DK_ATTACHED(dksc)) {
cgu->cgu_dev = 0;