Skip to content

Commit 3e0f59f

Browse files
Dr. David Alan Gilbertidryomov
authored andcommitted
libceph: Remove unused ceph_crypto_key_encode
ceph_crypto_key_encode() was added in 2010's commit 8b6e4f2 ("ceph: aes crypto and base64 encode/decode helpers") but has remained unused (the decode is used). Remove it. Signed-off-by: Dr. David Alan Gilbert <[email protected]> Reviewed-by: Ilya Dryomov <[email protected]> Signed-off-by: Ilya Dryomov <[email protected]>
1 parent 32844fd commit 3e0f59f

File tree

2 files changed

+0
-13
lines changed

2 files changed

+0
-13
lines changed

net/ceph/crypto.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -74,18 +74,6 @@ int ceph_crypto_key_clone(struct ceph_crypto_key *dst,
7474
return set_secret(dst, src->key);
7575
}
7676

77-
int ceph_crypto_key_encode(struct ceph_crypto_key *key, void **p, void *end)
78-
{
79-
if (*p + sizeof(u16) + sizeof(key->created) +
80-
sizeof(u16) + key->len > end)
81-
return -ERANGE;
82-
ceph_encode_16(p, key->type);
83-
ceph_encode_copy(p, &key->created, sizeof(key->created));
84-
ceph_encode_16(p, key->len);
85-
ceph_encode_copy(p, key->key, key->len);
86-
return 0;
87-
}
88-
8977
int ceph_crypto_key_decode(struct ceph_crypto_key *key, void **p, void *end)
9078
{
9179
int ret;

net/ceph/crypto.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ struct ceph_crypto_key {
2121

2222
int ceph_crypto_key_clone(struct ceph_crypto_key *dst,
2323
const struct ceph_crypto_key *src);
24-
int ceph_crypto_key_encode(struct ceph_crypto_key *key, void **p, void *end);
2524
int ceph_crypto_key_decode(struct ceph_crypto_key *key, void **p, void *end);
2625
int ceph_crypto_key_unarmor(struct ceph_crypto_key *key, const char *in);
2726
void ceph_crypto_key_destroy(struct ceph_crypto_key *key);

0 commit comments

Comments
 (0)