Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

crypto: n2 - Rename arrays to avoid conflict with crypto/sha256.h

Rename the sha*_init arrays to n2_sha*_init so that they do not conflict
with the functions declared in crypto/sha256.h.

Also rename md5_init to n2_md5_init for consistency.

This is a preparation patch for folding crypto/sha256.h into crypto/sha.h.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Hans de Goede and committed by
Herbert Xu
527aa895 6e4655e2

+8 -8
+8 -8
drivers/crypto/n2_core.c
··· 1283 1283 u8 hmac_type; 1284 1284 }; 1285 1285 1286 - static const u32 md5_init[MD5_HASH_WORDS] = { 1286 + static const u32 n2_md5_init[MD5_HASH_WORDS] = { 1287 1287 cpu_to_le32(MD5_H0), 1288 1288 cpu_to_le32(MD5_H1), 1289 1289 cpu_to_le32(MD5_H2), 1290 1290 cpu_to_le32(MD5_H3), 1291 1291 }; 1292 - static const u32 sha1_init[SHA1_DIGEST_SIZE / 4] = { 1292 + static const u32 n2_sha1_init[SHA1_DIGEST_SIZE / 4] = { 1293 1293 SHA1_H0, SHA1_H1, SHA1_H2, SHA1_H3, SHA1_H4, 1294 1294 }; 1295 - static const u32 sha256_init[SHA256_DIGEST_SIZE / 4] = { 1295 + static const u32 n2_sha256_init[SHA256_DIGEST_SIZE / 4] = { 1296 1296 SHA256_H0, SHA256_H1, SHA256_H2, SHA256_H3, 1297 1297 SHA256_H4, SHA256_H5, SHA256_H6, SHA256_H7, 1298 1298 }; 1299 - static const u32 sha224_init[SHA256_DIGEST_SIZE / 4] = { 1299 + static const u32 n2_sha224_init[SHA256_DIGEST_SIZE / 4] = { 1300 1300 SHA224_H0, SHA224_H1, SHA224_H2, SHA224_H3, 1301 1301 SHA224_H4, SHA224_H5, SHA224_H6, SHA224_H7, 1302 1302 }; ··· 1304 1304 static const struct n2_hash_tmpl hash_tmpls[] = { 1305 1305 { .name = "md5", 1306 1306 .hash_zero = md5_zero_message_hash, 1307 - .hash_init = md5_init, 1307 + .hash_init = n2_md5_init, 1308 1308 .auth_type = AUTH_TYPE_MD5, 1309 1309 .hmac_type = AUTH_TYPE_HMAC_MD5, 1310 1310 .hw_op_hashsz = MD5_DIGEST_SIZE, ··· 1312 1312 .block_size = MD5_HMAC_BLOCK_SIZE }, 1313 1313 { .name = "sha1", 1314 1314 .hash_zero = sha1_zero_message_hash, 1315 - .hash_init = sha1_init, 1315 + .hash_init = n2_sha1_init, 1316 1316 .auth_type = AUTH_TYPE_SHA1, 1317 1317 .hmac_type = AUTH_TYPE_HMAC_SHA1, 1318 1318 .hw_op_hashsz = SHA1_DIGEST_SIZE, ··· 1320 1320 .block_size = SHA1_BLOCK_SIZE }, 1321 1321 { .name = "sha256", 1322 1322 .hash_zero = sha256_zero_message_hash, 1323 - .hash_init = sha256_init, 1323 + .hash_init = n2_sha256_init, 1324 1324 .auth_type = AUTH_TYPE_SHA256, 1325 1325 .hmac_type = AUTH_TYPE_HMAC_SHA256, 1326 1326 .hw_op_hashsz = SHA256_DIGEST_SIZE, ··· 1328 1328 .block_size = SHA256_BLOCK_SIZE }, 1329 1329 { .name = "sha224", 1330 1330 .hash_zero = sha224_zero_message_hash, 1331 - .hash_init = sha224_init, 1331 + .hash_init = n2_sha224_init, 1332 1332 .auth_type = AUTH_TYPE_SHA256, 1333 1333 .hmac_type = AUTH_TYPE_RESERVED, 1334 1334 .hw_op_hashsz = SHA256_DIGEST_SIZE,