|
@@ -18,15 +18,10 @@
|
|
#include <linux/slab.h>
|
|
#include <linux/slab.h>
|
|
#include <linux/seq_file.h>
|
|
#include <linux/seq_file.h>
|
|
|
|
|
|
-static const struct crypto_type crypto_shash_type;
|
|
|
|
-
|
|
|
|
-static inline struct crypto_shash *__crypto_shash_cast(struct crypto_tfm *tfm)
|
|
|
|
-{
|
|
|
|
- return container_of(tfm, struct crypto_shash, base);
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
#include "internal.h"
|
|
#include "internal.h"
|
|
|
|
|
|
|
|
+static const struct crypto_type crypto_shash_type;
|
|
|
|
+
|
|
static int shash_setkey_unaligned(struct crypto_shash *tfm, const u8 *key,
|
|
static int shash_setkey_unaligned(struct crypto_shash *tfm, const u8 *key,
|
|
unsigned int keylen)
|
|
unsigned int keylen)
|
|
{
|
|
{
|
|
@@ -282,8 +277,7 @@ static int crypto_init_shash_ops_async(struct crypto_tfm *tfm)
|
|
if (!crypto_mod_get(calg))
|
|
if (!crypto_mod_get(calg))
|
|
return -EAGAIN;
|
|
return -EAGAIN;
|
|
|
|
|
|
- shash = __crypto_shash_cast(crypto_create_tfm(
|
|
|
|
- calg, &crypto_shash_type));
|
|
|
|
|
|
+ shash = crypto_create_tfm(calg, &crypto_shash_type);
|
|
if (IS_ERR(shash)) {
|
|
if (IS_ERR(shash)) {
|
|
crypto_mod_put(calg);
|
|
crypto_mod_put(calg);
|
|
return PTR_ERR(shash);
|
|
return PTR_ERR(shash);
|
|
@@ -391,8 +385,7 @@ static int crypto_init_shash_ops_compat(struct crypto_tfm *tfm)
|
|
if (!crypto_mod_get(calg))
|
|
if (!crypto_mod_get(calg))
|
|
return -EAGAIN;
|
|
return -EAGAIN;
|
|
|
|
|
|
- shash = __crypto_shash_cast(crypto_create_tfm(
|
|
|
|
- calg, &crypto_shash_type));
|
|
|
|
|
|
+ shash = crypto_create_tfm(calg, &crypto_shash_type);
|
|
if (IS_ERR(shash)) {
|
|
if (IS_ERR(shash)) {
|
|
crypto_mod_put(calg);
|
|
crypto_mod_put(calg);
|
|
return PTR_ERR(shash);
|
|
return PTR_ERR(shash);
|
|
@@ -480,8 +473,7 @@ static const struct crypto_type crypto_shash_type = {
|
|
struct crypto_shash *crypto_alloc_shash(const char *alg_name, u32 type,
|
|
struct crypto_shash *crypto_alloc_shash(const char *alg_name, u32 type,
|
|
u32 mask)
|
|
u32 mask)
|
|
{
|
|
{
|
|
- return __crypto_shash_cast(
|
|
|
|
- crypto_alloc_tfm(alg_name, &crypto_shash_type, type, mask));
|
|
|
|
|
|
+ return crypto_alloc_tfm(alg_name, &crypto_shash_type, type, mask);
|
|
}
|
|
}
|
|
EXPORT_SYMBOL_GPL(crypto_alloc_shash);
|
|
EXPORT_SYMBOL_GPL(crypto_alloc_shash);
|
|
|
|
|