diff options
author | Corentin Labbe <clabbe@baylibre.com> | 2018-12-13 03:36:37 -0500 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2018-12-22 22:52:44 -0500 |
commit | 0c99c2a087c60b71e1fc90d070e2e16ca52defbe (patch) | |
tree | 42d0e6674fe1299709f403a95239bd2f466217a7 | |
parent | f31ba0f95f1998118098978dbfb25ecbec6b0891 (diff) |
crypto: user - remove unused dump functions
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>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r-- | crypto/crypto_user_base.c | 4 | ||||
-rw-r--r-- | crypto/crypto_user_stat.c | 33 | ||||
-rw-r--r-- | include/crypto/internal/cryptouser.h | 12 |
3 files changed, 1 insertions, 48 deletions
diff --git a/crypto/crypto_user_base.c b/crypto/crypto_user_base.c index 5311fd7fae34..f25d3f32c9c2 100644 --- a/crypto/crypto_user_base.c +++ b/crypto/crypto_user_base.c | |||
@@ -423,9 +423,7 @@ static const struct crypto_link { | |||
423 | .dump = crypto_dump_report, | 423 | .dump = crypto_dump_report, |
424 | .done = crypto_dump_report_done}, | 424 | .done = crypto_dump_report_done}, |
425 | [CRYPTO_MSG_DELRNG - CRYPTO_MSG_BASE] = { .doit = crypto_del_rng }, | 425 | [CRYPTO_MSG_DELRNG - CRYPTO_MSG_BASE] = { .doit = crypto_del_rng }, |
426 | [CRYPTO_MSG_GETSTAT - CRYPTO_MSG_BASE] = { .doit = crypto_reportstat, | 426 | [CRYPTO_MSG_GETSTAT - CRYPTO_MSG_BASE] = { .doit = crypto_reportstat}, |
427 | .dump = crypto_dump_reportstat, | ||
428 | .done = crypto_dump_reportstat_done}, | ||
429 | }; | 427 | }; |
430 | 428 | ||
431 | static int crypto_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh, | 429 | 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 @@ drop_alg: | |||
336 | return nlmsg_unicast(crypto_nlsk, skb, NETLINK_CB(in_skb).portid); | 336 | return nlmsg_unicast(crypto_nlsk, skb, NETLINK_CB(in_skb).portid); |
337 | } | 337 | } |
338 | 338 | ||
339 | int crypto_dump_reportstat(struct sk_buff *skb, struct netlink_callback *cb) | ||
340 | { | ||
341 | struct crypto_alg *alg; | ||
342 | struct crypto_dump_info info; | ||
343 | int err; | ||
344 | |||
345 | if (cb->args[0]) | ||
346 | goto out; | ||
347 | |||
348 | cb->args[0] = 1; | ||
349 | |||
350 | info.in_skb = cb->skb; | ||
351 | info.out_skb = skb; | ||
352 | info.nlmsg_seq = cb->nlh->nlmsg_seq; | ||
353 | info.nlmsg_flags = NLM_F_MULTI; | ||
354 | |||
355 | list_for_each_entry(alg, &crypto_alg_list, cra_list) { | ||
356 | err = crypto_reportstat_alg(alg, &info); | ||
357 | if (err) | ||
358 | goto out_err; | ||
359 | } | ||
360 | |||
361 | out: | ||
362 | return skb->len; | ||
363 | out_err: | ||
364 | return err; | ||
365 | } | ||
366 | |||
367 | int crypto_dump_reportstat_done(struct netlink_callback *cb) | ||
368 | { | ||
369 | return 0; | ||
370 | } | ||
371 | |||
372 | MODULE_LICENSE("GPL"); | 339 | 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 @@ | |||
4 | struct crypto_alg *crypto_alg_match(struct crypto_user_alg *p, int exact); | 4 | struct crypto_alg *crypto_alg_match(struct crypto_user_alg *p, int exact); |
5 | 5 | ||
6 | #ifdef CONFIG_CRYPTO_STATS | 6 | #ifdef CONFIG_CRYPTO_STATS |
7 | int crypto_dump_reportstat(struct sk_buff *skb, struct netlink_callback *cb); | ||
8 | int crypto_reportstat(struct sk_buff *in_skb, struct nlmsghdr *in_nlh, struct nlattr **attrs); | 7 | int crypto_reportstat(struct sk_buff *in_skb, struct nlmsghdr *in_nlh, struct nlattr **attrs); |
9 | int crypto_dump_reportstat_done(struct netlink_callback *cb); | ||
10 | #else | 8 | #else |
11 | static int crypto_dump_reportstat(struct sk_buff *skb, struct netlink_callback *cb) | ||
12 | { | ||
13 | return -ENOTSUPP; | ||
14 | } | ||
15 | |||
16 | static int crypto_reportstat(struct sk_buff *in_skb, struct nlmsghdr *in_nlh, struct nlattr **attrs) | 9 | static int crypto_reportstat(struct sk_buff *in_skb, struct nlmsghdr *in_nlh, struct nlattr **attrs) |
17 | { | 10 | { |
18 | return -ENOTSUPP; | 11 | return -ENOTSUPP; |
19 | } | 12 | } |
20 | |||
21 | static int crypto_dump_reportstat_done(struct netlink_callback *cb) | ||
22 | { | ||
23 | return -ENOTSUPP; | ||
24 | } | ||
25 | #endif | 13 | #endif |