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

crypto: virtio - Remove unused virtcrypto functions

virtcrypto_devmgr_get_first() and virtcrypto_dev_in_use() were added in
2016 by
commit dbaf0624ffa5 ("crypto: add virtio-crypto driver")

but have remained unused.

Remove them.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Reviewed-by: Zenghui Yu <yuzenghui@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Dr. David Alan Gilbert and committed by
Herbert Xu
1adaaeeb 80247741

-38
-2
drivers/crypto/virtio/virtio_crypto_common.h
··· 113 113 int virtcrypto_devmgr_add_dev(struct virtio_crypto *vcrypto_dev); 114 114 struct list_head *virtcrypto_devmgr_get_head(void); 115 115 void virtcrypto_devmgr_rm_dev(struct virtio_crypto *vcrypto_dev); 116 - struct virtio_crypto *virtcrypto_devmgr_get_first(void); 117 - int virtcrypto_dev_in_use(struct virtio_crypto *vcrypto_dev); 118 116 int virtcrypto_dev_get(struct virtio_crypto *vcrypto_dev); 119 117 void virtcrypto_dev_put(struct virtio_crypto *vcrypto_dev); 120 118 int virtcrypto_dev_started(struct virtio_crypto *vcrypto_dev);
-36
drivers/crypto/virtio/virtio_crypto_mgr.c
··· 82 82 } 83 83 84 84 /* 85 - * virtcrypto_devmgr_get_first() 86 - * 87 - * Function returns the first virtio crypto device from the acceleration 88 - * framework. 89 - * 90 - * To be used by virtio crypto device specific drivers. 91 - * 92 - * Return: pointer to vcrypto_dev or NULL if not found. 93 - */ 94 - struct virtio_crypto *virtcrypto_devmgr_get_first(void) 95 - { 96 - struct virtio_crypto *dev = NULL; 97 - 98 - mutex_lock(&table_lock); 99 - if (!list_empty(&virtio_crypto_table)) 100 - dev = list_first_entry(&virtio_crypto_table, 101 - struct virtio_crypto, 102 - list); 103 - mutex_unlock(&table_lock); 104 - return dev; 105 - } 106 - 107 - /* 108 - * virtcrypto_dev_in_use() - Check whether vcrypto_dev is currently in use 109 - * @vcrypto_dev: Pointer to virtio crypto device. 110 - * 111 - * To be used by virtio crypto device specific drivers. 112 - * 113 - * Return: 1 when device is in use, 0 otherwise. 114 - */ 115 - int virtcrypto_dev_in_use(struct virtio_crypto *vcrypto_dev) 116 - { 117 - return atomic_read(&vcrypto_dev->ref_count) != 0; 118 - } 119 - 120 - /* 121 85 * virtcrypto_dev_get() - Increment vcrypto_dev reference count 122 86 * @vcrypto_dev: Pointer to virtio crypto device. 123 87 *