Module Name: src Committed By: riastradh Date: Sun May 22 11:39:27 UTC 2022
Modified Files: src/share/man/man9: opencrypto.9 src/sys/arch/arm/sunxi: sun8i_crypto.c src/sys/arch/i386/pci: glxsb.c src/sys/arch/x86/x86: via_padlock.c src/sys/dev/marvell: mvcesa.c mvxpsecvar.h src/sys/dev/pci: hifn7751.c ubsec.c src/sys/dev/pci/qat: qat.c src/sys/opencrypto: crypto.c cryptodev.h cryptosoft.c Log Message: opencrypto: Make freesession callback return void. No functional change intended: all drivers already return zero unconditionally. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/share/man/man9/opencrypto.9 cvs rdiff -u -r1.31 -r1.32 src/sys/arch/arm/sunxi/sun8i_crypto.c cvs rdiff -u -r1.18 -r1.19 src/sys/arch/i386/pci/glxsb.c cvs rdiff -u -r1.34 -r1.35 src/sys/arch/x86/x86/via_padlock.c cvs rdiff -u -r1.5 -r1.6 src/sys/dev/marvell/mvcesa.c cvs rdiff -u -r1.2 -r1.3 src/sys/dev/marvell/mvxpsecvar.h cvs rdiff -u -r1.79 -r1.80 src/sys/dev/pci/hifn7751.c cvs rdiff -u -r1.58 -r1.59 src/sys/dev/pci/ubsec.c cvs rdiff -u -r1.7 -r1.8 src/sys/dev/pci/qat/qat.c cvs rdiff -u -r1.123 -r1.124 src/sys/opencrypto/crypto.c cvs rdiff -u -r1.46 -r1.47 src/sys/opencrypto/cryptodev.h cvs rdiff -u -r1.63 -r1.64 src/sys/opencrypto/cryptosoft.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/share/man/man9/opencrypto.9 diff -u src/share/man/man9/opencrypto.9:1.18 src/share/man/man9/opencrypto.9:1.19 --- src/share/man/man9/opencrypto.9:1.18 Sun May 22 11:34:17 2022 +++ src/share/man/man9/opencrypto.9 Sun May 22 11:39:26 2022 @@ -1,5 +1,5 @@ .\" $OpenBSD: crypto.9,v 1.25 2003/07/11 13:47:41 jmc Exp $ -.\" $NetBSD: opencrypto.9,v 1.18 2022/05/22 11:34:17 riastradh Exp $ +.\" $NetBSD: opencrypto.9,v 1.19 2022/05/22 11:39:26 riastradh Exp $ .\" .\" The author of this man page is Angelos D. Keromytis (ange...@cis.upenn.edu) .\" @@ -579,7 +579,7 @@ and migrate existing sessions to other d The calling convention for the three driver-supplied routines is: .Bd -literal int (*newsession) (void *, u_int32_t *, struct cryptoini *); -int (*freesession) (void *, u_int64_t); +void (*freesession) (void *, u_int64_t); int (*process) (void *, struct cryptop *, int); .Ed .Pp @@ -595,7 +595,9 @@ The second argument is identical to that The .Fn freesession routine takes as argument the SID (which is the concatenation of the -driver identifier and the driver-specific session identifier). +driver identifier and the driver-specific session identifier returned +by +.Fn newsession ). It should clear any context associated with the session (clear hardware registers, memory, etc.). .Pp Index: src/sys/arch/arm/sunxi/sun8i_crypto.c diff -u src/sys/arch/arm/sunxi/sun8i_crypto.c:1.31 src/sys/arch/arm/sunxi/sun8i_crypto.c:1.32 --- src/sys/arch/arm/sunxi/sun8i_crypto.c:1.31 Sun May 15 16:58:28 2022 +++ src/sys/arch/arm/sunxi/sun8i_crypto.c Sun May 22 11:39:26 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: sun8i_crypto.c,v 1.31 2022/05/15 16:58:28 riastradh Exp $ */ +/* $NetBSD: sun8i_crypto.c,v 1.32 2022/05/22 11:39:26 riastradh Exp $ */ /*- * Copyright (c) 2019 The NetBSD Foundation, Inc. @@ -43,7 +43,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(1, "$NetBSD: sun8i_crypto.c,v 1.31 2022/05/15 16:58:28 riastradh Exp $"); +__KERNEL_RCSID(1, "$NetBSD: sun8i_crypto.c,v 1.32 2022/05/22 11:39:26 riastradh Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -249,7 +249,7 @@ static void sun8i_crypto_register(struct static void sun8i_crypto_register1(struct sun8i_crypto_softc *, uint32_t); static int sun8i_crypto_newsession(void *, uint32_t *, struct cryptoini *); -static int sun8i_crypto_freesession(void *, uint64_t); +static void sun8i_crypto_freesession(void *, uint64_t); static u_int sun8i_crypto_ivlen(const struct cryptodesc *); static int sun8i_crypto_process(void *, struct cryptop *, int); static void sun8i_crypto_callback(struct sun8i_crypto_softc *, @@ -2050,14 +2050,11 @@ sun8i_crypto_newsession(void *cookie, ui * Note: dsid is actually a 64-bit quantity containing both the * driver id in the high half and the session id in the low half. */ -static int +static void sun8i_crypto_freesession(void *cookie, uint64_t dsid) { KASSERT((dsid & 0xffffffff) == 1); - - /* Success! */ - return 0; } /* Index: src/sys/arch/i386/pci/glxsb.c diff -u src/sys/arch/i386/pci/glxsb.c:1.18 src/sys/arch/i386/pci/glxsb.c:1.19 --- src/sys/arch/i386/pci/glxsb.c:1.18 Sun May 22 11:38:12 2022 +++ src/sys/arch/i386/pci/glxsb.c Sun May 22 11:39:26 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: glxsb.c,v 1.18 2022/05/22 11:38:12 riastradh Exp $ */ +/* $NetBSD: glxsb.c,v 1.19 2022/05/22 11:39:26 riastradh Exp $ */ /* $OpenBSD: glxsb.c,v 1.7 2007/02/12 14:31:45 tom Exp $ */ /* @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: glxsb.c,v 1.18 2022/05/22 11:38:12 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: glxsb.c,v 1.19 2022/05/22 11:39:26 riastradh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -180,7 +180,7 @@ CFATTACH_DECL_NEW(glxsb, sizeof(struct g int glxsb_crypto_setup(struct glxsb_softc *); int glxsb_crypto_newsession(void *, uint32_t *, struct cryptoini *); int glxsb_crypto_process(void *, struct cryptop *, int); -int glxsb_crypto_freesession(void *, uint64_t); +void glxsb_crypto_freesession(void *, uint64_t); static __inline void glxsb_aes(struct glxsb_softc *, uint32_t, uint32_t, uint32_t, void *, int, void *); @@ -352,7 +352,7 @@ glxsb_crypto_newsession(void *aux, uint3 return (0); } -int +void glxsb_crypto_freesession(void *aux, uint64_t tid) { struct glxsb_softc *sc = aux; @@ -364,7 +364,6 @@ glxsb_crypto_freesession(void *aux, uint sesn, sc->sc_nsessions); memset(&sc->sc_sessions[sesn], 0, sizeof(sc->sc_sessions[sesn])); - return (0); } /* Index: src/sys/arch/x86/x86/via_padlock.c diff -u src/sys/arch/x86/x86/via_padlock.c:1.34 src/sys/arch/x86/x86/via_padlock.c:1.35 --- src/sys/arch/x86/x86/via_padlock.c:1.34 Sun May 22 11:38:19 2022 +++ src/sys/arch/x86/x86/via_padlock.c Sun May 22 11:39:27 2022 @@ -1,5 +1,5 @@ /* $OpenBSD: via.c,v 1.8 2006/11/17 07:47:56 tom Exp $ */ -/* $NetBSD: via_padlock.c,v 1.34 2022/05/22 11:38:19 riastradh Exp $ */ +/* $NetBSD: via_padlock.c,v 1.35 2022/05/22 11:39:27 riastradh Exp $ */ /*- * Copyright (c) 2003 Jason Wright @@ -20,7 +20,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: via_padlock.c,v 1.34 2022/05/22 11:38:19 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: via_padlock.c,v 1.35 2022/05/22 11:39:27 riastradh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -67,7 +67,7 @@ int via_padlock_crypto_swauth(struct cry struct swcr_data *, void *); int via_padlock_crypto_encdec(struct cryptop *, struct cryptodesc *, struct via_padlock_session *, struct via_padlock_softc *, void *); -int via_padlock_crypto_freesession(void *, uint64_t); +void via_padlock_crypto_freesession(void *, uint64_t); static __inline void via_padlock_cbc(void *, void *, void *, void *, int, void *); @@ -298,7 +298,7 @@ via_padlock_crypto_newsession(void *arg, return (0); } -int +void via_padlock_crypto_freesession(void *arg, uint64_t tid) { struct via_padlock_softc *sc = arg; @@ -328,7 +328,6 @@ via_padlock_crypto_freesession(void *arg } memset(&sc->sc_sessions[sesn], 0, sizeof(sc->sc_sessions[sesn])); - return (0); } static __inline void Index: src/sys/dev/marvell/mvcesa.c diff -u src/sys/dev/marvell/mvcesa.c:1.5 src/sys/dev/marvell/mvcesa.c:1.6 --- src/sys/dev/marvell/mvcesa.c:1.5 Sun May 22 11:38:26 2022 +++ src/sys/dev/marvell/mvcesa.c Sun May 22 11:39:27 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: mvcesa.c,v 1.5 2022/05/22 11:38:26 riastradh Exp $ */ +/* $NetBSD: mvcesa.c,v 1.6 2022/05/22 11:39:27 riastradh Exp $ */ /* * Copyright (c) 2008 KIYOHARA Takashi * All rights reserved. @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mvcesa.c,v 1.5 2022/05/22 11:38:26 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mvcesa.c,v 1.6 2022/05/22 11:39:27 riastradh Exp $"); #include <sys/param.h> #include <sys/bus.h> @@ -80,7 +80,7 @@ static void mvcesa_attach(device_t, devi static int mvcesa_intr(void *); static int mvcesa_newsession(void *, u_int32_t *, struct cryptoini *); -static int mvcesa_freesession(void *, u_int64_t); +static void mvcesa_freesession(void *, u_int64_t); static int mvcesa_process(void *, struct cryptop *, int); static int mvcesa_authentication(struct mvcesa_softc *, struct mvcesa_session *, @@ -325,7 +325,7 @@ mvcesa_newsession(void *arg, u_int32_t * /* * Deallocate a session. */ -static int +static void mvcesa_freesession(void *arg, u_int64_t tid) { struct mvcesa_softc *sc = (struct mvcesa_softc *)arg; @@ -338,7 +338,6 @@ mvcesa_freesession(void *arg, u_int64_t session, sc->sc_nsessions); memset(&sc->sc_sessions[session], 0, sizeof(sc->sc_sessions[session])); - return (0); } static int Index: src/sys/dev/marvell/mvxpsecvar.h diff -u src/sys/dev/marvell/mvxpsecvar.h:1.2 src/sys/dev/marvell/mvxpsecvar.h:1.3 --- src/sys/dev/marvell/mvxpsecvar.h:1.2 Fri Dec 27 09:41:51 2019 +++ src/sys/dev/marvell/mvxpsecvar.h Sun May 22 11:39:27 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: mvxpsecvar.h,v 1.2 2019/12/27 09:41:51 msaitoh Exp $ */ +/* $NetBSD: mvxpsecvar.h,v 1.3 2022/05/22 11:39:27 riastradh Exp $ */ /* * Copyright (c) 2015 Internet Initiative Japan Inc. * All rights reserved. @@ -475,7 +475,7 @@ struct mvxpsec_softc { */ extern int mvxpsec_register(struct mvxpsec_softc *); extern int mvxpsec_newsession(void *, uint32_t *, struct cryptoini *); -extern int mvxpsec_freesession(void *, uint64_t); +extern void mvxpsec_freesession(void *, uint64_t); extern int mvxpsec_dispatch(void *, struct cryptop *, int); extern void mvxpsec_done(void *); Index: src/sys/dev/pci/hifn7751.c diff -u src/sys/dev/pci/hifn7751.c:1.79 src/sys/dev/pci/hifn7751.c:1.80 --- src/sys/dev/pci/hifn7751.c:1.79 Sun May 22 11:38:34 2022 +++ src/sys/dev/pci/hifn7751.c Sun May 22 11:39:27 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: hifn7751.c,v 1.79 2022/05/22 11:38:34 riastradh Exp $ */ +/* $NetBSD: hifn7751.c,v 1.80 2022/05/22 11:39:27 riastradh Exp $ */ /* $OpenBSD: hifn7751.c,v 1.179 2020/01/11 21:34:03 cheloha Exp $ */ /* @@ -47,7 +47,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: hifn7751.c,v 1.79 2022/05/22 11:38:34 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hifn7751.c,v 1.80 2022/05/22 11:39:27 riastradh Exp $"); #include <sys/param.h> #include <sys/cprng.h> @@ -105,7 +105,7 @@ static int hifn_intr(void *); static u_int hifn_write_command(struct hifn_command *, uint8_t *); static uint32_t hifn_next_signature(uint32_t a, u_int cnt); static int hifn_newsession(void*, uint32_t *, struct cryptoini *); -static int hifn_freesession(void*, uint64_t); +static void hifn_freesession(void*, uint64_t); static int hifn_process(void*, struct cryptop *, int); static void hifn_callback(struct hifn_softc *, struct hifn_command *, uint8_t *); @@ -2143,7 +2143,7 @@ out: * XXX this routine should run a zero'd mac/encrypt key into context ram. * XXX to blow away any keys already stored there. */ -static int +static void hifn_freesession(void *arg, uint64_t tid) { struct hifn_softc *sc = arg; @@ -2158,7 +2158,6 @@ hifn_freesession(void *arg, uint64_t tid KASSERT(isset(sc->sc_sessions, session)); clrbit(sc->sc_sessions, session); mutex_spin_exit(&sc->sc_mtx); - return (0); } static int Index: src/sys/dev/pci/ubsec.c diff -u src/sys/dev/pci/ubsec.c:1.58 src/sys/dev/pci/ubsec.c:1.59 --- src/sys/dev/pci/ubsec.c:1.58 Sun May 22 11:38:43 2022 +++ src/sys/dev/pci/ubsec.c Sun May 22 11:39:27 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: ubsec.c,v 1.58 2022/05/22 11:38:43 riastradh Exp $ */ +/* $NetBSD: ubsec.c,v 1.59 2022/05/22 11:39:27 riastradh Exp $ */ /* $FreeBSD: src/sys/dev/ubsec/ubsec.c,v 1.6.2.6 2003/01/23 21:06:43 sam Exp $ */ /* $OpenBSD: ubsec.c,v 1.143 2009/03/27 13:31:30 reyk Exp$ */ @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ubsec.c,v 1.58 2022/05/22 11:38:43 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ubsec.c,v 1.59 2022/05/22 11:39:27 riastradh Exp $"); #undef UBSEC_DEBUG @@ -99,7 +99,7 @@ int ubsec_debug=1; static int ubsec_intr(void *); static int ubsec_newsession(void*, u_int32_t *, struct cryptoini *); -static int ubsec_freesession(void*, u_int64_t); +static void ubsec_freesession(void*, u_int64_t); static int ubsec_process(void*, struct cryptop *, int hint); static void ubsec_callback(struct ubsec_softc *, struct ubsec_q *); static void ubsec_feed(struct ubsec_softc *); @@ -1099,7 +1099,7 @@ ubsec_newsession(void *arg, u_int32_t *s /* * Deallocate a session. */ -static int +static void ubsec_freesession(void *arg, u_int64_t tid) { struct ubsec_softc *sc = arg; @@ -1112,7 +1112,6 @@ ubsec_freesession(void *arg, u_int64_t t session, sc->sc_nsessions); memset(&sc->sc_sessions[session], 0, sizeof(sc->sc_sessions[session])); - return (0); } #ifdef __FreeBSD__ /* Ugly gratuitous changes to bus_dma */ Index: src/sys/dev/pci/qat/qat.c diff -u src/sys/dev/pci/qat/qat.c:1.7 src/sys/dev/pci/qat/qat.c:1.8 --- src/sys/dev/pci/qat/qat.c:1.7 Sat Nov 6 06:52:48 2021 +++ src/sys/dev/pci/qat/qat.c Sun May 22 11:39:27 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: qat.c,v 1.7 2021/11/06 06:52:48 msaitoh Exp $ */ +/* $NetBSD: qat.c,v 1.8 2022/05/22 11:39:27 riastradh Exp $ */ /* * Copyright (c) 2019 Internet Initiative Japan, Inc. @@ -57,7 +57,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: qat.c,v 1.7 2021/11/06 06:52:48 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: qat.c,v 1.8 2022/05/22 11:39:27 riastradh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -346,11 +346,11 @@ int qat_crypto_process(void *, struct c int qat_crypto_setup_ring(struct qat_softc *, struct qat_crypto_bank *); int qat_crypto_new_session(void *, uint32_t *, struct cryptoini *); -int qat_crypto_free_session0(struct qat_crypto *, +void qat_crypto_free_session0(struct qat_crypto *, struct qat_session *); void qat_crypto_check_free_session(struct qat_crypto *, struct qat_session *); -int qat_crypto_free_session(void *, uint64_t); +void qat_crypto_free_session(void *, uint64_t); int qat_crypto_bank_init(struct qat_softc *, struct qat_crypto_bank *); int qat_crypto_init(struct qat_softc *); @@ -1978,7 +1978,7 @@ qat_crypto_clean_desc(struct qat_crypto_ sizeof(desc->qcd_req_cache)); } -int +void qat_crypto_free_session0(struct qat_crypto *qcy, struct qat_session *qs) { @@ -1994,8 +1994,6 @@ qat_crypto_free_session0(struct qat_cryp QAT_EVCNT_INCR(&qcy->qcy_ev_free_sess); mutex_spin_exit(&qcy->qcy_crypto_mtx); - - return 0; } void @@ -2010,12 +2008,11 @@ qat_crypto_check_free_session(struct qat } } -int +void qat_crypto_free_session(void *arg, uint64_t sid) { struct qat_crypto *qcy = arg; struct qat_session *qs; - int error; qs = qcy->qcy_sessions[CRYPTO_SESID2LID(sid)]; @@ -2024,12 +2021,10 @@ qat_crypto_free_session(void *arg, uint6 if (qs->qs_inflight > 0) { qs->qs_status |= QAT_SESSION_STATUS_FREEING; mutex_spin_exit(&qs->qs_session_mtx); - return 0; + return; } - error = qat_crypto_free_session0(qcy, qs); - - return error; + qat_crypto_free_session0(qcy, qs); } int Index: src/sys/opencrypto/crypto.c diff -u src/sys/opencrypto/crypto.c:1.123 src/sys/opencrypto/crypto.c:1.124 --- src/sys/opencrypto/crypto.c:1.123 Sun May 22 11:34:40 2022 +++ src/sys/opencrypto/crypto.c Sun May 22 11:39:27 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: crypto.c,v 1.123 2022/05/22 11:34:40 riastradh Exp $ */ +/* $NetBSD: crypto.c,v 1.124 2022/05/22 11:39:27 riastradh Exp $ */ /* $FreeBSD: src/sys/opencrypto/crypto.c,v 1.4.2.5 2003/02/26 00:14:05 sam Exp $ */ /* $OpenBSD: crypto.c,v 1.41 2002/07/17 23:52:38 art Exp $ */ @@ -53,7 +53,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: crypto.c,v 1.123 2022/05/22 11:34:40 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: crypto.c,v 1.124 2022/05/22 11:39:27 riastradh Exp $"); #include <sys/param.h> #include <sys/reboot.h> @@ -879,9 +879,7 @@ crypto_freesession(u_int64_t sid) /* Call the driver cleanup routine, if available. */ if (cap->cc_freesession) - err = cap->cc_freesession(cap->cc_arg, sid); - else - err = 0; + cap->cc_freesession(cap->cc_arg, sid); /* * If this was the last session of a driver marked as invalid, @@ -1107,7 +1105,7 @@ int crypto_register(u_int32_t driverid, int alg, u_int16_t maxoplen, u_int32_t flags, int (*newses)(void *, u_int32_t*, struct cryptoini*), - int (*freeses)(void *, u_int64_t), + void (*freeses)(void *, u_int64_t), int (*process)(void *, struct cryptop *, int), void *arg) { Index: src/sys/opencrypto/cryptodev.h diff -u src/sys/opencrypto/cryptodev.h:1.46 src/sys/opencrypto/cryptodev.h:1.47 --- src/sys/opencrypto/cryptodev.h:1.46 Sun May 22 11:30:41 2022 +++ src/sys/opencrypto/cryptodev.h Sun May 22 11:39:27 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: cryptodev.h,v 1.46 2022/05/22 11:30:41 riastradh Exp $ */ +/* $NetBSD: cryptodev.h,v 1.47 2022/05/22 11:39:27 riastradh Exp $ */ /* $FreeBSD: src/sys/opencrypto/cryptodev.h,v 1.2.2.6 2003/07/02 17:04:50 sam Exp $ */ /* $OpenBSD: cryptodev.h,v 1.33 2002/07/17 23:52:39 art Exp $ */ @@ -575,7 +575,7 @@ struct cryptocap { void *cc_arg; /* callback argument */ int (*cc_newsession)(void*, u_int32_t*, struct cryptoini*); int (*cc_process) (void*, struct cryptop *, int); - int (*cc_freesession) (void*, u_int64_t); + void (*cc_freesession) (void *, u_int64_t); void *cc_karg; /* callback argument */ int (*cc_kprocess) (void*, struct cryptkop *, int); @@ -601,7 +601,7 @@ extern int32_t crypto_get_driverid(u_int extern int crypto_register(u_int32_t driverid, int alg, u_int16_t maxoplen, u_int32_t flags, int (*newses)(void*, u_int32_t*, struct cryptoini*), - int (*freeses)(void*, u_int64_t), + void (*freeses)(void *, u_int64_t), int (*process)(void*, struct cryptop *, int), void *arg); extern int crypto_kregister(u_int32_t, int, u_int32_t, Index: src/sys/opencrypto/cryptosoft.c diff -u src/sys/opencrypto/cryptosoft.c:1.63 src/sys/opencrypto/cryptosoft.c:1.64 --- src/sys/opencrypto/cryptosoft.c:1.63 Sun May 22 11:38:59 2022 +++ src/sys/opencrypto/cryptosoft.c Sun May 22 11:39:27 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: cryptosoft.c,v 1.63 2022/05/22 11:38:59 riastradh Exp $ */ +/* $NetBSD: cryptosoft.c,v 1.64 2022/05/22 11:39:27 riastradh Exp $ */ /* $FreeBSD: src/sys/opencrypto/cryptosoft.c,v 1.2.2.1 2002/11/21 23:34:23 sam Exp $ */ /* $OpenBSD: cryptosoft.c,v 1.35 2002/04/26 08:43:50 deraadt Exp $ */ @@ -24,7 +24,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cryptosoft.c,v 1.63 2022/05/22 11:38:59 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cryptosoft.c,v 1.64 2022/05/22 11:39:27 riastradh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -75,7 +75,7 @@ static int swcr_compdec(struct cryptodes static int swcr_combined(struct cryptop *, int); static int swcr_process(void *, struct cryptop *, int); static int swcr_newsession(void *, u_int32_t *, struct cryptoini *); -static int swcr_freesession(void *, u_int64_t); +static void swcr_freesession(void *, u_int64_t); static void swcr_freesession_internal(struct swcr_data *); static int swcryptoattach_internal(void); @@ -1119,7 +1119,7 @@ swcr_freesession_internal(struct swcr_da /* * Free a session. */ -static int +static void swcr_freesession(void *arg, u_int64_t tid) { struct swcr_data *swd; @@ -1132,8 +1132,6 @@ swcr_freesession(void *arg, u_int64_t ti swd = swcr_sessions[sid]; swcr_sessions[sid] = NULL; swcr_freesession_internal(swd); - - return 0; } /*