mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/2] crypto: crypto_user_stat: remove unused dump functions
@ 2018-12-13  8:36 Corentin Labbe
  2018-12-13  8:36 ` [PATCH 2/2] crypto: document missing stats member Corentin Labbe
  2018-12-23  4:02 ` [PATCH 1/2] crypto: crypto_user_stat: remove unused dump functions Herbert Xu
  0 siblings, 2 replies; 3+ messages in thread
From: Corentin Labbe @ 2018-12-13  8:36 UTC (permalink / raw)
  To: davem, herbert; +Cc: linux-crypto, linux-kernel, Corentin Labbe

This patch removes unused dump functions for crypto_user_stats.
There are remains of the copy/paste of crypto_user_base to
crypto_user_stat and I forgot to remove them.

Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
---
 crypto/crypto_user_base.c            |  4 +---
 crypto/crypto_user_stat.c            | 33 ----------------------------
 include/crypto/internal/cryptouser.h | 12 ----------
 3 files changed, 1 insertion(+), 48 deletions(-)

diff --git a/crypto/crypto_user_base.c b/crypto/crypto_user_base.c
index 7021efbb35a1..f4f607631429 100644
--- a/crypto/crypto_user_base.c
+++ b/crypto/crypto_user_base.c
@@ -420,9 +420,7 @@ static const struct crypto_link {
 						       .dump = crypto_dump_report,
 						       .done = crypto_dump_report_done},
 	[CRYPTO_MSG_DELRNG	- CRYPTO_MSG_BASE] = { .doit = crypto_del_rng },
-	[CRYPTO_MSG_GETSTAT	- CRYPTO_MSG_BASE] = { .doit = crypto_reportstat,
-						       .dump = crypto_dump_reportstat,
-						       .done = crypto_dump_reportstat_done},
+	[CRYPTO_MSG_GETSTAT	- CRYPTO_MSG_BASE] = { .doit = crypto_reportstat},
 };
 
 static int crypto_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh,
diff --git a/crypto/crypto_user_stat.c b/crypto/crypto_user_stat.c
index 0ba00aaeb810..3e9a53233d80 100644
--- a/crypto/crypto_user_stat.c
+++ b/crypto/crypto_user_stat.c
@@ -336,37 +336,4 @@ int crypto_reportstat(struct sk_buff *in_skb, struct nlmsghdr *in_nlh,
 	return nlmsg_unicast(crypto_nlsk, skb, NETLINK_CB(in_skb).portid);
 }
 
-int crypto_dump_reportstat(struct sk_buff *skb, struct netlink_callback *cb)
-{
-	struct crypto_alg *alg;
-	struct crypto_dump_info info;
-	int err;
-
-	if (cb->args[0])
-		goto out;
-
-	cb->args[0] = 1;
-
-	info.in_skb = cb->skb;
-	info.out_skb = skb;
-	info.nlmsg_seq = cb->nlh->nlmsg_seq;
-	info.nlmsg_flags = NLM_F_MULTI;
-
-	list_for_each_entry(alg, &crypto_alg_list, cra_list) {
-		err = crypto_reportstat_alg(alg, &info);
-		if (err)
-			goto out_err;
-	}
-
-out:
-	return skb->len;
-out_err:
-	return err;
-}
-
-int crypto_dump_reportstat_done(struct netlink_callback *cb)
-{
-	return 0;
-}
-
 MODULE_LICENSE("GPL");
diff --git a/include/crypto/internal/cryptouser.h b/include/crypto/internal/cryptouser.h
index 3492ab42eefb..40623f4457df 100644
--- a/include/crypto/internal/cryptouser.h
+++ b/include/crypto/internal/cryptouser.h
@@ -4,22 +4,10 @@
 struct crypto_alg *crypto_alg_match(struct crypto_user_alg *p, int exact);
 
 #ifdef CONFIG_CRYPTO_STATS
