Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/opencrypto opencrypto: Prune dead code now that crypto_d...



details:   https://anonhg.NetBSD.org/src/rev/92054ad3f45a
branches:  trunk
changeset: 366342:92054ad3f45a
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun May 22 11:40:38 2022 +0000

description:
opencrypto: Prune dead code now that crypto_dispatch never fails.

diffstat:

 sys/opencrypto/cryptodev.c |  26 ++------------------------
 1 files changed, 2 insertions(+), 24 deletions(-)

diffs (49 lines):

diff -r 615c7ef76d15 -r 92054ad3f45a sys/opencrypto/cryptodev.c
--- a/sys/opencrypto/cryptodev.c        Sun May 22 11:40:29 2022 +0000
+++ b/sys/opencrypto/cryptodev.c        Sun May 22 11:40:38 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cryptodev.c,v 1.123 2022/05/22 11:40:29 riastradh Exp $ */
+/*     $NetBSD: cryptodev.c,v 1.124 2022/05/22 11:40:38 riastradh Exp $ */
 /*     $FreeBSD: src/sys/opencrypto/cryptodev.c,v 1.4.2.4 2003/06/03 00:09:02 sam Exp $        */
 /*     $OpenBSD: cryptodev.c,v 1.53 2002/07/10 22:21:30 mickey Exp $   */
 
@@ -64,7 +64,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cryptodev.c,v 1.123 2022/05/22 11:40:29 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cryptodev.c,v 1.124 2022/05/22 11:40:38 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1292,30 +1292,8 @@
                crp->crp_reqid = cnop[req].reqid;
                crp->crp_usropaque = cnop[req].opaque;
                cv_init(&crp->crp_cv, "crydev");
-#ifdef notyet
-eagain:
-#endif
                crypto_dispatch(crp);
                cnop[req].status = 0;
-               mutex_enter(&cryptodev_mtx);    /* XXX why mutex? */
-
-               switch (cnop[req].status) {
-#ifdef notyet  /* don't loop forever -- but EAGAIN not possible here yet */
-               case EAGAIN:
-                       mutex_exit(&cryptodev_mtx);
-                       goto eagain;
-                       break;
-#endif
-               case 0:
-                       break;
-               default:
-                       DPRINTF("not waiting, error.\n");
-                       mutex_exit(&cryptodev_mtx);
-                       cv_destroy(&crp->crp_cv);
-                       goto bail;
-               }
-
-               mutex_exit(&cryptodev_mtx);
                cv_destroy(&crp->crp_cv);
 bail:
                if (cnop[req].status) {



Home | Main Index | Thread Index | Old Index