Module Name:    src
Committed By:   pgoyette
Date:           Thu Jul 14 21:57:06 UTC 2016

Modified Files:
        src/sys/kern: subr_autoconf.c

Log Message:
Remove a call to panic() which duplicates the subsequent KASSERT()!

XXX Since everything has (or should have) been switched to dev_t, we
XXX could probably remove the check for
XXX
XXX     ca->ca_devsize >= sizeof(struct device)
XXX
XXX But someone ought to check on that first!

Reviewed by riastradh@


To generate a diff of this commit:
cvs rdiff -u -r1.243 -r1.244 src/sys/kern/subr_autoconf.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/kern/subr_autoconf.c
diff -u src/sys/kern/subr_autoconf.c:1.243 src/sys/kern/subr_autoconf.c:1.244
--- src/sys/kern/subr_autoconf.c:1.243	Mon Jul 11 07:42:13 2016
+++ src/sys/kern/subr_autoconf.c	Thu Jul 14 21:57:06 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_autoconf.c,v 1.243 2016/07/11 07:42:13 msaitoh Exp $ */
+/* $NetBSD: subr_autoconf.c,v 1.244 2016/07/14 21:57:06 pgoyette Exp $ */
 
 /*
  * Copyright (c) 1996, 2000 Christopher G. Demetriou
@@ -77,7 +77,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.243 2016/07/11 07:42:13 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.244 2016/07/14 21:57:06 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -1369,11 +1369,6 @@ config_devalloc(const device_t parent, c
 	if (ca == NULL)
 		return NULL;
 
-	if ((ca->ca_flags & DVF_PRIV_ALLOC) == 0 &&
-	    ca->ca_devsize < sizeof(struct device))
-		panic("config_devalloc: %s (%zu < %zu)", cf->cf_atname,
-		    ca->ca_devsize, sizeof(struct device));
-
 	/* get memory for all device vars */
 	KASSERT((ca->ca_flags & DVF_PRIV_ALLOC)
 	    || ca->ca_devsize >= sizeof(struct device));

Reply via email to