]> git.proxmox.com Git - mirror_qemu.git/commitdiff
cryptodev: use NULL throttle timer cb for read direction
authorzhenwei pi <pizhenwei@bytedance.com>
Fri, 28 Jul 2023 02:20:02 +0000 (10:20 +0800)
committerHanna Czenczek <hreitz@redhat.com>
Tue, 29 Aug 2023 08:49:24 +0000 (10:49 +0200)
Operations on a cryptodev are considered as *write* only, the callback
of read direction is never invoked. Use NULL instead of an unreachable
path(cryptodev_backend_throttle_timer_cb on read direction).

The dummy read timer(never invoked) is already removed here, it means
that the 'FIXME' tag is no longer needed.

Reviewed-by: Alberto Garcia <berto@igalia.com>
Reviewed-by: Hanna Czenczek <hreitz@redhat.com>
Signed-off-by: zhenwei pi <pizhenwei@bytedance.com>
Message-Id: <20230728022006.1098509-6-pizhenwei@bytedance.com>
Signed-off-by: Hanna Czenczek <hreitz@redhat.com>
backends/cryptodev.c

index 4d183f7237a6f9431b70cc51721104f2de3cc24e..c2356550c811fd4f6d15ba76bfedfa09ca45d8ec 100644 (file)
@@ -341,8 +341,7 @@ static void cryptodev_backend_set_throttle(CryptoDevBackend *backend, int field,
     if (!enabled) {
         throttle_init(&backend->ts);
         throttle_timers_init(&backend->tt, qemu_get_aio_context(),
-                             QEMU_CLOCK_REALTIME,
-                             cryptodev_backend_throttle_timer_cb, /* FIXME */
+                             QEMU_CLOCK_REALTIME, NULL,
                              cryptodev_backend_throttle_timer_cb, backend);
     }