From patchwork Fri Dec 29 16:06:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Biggers X-Patchwork-Id: 10137205 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.web.codeaurora.org (Postfix) with ESMTP id 51FC86020A for ; Fri, 29 Dec 2017 16:07:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9DFC829F29 for ; Fri, 29 Dec 2017 16:07:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9140D2B5BB; Fri, 29 Dec 2017 16:07:11 +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.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, 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 383F329F29 for ; Fri, 29 Dec 2017 16:07:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751109AbdL2QHK (ORCPT ); Fri, 29 Dec 2017 11:07:10 -0500 Received: from mail-io0-f196.google.com ([209.85.223.196]:46360 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750869AbdL2QHJ (ORCPT ); Fri, 29 Dec 2017 11:07:09 -0500 Received: by mail-io0-f196.google.com with SMTP id x129so41575059iod.13 for ; Fri, 29 Dec 2017 08:07:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=JcRZAcMT+L/Xwi45Qn3hwnG2P8tSarqiKtTkDeJRXxQ=; b=jo6og2I5IiZWWE1qnE2IPg85+6KPC9Ss+PrFReKpXsHgFPZ22GMsS3/fJOrHSi9ENY q9yCUi0mxKPbRviwarVfhCzImXFXCR24HO33FntQY4XmaQedLLKpJtF/SNewKsVzWi7Y LqOdyZkyyEPWZpi6YtlthLZHkY51CwQsPEP+PCkPYymrftFNU5NbdGPv6RLvfAkrifL9 I95I0gkWU3cSJO9DOujAPw+nWj3EQWSSYoJuRZijic5/PAgkHzlpUIdlJz48ODxqYtja Orx3q05eQXU593eGaTJB/O5Bm91nnSJ0Plk7FfYaIEZ1FVShQzm2h+j0MmxhgpNDoH20 HkLw== 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=JcRZAcMT+L/Xwi45Qn3hwnG2P8tSarqiKtTkDeJRXxQ=; b=QF/VhADSvvUSod8sxUHnythTW/ayDBcBMUuXEo+QMkvzL46/KPHmW/rkpFS6n0sxV8 nmNaz22NskPaiI5CPoBllvkS32YkF2GuLxFpcAzQMfiRrbKWdC8bh9XVjiEKXuuGQ/7F Nsc5zfCvnWuVfoNoHGDiUSoObfaLwTiZmzGx54WSU680DATC7O7+l+Xi/0RuKbAWaA+m exUXjJXT8BMUxL1KufkuFnwgKXB91q9jdAQtRz+qHoZlrCfqEwuv2G1913Nuq8jJWwHJ BPymorzj97EPyGbbrlXxEkkfUyv3lvtlsQqEwWKCP7gMqiJ0l1B2Do3k+pWxST6q/RyY Q0jQ== X-Gm-Message-State: AKGB3mJUYImB3YxvIEj3179YMPmPgEBcSU18y0ILhpwRnJN3Gm9xa63q +SFTtVe8bYx1vd09l/JKXG9xr64d X-Google-Smtp-Source: ACJfBovpNxb3IJ/YDdRKngSq+L9CO//fNzGuuRRS2gia90AVPWyg76ei06QbjVek0mu9ot8bcgTG2Q== X-Received: by 10.107.55.3 with SMTP id e3mr32138477ioa.82.1514563628950; Fri, 29 Dec 2017 08:07:08 -0800 (PST) Received: from zzz.Home (h184-60-19-231.mdsnwi.dsl.dynamic.tds.net. [184.60.19.231]) by smtp.gmail.com with ESMTPSA id 15sm14557312ioh.14.2017.12.29.08.07.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 Dec 2017 08:07:08 -0800 (PST) From: Eric Biggers To: linux-crypto@vger.kernel.org, Herbert Xu Cc: "David S . Miller" , Eric Biggers Subject: [PATCH] crypto: algapi - remove unused notifications Date: Fri, 29 Dec 2017 10:06:46 -0600 Message-Id: <20171229160646.25273-1-ebiggers3@gmail.com> X-Mailer: git-send-email 2.15.1 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 From: Eric Biggers There is a message posted to the crypto notifier chain when an algorithm is unregistered, and when a template is registered or unregistered. But nothing is listening for those messages; currently there are only listeners for the algorithm request and registration messages. Get rid of these unused notifications for now. Signed-off-by: Eric Biggers --- crypto/algapi.c | 5 ----- crypto/internal.h | 3 --- 2 files changed, 8 deletions(-) diff --git a/crypto/algapi.c b/crypto/algapi.c index 8084a76e01d8..9895cafcce7e 100644 --- a/crypto/algapi.c +++ b/crypto/algapi.c @@ -123,7 +123,6 @@ static void crypto_remove_instance(struct crypto_instance *inst, if (!tmpl || !crypto_tmpl_get(tmpl)) return; - crypto_notify(CRYPTO_MSG_ALG_UNREGISTER, &inst->alg); list_move(&inst->alg.cra_list, list); hlist_del(&inst->list); inst->alg.cra_destroy = crypto_destroy_instance; @@ -380,7 +379,6 @@ static int crypto_remove_alg(struct crypto_alg *alg, struct list_head *list) alg->cra_flags |= CRYPTO_ALG_DEAD; - crypto_notify(CRYPTO_MSG_ALG_UNREGISTER, alg); list_del_init(&alg->cra_list); crypto_remove_spawns(alg, list, NULL); @@ -458,7 +456,6 @@ int crypto_register_template(struct crypto_template *tmpl) } list_add(&tmpl->list, &crypto_template_list); - crypto_notify(CRYPTO_MSG_TMPL_REGISTER, tmpl); err = 0; out: up_write(&crypto_alg_sem); @@ -485,8 +482,6 @@ void crypto_unregister_template(struct crypto_template *tmpl) BUG_ON(err); } - crypto_notify(CRYPTO_MSG_TMPL_UNREGISTER, tmpl); - up_write(&crypto_alg_sem); hlist_for_each_entry_safe(inst, n, list, list) { diff --git a/crypto/internal.h b/crypto/internal.h index 1388af6da85a..5ac27fba10e8 100644 --- a/crypto/internal.h +++ b/crypto/internal.h @@ -30,9 +30,6 @@ enum { CRYPTO_MSG_ALG_REQUEST, CRYPTO_MSG_ALG_REGISTER, - CRYPTO_MSG_ALG_UNREGISTER, - CRYPTO_MSG_TMPL_REGISTER, - CRYPTO_MSG_TMPL_UNREGISTER, }; struct crypto_instance;