mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: linux@treblig.org
To: xiubli@redhat.com, idryomov@gmail.com, ceph-devel@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
	"Dr. David Alan Gilbert" <linux@treblig.org>
Subject: [PATCH 4/5] libceph: Remove unused ceph_crypto_key_encode
Date: Sun,  6 Oct 2024 02:19:55 +0100	[thread overview]
Message-ID: <20241006011956.373622-5-linux@treblig.org> (raw)
In-Reply-To: <20241006011956.373622-1-linux@treblig.org>

From: "Dr. David Alan Gilbert" <linux@treblig.org>

ceph_crypto_key_encode() was added in 2010's commit
8b6e4f2d8b21 ("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 <linux@treblig.org>
---
 net/ceph/crypto.c | 12 ------------
 net/ceph/crypto.h |  1 -
 2 files changed, 13 deletions(-)

diff --git a/net/ceph/crypto.c b/net/ceph/crypto.c
index 051d22c0e4ad..01b2ce1e8fc0 100644
--- a/net/ceph/crypto.c
+++ b/net/ceph/crypto.c
@@ -74,18 +74,6 @@ int ceph_crypto_key_clone(struct ceph_crypto_key *dst,
 	return set_secret(dst, src->key);
 }
 
-int ceph_crypto_key_encode(struct ceph_crypto_key *key, void **p, void *end)
-{
-	if (*p + sizeof(u16) + sizeof(key->created) +
-	    sizeof(u16) + key->len > end)
-		return -ERANGE;
-	ceph_encode_16(p, key->type);
-	ceph_encode_copy(p, &key->created, sizeof(key->created));
-	ceph_encode_16(p, key->len);
-	ceph_encode_copy(p, key->key, key->len);
-	return 0;
-}
-
 int ceph_crypto_key_decode(struct ceph_crypto_key *key, void **p, void *end)
 {
 	int ret;
diff --git a/net/ceph/crypto.h b/net/ceph/crypto.h
index 13bd526349fa..23de29fc613c 100644
--- a/net/ceph/crypto.h
+++ b/net/ceph/crypto.h
@@ -21,7 +21,6 @@ struct ceph_crypto_key {
 
 int ceph_crypto_key_clone(struct ceph_crypto_key *dst,
 			  const struct ceph_crypto_key *src);
-int ceph_crypto_key_encode(struct ceph_crypto_key *key, void **p, void *end);
 int ceph_crypto_key_decode(struct ceph_crypto_key *key, void **p, void *end);
 int ceph_crypto_key_unarmor(struct ceph_crypto_key *key, const char *in);
 void ceph_crypto_key_destroy(struct ceph_crypto_key *key);
-- 
2.46.2


  parent reply	other threads:[~2024-10-06  1:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-06  1:19 [PATCH 0/5] Ceph deadcoding linux
2024-10-06  1:19 ` [PATCH 1/5] libceph: Remove unused ceph_pagelist functions linux
2024-10-06  1:19 ` [PATCH 2/5] libceph: Remove unused pagevec functions linux
2024-10-06  1:19 ` [PATCH 3/5] libceph: Remove unused ceph_osdc_watch_check linux
2024-10-06  1:19 ` linux [this message]
2024-10-06  1:19 ` [PATCH 5/5] ceph: Remove fs/ceph deadcode linux
2024-10-27 19:53 ` [PATCH 0/5] Ceph deadcoding Ilya Dryomov
2024-10-27 20:16 ` Ilya Dryomov
2024-10-27 20:45   ` Dr. David Alan Gilbert

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=20241006011956.373622-5-linux@treblig.org \
    --to=linux@treblig.org \
    --cc=ceph-devel@vger.kernel.org \
    --cc=idryomov@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xiubli@redhat.com \
    /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

Powered by JetHome