From: "Gonglei (Arei)" <arei.gonglei@huawei.com>
To: zhenwei pi <pizhenwei@bytedance.com>, "mst@redhat.com" <mst@redhat.com>
Cc: "jasowang@redhat.com" <jasowang@redhat.com>,
"virtualization@lists.linux-foundation.org"
<virtualization@lists.linux-foundation.org>,
"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"herbert@gondor.apana.org.au" <herbert@gondor.apana.org.au>,
"helei.sig11@bytedance.com" <helei.sig11@bytedance.com>
Subject: RE: [PATCH v3 4/4] virtio-crypto: rename skcipher algs
Date: Sat, 5 Mar 2022 07:12:44 +0000 [thread overview]
Message-ID: <7be43c7ef9414be98346af8f0b20f2d5@huawei.com> (raw)
In-Reply-To: <20220302033917.1295334-5-pizhenwei@bytedance.com>
> -----Original Message-----
> From: zhenwei pi [mailto:pizhenwei@bytedance.com]
> Sent: Wednesday, March 2, 2022 11:39 AM
> To: Gonglei (Arei) <arei.gonglei@huawei.com>; mst@redhat.com
> Cc: jasowang@redhat.com; virtualization@lists.linux-foundation.org;
> linux-crypto@vger.kernel.org; linux-kernel@vger.kernel.org;
> herbert@gondor.apana.org.au; helei.sig11@bytedance.com; zhenwei pi
> <pizhenwei@bytedance.com>
> Subject: [PATCH v3 4/4] 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>
> ---
> drivers/crypto/virtio/Makefile | 2 +-
> drivers/crypto/virtio/virtio_crypto_common.h | 4 ++--
> drivers/crypto/virtio/virtio_crypto_mgr.c | 8 ++++----
> ...virtio_crypto_algs.c => virtio_crypto_skcipher_algs.c} | 4 ++--
> 4 files changed, 9 insertions(+), 9 deletions(-) rename
> drivers/crypto/virtio/{virtio_crypto_algs.c => virtio_crypto_skcipher_algs.c}
> (99%)
>
Reviewed-by: Gonglei <arei.gonglei@huawei.com>
Regards,
-Gonglei
> diff --git a/drivers/crypto/virtio/Makefile b/drivers/crypto/virtio/Makefile index
> f2b839473d61..bfa6cbae342e 100644
> --- a/drivers/crypto/virtio/Makefile
> +++ b/drivers/crypto/virtio/Makefile
> @@ -1,7 +1,7 @@
> # SPDX-License-Identifier: GPL-2.0
> obj-$(CONFIG_CRYPTO_DEV_VIRTIO) += virtio_crypto.o virtio_crypto-objs :=
> \
> - virtio_crypto_algs.o \
> + virtio_crypto_skcipher_algs.o \
> virtio_crypto_akcipher_algs.o \
> virtio_crypto_mgr.o \
> virtio_crypto_core.o
> diff --git a/drivers/crypto/virtio/virtio_crypto_common.h
> b/drivers/crypto/virtio/virtio_crypto_common.h
> index 214f9a6fcf84..e693d4ee83a6 100644
> --- a/drivers/crypto/virtio/virtio_crypto_common.h
> +++ b/drivers/crypto/virtio/virtio_crypto_common.h
> @@ -130,8 +130,8 @@ static inline int virtio_crypto_get_current_node(void)
> return node;
> }
>
> -int virtio_crypto_algs_register(struct virtio_crypto *vcrypto); -void
> virtio_crypto_algs_unregister(struct virtio_crypto *vcrypto);
> +int virtio_crypto_skcipher_algs_register(struct virtio_crypto
> +*vcrypto); void virtio_crypto_skcipher_algs_unregister(struct
> +virtio_crypto *vcrypto);
> int virtio_crypto_akcipher_algs_register(struct virtio_crypto *vcrypto); void
> virtio_crypto_akcipher_algs_unregister(struct virtio_crypto *vcrypto);
>
> diff --git a/drivers/crypto/virtio/virtio_crypto_mgr.c
> b/drivers/crypto/virtio/virtio_crypto_mgr.c
> index 1cb92418b321..70e778aac0f2 100644
> --- a/drivers/crypto/virtio/virtio_crypto_mgr.c
> +++ b/drivers/crypto/virtio/virtio_crypto_mgr.c
> @@ -237,14 +237,14 @@ struct virtio_crypto *virtcrypto_get_dev_node(int
> node, uint32_t service,
> */
> int virtcrypto_dev_start(struct virtio_crypto *vcrypto) {
> - if (virtio_crypto_algs_register(vcrypto)) {
> - pr_err("virtio_crypto: Failed to register crypto algs\n");
> + if (virtio_crypto_skcipher_algs_register(vcrypto)) {
> + pr_err("virtio_crypto: Failed to register crypto skcipher algs\n");
> return -EFAULT;
> }
>
> if (virtio_crypto_akcipher_algs_register(vcrypto)) {
> pr_err("virtio_crypto: Failed to register crypto akcipher algs\n");
> - virtio_crypto_algs_unregister(vcrypto);
> + virtio_crypto_skcipher_algs_unregister(vcrypto);
> return -EFAULT;
> }
>
> @@ -263,7 +263,7 @@ int virtcrypto_dev_start(struct virtio_crypto *vcrypto)
> */
> void virtcrypto_dev_stop(struct virtio_crypto *vcrypto) {
> - virtio_crypto_algs_unregister(vcrypto);
> + virtio_crypto_skcipher_algs_unregister(vcrypto);
> virtio_crypto_akcipher_algs_unregister(vcrypto);
> }
>
> diff --git a/drivers/crypto/virtio/virtio_crypto_algs.c
> b/drivers/crypto/virtio/virtio_crypto_skcipher_algs.c
> similarity index 99%
> rename from drivers/crypto/virtio/virtio_crypto_algs.c
> rename to drivers/crypto/virtio/virtio_crypto_skcipher_algs.c
> index 583c0b535d13..a618c46a52b8 100644
> --- a/drivers/crypto/virtio/virtio_crypto_algs.c
> +++ b/drivers/crypto/virtio/virtio_crypto_skcipher_algs.c
> @@ -613,7 +613,7 @@ static struct virtio_crypto_algo virtio_crypto_algs[] =
> { {
> },
> } };
>
> -int virtio_crypto_algs_register(struct virtio_crypto *vcrypto)
> +int virtio_crypto_skcipher_algs_register(struct virtio_crypto *vcrypto)
> {
> int ret = 0;
> int i = 0;
> @@ -644,7 +644,7 @@ int virtio_crypto_algs_register(struct virtio_crypto
> *vcrypto)
> return ret;
> }
>
> -void virtio_crypto_algs_unregister(struct virtio_crypto *vcrypto)
> +void virtio_crypto_skcipher_algs_unregister(struct virtio_crypto
> +*vcrypto)
> {
> int i = 0;
>
> --
> 2.20.1
next prev parent reply other threads:[~2022-03-05 7:12 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-02 3:39 [PATCH v3 0/4] Introduce akcipher service for virtio-crypto zhenwei pi
2022-03-02 3:39 ` [PATCH v3 1/4] virtio_crypto: Introduce VIRTIO_CRYPTO_NOSPC zhenwei pi
2022-03-02 3:39 ` [PATCH v3 2/4] virtio-crypto: introduce akcipher service zhenwei pi
2022-03-05 7:11 ` Gonglei (Arei)
2022-03-02 3:39 ` [PATCH v3 3/4] virtio-crypto: implement RSA algorithm zhenwei pi
2022-03-05 7:12 ` Gonglei (Arei)
2022-03-02 3:39 ` [PATCH v3 4/4] virtio-crypto: rename skcipher algs zhenwei pi
2022-03-05 7:12 ` Gonglei (Arei) [this message]
2022-03-02 20:40 ` [PATCH v3 0/4] Introduce akcipher service for virtio-crypto Eric Biggers
2022-03-03 1:59 ` zhenwei pi
2022-03-07 2:42 ` zhenwei pi
2022-03-07 9:05 ` Michael S. Tsirkin
2022-03-07 9:07 ` zhenwei pi
2022-04-04 15:39 ` Cornelia Huck
2022-04-05 5:20 ` Michael S. Tsirkin
2022-04-05 8:33 ` Cornelia Huck
2022-04-06 7:47 ` Michael S. Tsirkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7be43c7ef9414be98346af8f0b20f2d5@huawei.com \
--to=arei.gonglei@huawei.com \
--cc=helei.sig11@bytedance.com \
--cc=herbert@gondor.apana.org.au \
--cc=jasowang@redhat.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=pizhenwei@bytedance.com \
--cc=virtualization@lists.linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox