Skip to content

Commit 0c99c2a

Browse files
montjoieherbertx
authored andcommitted
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>
1 parent f31ba0f commit 0c99c2a

File tree

3 files changed

+1
-48
lines changed

3 files changed

+1
-48
lines changed

crypto/crypto_user_base.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -423,9 +423,7 @@ static const struct crypto_link {
423423
.dump = crypto_dump_report,
424424
.done = crypto_dump_report_done},
425425
[CRYPTO_MSG_DELRNG - CRYPTO_MSG_BASE] = { .doit = crypto_del_rng },
426-
[CRYPTO_MSG_GETSTAT - CRYPTO_MSG_BASE] = { .doit = crypto_reportstat,
427-
.dump = crypto_dump_reportstat,
428-
.done = crypto_dump_reportstat_done},
426+
[CRYPTO_MSG_GETSTAT - CRYPTO_MSG_BASE] = { .doit = crypto_reportstat},
429427
};
430428

431429
static int crypto_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh,

crypto/crypto_user_stat.c

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -336,37 +336,4 @@ int crypto_reportstat(struct sk_buff *in_skb, struct nlmsghdr *in_nlh,
336336
return nlmsg_unicast(crypto_nlsk, skb, NETLINK_CB(in_skb).portid);
337337
}
338338

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-
372339
MODULE_LICENSE("GPL");

include/crypto/internal/cryptouser.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,10 @@
44
struct crypto_alg *crypto_alg_match(struct crypto_user_alg *p, int exact);
55

66
#ifdef CONFIG_CRYPTO_STATS
7-
int crypto_dump_reportstat(struct sk_buff *skb, struct netlink_callback *cb);
87
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);
108
#else
11-
static int crypto_dump_reportstat(struct sk_buff *skb, struct netlink_callback *cb)
12-
{
13-
return -ENOTSUPP;
14-
}
15-
169
static int crypto_reportstat(struct sk_buff *in_skb, struct nlmsghdr *in_nlh, struct nlattr **attrs)
1710
{
1811
return -ENOTSUPP;
1912
}
20-
21-
static int crypto_dump_reportstat_done(struct netlink_callback *cb)
22-
{
23-
return -ENOTSUPP;
24-
}
2513
#endif

0 commit comments

Comments
 (0)