From patchwork Thu Dec 13 08:36:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin LABBE X-Patchwork-Id: 10728151 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7751391E for ; Thu, 13 Dec 2018 08:36:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E01DE2BA55 for ; Thu, 13 Dec 2018 08:36:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DD1782BA66; Thu, 13 Dec 2018 08:36:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E73702BA8E for ; Thu, 13 Dec 2018 08:36:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726895AbeLMIgr (ORCPT ); Thu, 13 Dec 2018 03:36:47 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:53924 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726578AbeLMIgr (ORCPT ); Thu, 13 Dec 2018 03:36:47 -0500 Received: by mail-wm1-f66.google.com with SMTP id y1so1402562wmi.3 for ; Thu, 13 Dec 2018 00:36:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=GBvbuflI3tHjbAYUm96HadBjILlkS6dUAwM22uDvsHo=; b=BYclqQkRp9GGqTFEjoIiiRc3o5V2Q2eWb7JNw9xlWroLsalZLsIOo1KsQmTqKZN3sV WWH0D9rQRdQn+86NC4YMzOq+frIEUeF4O56W+61UrEFT5Bqoktk25eA3rHGn55ryQhB3 HzAcyYCP3ZO/rA/pqEx1vIltb3hd4CcZqCIrhK4Qmt6GfTqrB28idqNKA/XXRhARfrho GOMTzro6VJ2xJDYpBqIl+aJriAd6gF3u+zu3xyc/7cMqbEQYppQeyKx9RQtFuJx1mY6D jZeDnKN1lP7kbZ8zEMvSESjuKGpPwvhQ8j1AlMNv9dfY2FTLRNtpaEaJMFURWjpzEz8v QiaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=GBvbuflI3tHjbAYUm96HadBjILlkS6dUAwM22uDvsHo=; b=qltm+rnG45n3EUF8+lyxeEpp8JOh6jvtbTJ87bjYtA17l37xveKdEXem0CgZFBlLsC ZyAINGGXE0FqLPQuQXyzm0aPGiNLLNK7Kn1OmHRuYmfanf9PI0InHn+sZmEB4g4W61P9 NGc9MDHAR4pts2Z/cY4Qt1XgEyP3aNFLSDv2XWvmFe6m8OhM0TW6Td8EN1sUcWzvoN2W 408AJZXtSYKXRQJR3Lffpnc05uGPkM8R6hcpyrINiIab6yI4wVbVu7FUk6OTT2QpOncl GpW1Pty8+I8xo51LTVITRO6b8tYksZQ0lCEG2mK8766a/TWp2wNsHKiveCK5eBoMP8Lg 3W8w== X-Gm-Message-State: AA+aEWaCgNdSg1OYYy4jmsTrJTWXlBOLsioZsmA8QJaoE/VOLJDYWAfX 3nUy0SbaH9tdm89X5HqgqkyrJQ== X-Google-Smtp-Source: AFSGD/XuigEPunBzZu+7vY7f4ytmzyLmGN+YbRRL7P78AvPtJJNN+10Rva3qe/U7jJst4u24hfU1pA== X-Received: by 2002:a1c:58ce:: with SMTP id m197mr9735031wmb.31.1544690204929; Thu, 13 Dec 2018 00:36:44 -0800 (PST) Received: from localhost.localdomain ([51.15.160.169]) by smtp.googlemail.com with ESMTPSA id e19sm1823258wrc.25.2018.12.13.00.36.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 13 Dec 2018 00:36:44 -0800 (PST) From: Corentin Labbe To: davem@davemloft.net, herbert@gondor.apana.org.au Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, Corentin Labbe Subject: [PATCH 1/2] crypto: crypto_user_stat: remove unused dump functions Date: Thu, 13 Dec 2018 08:36:37 +0000 Message-Id: <1544690198-21993-1-git-send-email-clabbe@baylibre.com> X-Mailer: git-send-email 2.7.4 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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