Skip to content

Commit

Permalink
crypto.h: remove unused crypto_tfm_alg_modname() inline
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paul Gortmaker committed Oct 31, 2011
1 parent e2ffa37 commit 7c92640
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions include/linux/crypto.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 7c92640

Please sign in to comment.