1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-26 11:47:31 +00:00

aesni(4): Stylistic/comment enhancements

Improve clarity of a comment and style(9) some areas.

No functional change.

Reported by:	markj (on review of a mostly-copied driver)
Sponsored by:	Dell EMC Isilon
This commit is contained in:
Conrad Meyer 2018-03-15 16:17:02 +00:00
parent 8bf523086d
commit 8475a4175f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=331007

View File

@ -327,8 +327,8 @@ aesni_newsession(device_t dev, uint32_t *sidp, struct cryptoini *cri)
return (EINVAL);
}
/*
* Free sessions goes first, so if first session is used, we need to
* allocate one.
* Free sessions are inserted at the head of the list. So if the first
* session is used, none are free and we must allocate a new one.
*/
ses = TAILQ_FIRST(&sc->sessions);
if (ses == NULL || ses->used) {
@ -403,11 +403,13 @@ aesni_freesession(device_t dev, uint64_t tid)
static int
aesni_process(device_t dev, struct cryptop *crp, int hint __unused)
{
struct aesni_softc *sc = device_get_softc(dev);
struct aesni_session *ses = NULL;
struct aesni_softc *sc;
struct aesni_session *ses;
struct cryptodesc *crd, *enccrd, *authcrd;
int error, needauth;
sc = device_get_softc(dev);
ses = NULL;
error = 0;
enccrd = NULL;
authcrd = NULL;
@ -538,7 +540,7 @@ static device_method_t aesni_methods[] = {
DEVMETHOD(cryptodev_freesession, aesni_freesession),
DEVMETHOD(cryptodev_process, aesni_process),
{0, 0},
DEVMETHOD_END
};
static driver_t aesni_driver = {