Commit 2d20ca83 authored by shirishpargaonkar@gmail.com's avatar shirishpargaonkar@gmail.com Committed by Steve French

Eliminate sparse warning - bad constant expression

Eliminiate sparse warning during usage of crypto_shash_* APIs
       error: bad constant expression

Allocate memory for shash descriptors once, so that we do not kmalloc/kfree it
for every signature generation (shash descriptor for md5 hash).

From ed7538619817777decc44b5660b52268077b74f3 Mon Sep 17 00:00:00 2001
From: Shirish Pargaonkar <shirishpargaonkar@gmail.com>
Date: Tue, 24 Aug 2010 11:47:43 -0500
Subject: [PATCH] eliminate sparse warnings during crypto_shash_* APis usage
Signed-off-by: default avatarShirish Pargaonkar <shirishpargaonkar@gmail.com>
Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
parent 24e6cf92
This diff is collapsed.
...@@ -123,12 +123,19 @@ struct cifs_cred { ...@@ -123,12 +123,19 @@ struct cifs_cred {
struct cifs_ace *aces; struct cifs_ace *aces;
}; };
struct sdesc {
struct shash_desc shash;
char ctx[];
};
struct ntlmssp_auth { struct ntlmssp_auth {
__u32 client_flags; __u32 client_flags;
__u32 server_flags; __u32 server_flags;
unsigned char ciphertext[CIFS_CPHTXT_SIZE]; unsigned char ciphertext[CIFS_CPHTXT_SIZE];
struct crypto_shash *hmacmd5; struct crypto_shash *hmacmd5;
struct crypto_shash *md5; struct crypto_shash *md5;
struct sdesc *sdeschmacmd5;
struct sdesc *sdescmd5;
}; };
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment