linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: mingo@elte.hu, torvalds@linux-foundation.org
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
	linux-arch@vger.kernel.org
Subject: [PATCH 05/11] crypto.h: remove unused crypto_tfm_alg_modname() inline
Date: Thu, 28 Jul 2011 01:16:12 -0400	[thread overview]
Message-ID: <1311830178-30314-6-git-send-email-paul.gortmaker@windriver.com> (raw)
In-Reply-To: <1311830178-30314-1-git-send-email-paul.gortmaker@windriver.com>

The <linux/crypto.h> (which is in turn in common headers
like tcp.h) wants to use module_name() in an inline fcn.
But having all of <linux/module.h> along for the ride is
overkill and slows down compiles by a measureable amount,
since it in turn includes lots of headers.

Since the inline is never used anywhere in the kernel[1],
we can just remove it, and then also remove the module.h
include as well.

In all the many crypto modules, there were some relying on
crypto.h including module.h -- for them we now explicitly
call out module.h for inclusion.

[1] git grep shows some staging drivers also define the same
static inline, but they also never ever use it.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 include/linux/crypto.h |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/include/linux/crypto.h b/include/linux/crypto.h
index e5e468e..1e51f9a 100644
--- a/include/linux/crypto.h
+++ b/include/linux/crypto.h
@@ -18,7 +18,6 @@
 #define _LINUX_CRYPTO_H
 
 #include <linux/atomic.h>
-#include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/list.h>
 #include <linux/slab.h>
@@ -505,11 +504,6 @@ static inline int crypto_tfm_alg_priority(struct crypto_tfm *tfm)
 	return tfm->__crt_alg->cra_priority;
 }
 
-static inline const char *crypto_tfm_alg_modname(struct crypto_tfm *tfm)
-{
-	return module_name(tfm->__crt_alg->cra_module);
-}
-
 static inline u32 crypto_tfm_alg_type(struct crypto_tfm *tfm)
 {
 	return tfm->__crt_alg->cra_flags & CRYPTO_ALG_TYPE_MASK;
-- 
1.7.6

  parent reply	other threads:[~2011-07-28  5:16 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-28  5:16 [RFC/PULL 00/11] introduce export.h; reduce module.h usage Paul Gortmaker
2011-07-28  5:16 ` [PATCH 01/11] module.h: split out the EXPORT_SYMBOL for faster compiles Paul Gortmaker
2011-07-28  5:16 ` [PATCH 02/11] sysdev.h: dont include <linux/module.h> for no reason Paul Gortmaker
2011-07-28  5:16 ` [PATCH 03/11] net: inet_timewait_sock doesnt need <linux/module.h> Paul Gortmaker
2011-07-28  5:16 ` [PATCH 04/11] device_cgroup.h: delete needless include <linux/module.h> Paul Gortmaker
2011-07-28  5:16 ` Paul Gortmaker [this message]
2011-07-28  5:16 ` [PATCH 06/11] linux/stop_machine.h: fix implicit use of smp.h for smp_processor_id Paul Gortmaker
2011-07-28  5:16   ` Paul Gortmaker
2011-07-28  5:16 ` [PATCH 07/11] pm_runtime.h: explicitly requires notifier.h Paul Gortmaker
2011-07-28  5:16   ` Paul Gortmaker
2011-07-28  5:16 ` [PATCH 08/11] uwb.h: fix implicit use of asm/page.h for PAGE_SIZE Paul Gortmaker
2011-07-28  5:16 ` [PATCH 09/11] net: sch_generic remove redundant use of <linux/module.h> Paul Gortmaker
2011-07-28  5:16 ` [PATCH 10/11] include: convert various register fcns to macros to avoid include chaining Paul Gortmaker
2011-07-28  5:16   ` Paul Gortmaker
2011-07-28  5:16 ` [PATCH 11/11] include: replace linux/module.h with "struct module" wherever possible Paul Gortmaker
2011-07-28  5:16   ` Paul Gortmaker
2011-07-28  7:15 ` [RFC/PULL 00/11] introduce export.h; reduce module.h usage Ingo Molnar
2011-07-28 15:42   ` Paul Gortmaker
2011-07-29  1:20     ` Stephen Rothwell
2011-08-01 11:49       ` Geert Uytterhoeven
2011-08-02  5:02         ` Paul Gortmaker
2011-08-02  6:54           ` Geert Uytterhoeven
2011-07-28  9:40 ` Anca Emanuel
2011-07-28 13:19 ` Linus Torvalds
2011-07-28 15:27   ` Paul Gortmaker
2011-07-28 19:18     ` Ingo Molnar
2011-08-02 18:30   ` Paul Gortmaker
2011-08-08  2:42     ` Mike Frysinger
2011-08-10 19:09       ` Paul Gortmaker
2011-08-11  4:34         ` Mike Frysinger
2011-08-11 13:10           ` Paul Gortmaker
2011-08-11 13:10             ` Paul Gortmaker
2011-08-11 17:15             ` Mike Frysinger
2011-08-11 17:20               ` Paul Gortmaker
2011-10-13  2:07 ` Rusty Russell
2011-10-13 21:51   ` Paul Gortmaker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1311830178-30314-6-git-send-email-paul.gortmaker@windriver.com \
    --to=paul.gortmaker@windriver.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).