-int crypto_dump_reportstat(struct sk_buff *skb, struct netlink_callback *cb);
 int crypto_reportstat(struct sk_buff *in_skb, struct nlmsghdr *in_nlh, struct nlattr **attrs);
-int crypto_dump_reportstat_done(struct netlink_callback *cb);
 #else
-static int crypto_dump_reportstat(struct sk_buff *skb, struct netlink_callback *cb)
-{
-	return -ENOTSUPP;
-}
-
 static int crypto_reportstat(struct sk_buff *in_skb, struct nlmsghdr *in_nlh, struct nlattr **attrs)
 {
 	return -ENOTSUPP;
 }
-
-static int crypto_dump_reportstat_done(struct netlink_callback *cb)
-{
-	return -ENOTSUPP;
-}
 #endif
-- 
2.19.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/2] crypto: document missing stats member
  2018-12-13  8:36 [PATCH 1/2] crypto: crypto_user_stat: remove unused dump functions Corentin Labbe
@ 2018-12-13  8:36 ` Corentin Labbe
  2018-12-23  4:02 ` [PATCH 1/2] crypto: crypto_user_stat: remove unused dump functions Herbert Xu
  1 sibling, 0 replies; 3+ messages in thread
From: Corentin Labbe @ 2018-12-13  8:36 UTC (permalink / raw)
  To: davem, herbert; +Cc: linux-crypto, linux-kernel, Corentin Labbe

This patchs adds missing member of stats documentation.

Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
---
 include/linux/crypto.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/include/linux/crypto.h b/include/linux/crypto.h
index 9850b41e38ae..81e178fb9ed8 100644
--- a/include/linux/crypto.h
+++ b/include/linux/crypto.h
@@ -564,6 +564,13 @@ struct crypto_istat_rng {
  * @cra_destroy: internally used
  *
  * @stats: union of all possible crypto_istat_xxx structures
+ * @stats.aead:		statistics for AEAD algorithm
+ * @stats.akcipher:	statistics for akcipher algorithm
+ * @stats.cipher:	statistics for cipher algorithm
+ * @stats.compress:	statistics for compress algorithm
+ * @stats.hash:		statistics for hash algorithm
+ * @stats.rng:		statistics for rng algorithm
+ * @stats.kpp:		statistics for KPP algorithm
  *
  * The struct crypto_alg describes a generic Crypto API algorithm and is common
  * for all of the transformations. Any variable not documented here shall not
-- 
2.19.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] crypto: crypto_user_stat: remove unused dump functions
  2018-12-13  8:36 [PATCH 1/2] crypto: crypto_user_stat: remove unused dump functions Corentin Labbe
  2018-12-13  8:36 ` [PATCH 2/2] crypto: document missing stats member Corentin Labbe
@ 2018-12-23  4:02 ` Herbert Xu
  1 sibling, 0 replies; 3+ messages in thread
From: Herbert Xu @ 2018-12-23  4:02 UTC (permalink / raw)
  To: Corentin Labbe; +Cc: davem, linux-crypto, linux-kernel

On Thu, Dec 13, 2018 at 08:36:37AM +0000, Corentin Labbe wrote:
> This patch removes unused dump functions for crypto_user_stats.
> There are remains of the copy/paste of crypto_user_base to
> crypto_user_stat and I forgot to remove them.
> 
> Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
> ---
>  crypto/crypto_user_base.c            |  4 +---
>  crypto/crypto_user_stat.c            | 33 ----------------------------
>  include/crypto/internal/cryptouser.h | 12 ----------
>  3 files changed, 1 insertion(+), 48 deletions(-)

All applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-12-23  4:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-13  8:36 [PATCH 1/2] crypto: crypto_user_stat: remove unused dump functions Corentin Labbe
2018-12-13  8:36 ` [PATCH 2/2] crypto: document missing stats member Corentin Labbe
2018-12-23  4:02 ` [PATCH 1/2] crypto: crypto_user_stat: remove unused dump functions Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®