Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/pgoyette-localcount]: src/sys/dev Remove debug printfs.
details: https://anonhg.NetBSD.org/src/rev/9826ab139ebf
branches: pgoyette-localcount
changeset: 852850:9826ab139ebf
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Sat Jul 23 03:20:37 2016 +0000
description:
Remove debug printfs.
For MODULE builds, define cgd_cd via CFDRIVER_DECL
diffstat:
sys/dev/cgd.c | 24 ++++--------------------
1 files changed, 4 insertions(+), 20 deletions(-)
diffs (126 lines):
diff -r 01575ab58298 -r 9826ab139ebf sys/dev/cgd.c
--- a/sys/dev/cgd.c Sat Jul 23 02:36:51 2016 +0000
+++ b/sys/dev/cgd.c Sat Jul 23 03:20:37 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cgd.c,v 1.108.2.10 2016/07/23 02:36:51 pgoyette Exp $ */
+/* $NetBSD: cgd.c,v 1.108.2.11 2016/07/23 03:20:37 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.10 2016/07/23 02:36:51 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.108.2.11 2016/07/23 03:20:37 pgoyette Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -200,16 +200,13 @@
DPRINTF_FOLLOW(("getcgd_softc(0x%"PRIx64"): unit = %d\n", dev, unit));
-printf("%s: unit %d\n", __func__, unit);
*self = device_lookup_acquire(&cgd_cd, unit);
-printf("%s: *self %p\n", __func__, *self);
if (*self == NULL) {
sc = cgd_spawn(unit, self);
} else {
sc = device_private(*self);
}
-printf("%s: return, sc %p\n", __func__, sc);
return sc;
}
@@ -286,13 +283,9 @@
cf->cf_fstate = FSTATE_STAR;
if (config_attach_pseudo(cf) == NULL)
-{
-printf("%s: config_attach_pseudo() failed\n", __func__);
return NULL;
-}
*self = device_lookup_acquire(&cgd_cd, unit);
-printf("%s: pseudo added, *self %p\n", __func__, *self);
if (self == NULL)
return NULL;
else
@@ -674,7 +667,6 @@
DPRINTF_FOLLOW(("cgdioctl(0x%"PRIx64", %ld, %p, %d, %p)\n",
dev, cmd, data, flag, l));
-printf("%s: dev %lx cmd %lx\n", __func__, (long unsigned int)dev, cmd);
switch (cmd) {
case CGDIOCGET:
return cgd_ioctl_get(dev, data, l);
@@ -688,25 +680,21 @@
dksc = &cs->sc_dksc;
break;
}
-printf("%s: softc %p, self %p\n", __func__, cs, self);
switch (cmd) {
case CGDIOCSET:
-printf("%s: case CGDIOCSET\n", __func__);
if (DK_ATTACHED(dksc))
error = EBUSY;
else
error = cgd_ioctl_set(cs, data, l);
break;
case CGDIOCCLR:
-printf("%s: case CGDIOCCLR\n", __func__);
if (DK_BUSY(&cs->sc_dksc, pmask))
error = EBUSY;
else
error = cgd_ioctl_clr(cs, l);
break;
case DIOCCACHESYNC:
-printf("%s: case CGDIOCCACHESYNC\n", __func__);
/*
* XXX Do we really need to care about having a writable
* file descriptor here?
@@ -723,24 +711,20 @@
break;
case DIOCGSTRATEGY:
case DIOCSSTRATEGY:
-printf("%s: case CGDIOCxSTRATEGY\n", __func__);
if (!DK_ATTACHED(dksc)) {
error = ENOENT;
break;
}
/*FALLTHROUGH*/
default:
-printf("%s: case default\n", __func__);
error = dk_ioctl(dksc, dev, cmd, data, flag, l);
break;
case CGDIOCGET:
-printf("%s: case CGDIOCGET\n", __func__);
KASSERT(0);
error = EINVAL;
break;
}
device_release(self);
-printf("%s: return value %d\n", __func__, error);
return error;
}
@@ -1150,7 +1134,7 @@
MODULE(MODULE_CLASS_DRIVER, cgd, "dk_subr");
#ifdef _MODULE
-#include "ioconf.c"
+CFDRIVER_DECL(cgd, DV_DISK, NULL);
#endif
static int
@@ -1172,7 +1156,7 @@
error = config_cfattach_attach(cgd_cd.cd_name, &cgd_ca);
if (error) {
config_cfdriver_detach(&cgd_cd);
- aprint_error("%s: unable to register cfattach for ",
+ aprint_error("%s: unable to register cfattach for "
"%s, error %d", __func__, cgd_cd.cd_name, error);
break;
}
Home |
Main Index |
Thread Index |
Old Index