Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/rockchip Use rnd_add_data_sync from the callback.



details:   https://anonhg.NetBSD.org/src/rev/98eb1df78b5b
branches:  trunk
changeset: 932929:98eb1df78b5b
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun May 17 20:29:39 2020 +0000

description:
Use rnd_add_data_sync from the callback.

(Doesn't make a difference in HEAD but this is the stated API
contract and it matters if we want to pull this up.)

diffstat:

 sys/arch/arm/rockchip/rk_v1crypto.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r c1055b958ee8 -r 98eb1df78b5b sys/arch/arm/rockchip/rk_v1crypto.c
--- a/sys/arch/arm/rockchip/rk_v1crypto.c       Sun May 17 19:57:25 2020 +0000
+++ b/sys/arch/arm/rockchip/rk_v1crypto.c       Sun May 17 20:29:39 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rk_v1crypto.c,v 1.1 2020/05/17 19:57:25 riastradh Exp $        */
+/*     $NetBSD: rk_v1crypto.c,v 1.2 2020/05/17 20:29:39 riastradh Exp $        */
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: rk_v1crypto.c,v 1.1 2020/05/17 19:57:25 riastradh Exp $");
+__KERNEL_RCSID(1, "$NetBSD: rk_v1crypto.c,v 1.2 2020/05/17 20:29:39 riastradh Exp $");
 
 #include <sys/types.h>
 
@@ -272,7 +272,8 @@
                        device_printf(self, "failed repeated output test\n");
                        break;
                }
-               rnd_add_data(&sc->sc_rndsource, buf, sizeof buf, entropybits);
+               rnd_add_data_sync(&sc->sc_rndsource, buf, sizeof buf,
+                   entropybits);
                nbits -= MIN(nbits, MAX(1, entropybits));
        }
        explicit_memset(buf, 0, sizeof buf);



Home | Main Index | Thread Index | Old Index