mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
ext4: remove dynamic array size in ext4_chksum()
The ext4_checksum() inline function was using a dynamic array size, which is not legal C. (It is a gcc extension). Remove it. Cc: "Darrick J. Wong" <djwong@us.ibm.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
This commit is contained in:
parent
8a9918497b
commit
3108b54bce
1 changed files with 3 additions and 1 deletions
|
@ -1667,10 +1667,12 @@ static inline u32 ext4_chksum(struct ext4_sb_info *sbi, u32 crc,
|
|||
{
|
||||
struct {
|
||||
struct shash_desc shash;
|
||||
char ctx[crypto_shash_descsize(sbi->s_chksum_driver)];
|
||||
char ctx[4];
|
||||
} desc;
|
||||
int err;
|
||||
|
||||
BUG_ON(crypto_shash_descsize(sbi->s_chksum_driver)!=sizeof(desc.ctx));
|
||||
|
||||
desc.shash.tfm = sbi->s_chksum_driver;
|
||||
desc.shash.flags = 0;
|
||||
*(u32 *)desc.ctx = crc;
|
||||
|
|
Loading…
Reference in a new issue