Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

virtio-crypto: rename skcipher algs

Suggested by Gonglei, rename virtio_crypto_algs.c to
virtio_crypto_skcipher_algs.c. Also minor changes for function name.
Thus the function of source files get clear: skcipher services in
virtio_crypto_skcipher_algs.c and akcipher services in
virtio_crypto_akcipher_algs.c.

Signed-off-by: zhenwei pi <pizhenwei@bytedance.com>
Link: https://lore.kernel.org/r/20220302033917.1295334-5-pizhenwei@bytedance.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Gonglei <arei.gonglei@huawei.com>

authored by

zhenwei pi and committed by
Michael S. Tsirkin
ea993de1 59ca6c93

+9 -9
+1 -1
drivers/crypto/virtio/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 2 obj-$(CONFIG_CRYPTO_DEV_VIRTIO) += virtio_crypto.o 3 3 virtio_crypto-objs := \ 4 - virtio_crypto_algs.o \ 4 + virtio_crypto_skcipher_algs.o \ 5 5 virtio_crypto_akcipher_algs.o \ 6 6 virtio_crypto_mgr.o \ 7 7 virtio_crypto_core.o
+2 -2
drivers/crypto/virtio/virtio_crypto_algs.c drivers/crypto/virtio/virtio_crypto_skcipher_algs.c
··· 613 613 }, 614 614 } }; 615 615 616 - int virtio_crypto_algs_register(struct virtio_crypto *vcrypto) 616 + int virtio_crypto_skcipher_algs_register(struct virtio_crypto *vcrypto) 617 617 { 618 618 int ret = 0; 619 619 int i = 0; ··· 644 644 return ret; 645 645 } 646 646 647 - void virtio_crypto_algs_unregister(struct virtio_crypto *vcrypto) 647 + void virtio_crypto_skcipher_algs_unregister(struct virtio_crypto *vcrypto) 648 648 { 649 649 int i = 0; 650 650
+2 -2
drivers/crypto/virtio/virtio_crypto_common.h
··· 130 130 return node; 131 131 } 132 132 133 - int virtio_crypto_algs_register(struct virtio_crypto *vcrypto); 134 - void virtio_crypto_algs_unregister(struct virtio_crypto *vcrypto); 133 + int virtio_crypto_skcipher_algs_register(struct virtio_crypto *vcrypto); 134 + void virtio_crypto_skcipher_algs_unregister(struct virtio_crypto *vcrypto); 135 135 int virtio_crypto_akcipher_algs_register(struct virtio_crypto *vcrypto); 136 136 void virtio_crypto_akcipher_algs_unregister(struct virtio_crypto *vcrypto); 137 137
+4 -4
drivers/crypto/virtio/virtio_crypto_mgr.c
··· 237 237 */ 238 238 int virtcrypto_dev_start(struct virtio_crypto *vcrypto) 239 239 { 240 - if (virtio_crypto_algs_register(vcrypto)) { 241 - pr_err("virtio_crypto: Failed to register crypto algs\n"); 240 + if (virtio_crypto_skcipher_algs_register(vcrypto)) { 241 + pr_err("virtio_crypto: Failed to register crypto skcipher algs\n"); 242 242 return -EFAULT; 243 243 } 244 244 245 245 if (virtio_crypto_akcipher_algs_register(vcrypto)) { 246 246 pr_err("virtio_crypto: Failed to register crypto akcipher algs\n"); 247 - virtio_crypto_algs_unregister(vcrypto); 247 + virtio_crypto_skcipher_algs_unregister(vcrypto); 248 248 return -EFAULT; 249 249 } 250 250 ··· 263 263 */ 264 264 void virtcrypto_dev_stop(struct virtio_crypto *vcrypto) 265 265 { 266 - virtio_crypto_algs_unregister(vcrypto); 266 + virtio_crypto_skcipher_algs_unregister(vcrypto); 267 267 virtio_crypto_akcipher_algs_unregister(vcrypto); 268 268 } 269 269