mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-04 12:12:05 +00:00
modpost: fix array_size.cocci warning
Fix following coccicheck warning: scripts/mod/sumversion.c:219:48-49: WARNING: Use ARRAY_SIZE scripts/mod/sumversion.c:156:48-49: WARNING: Use ARRAY_SIZE Signed-off-by: KaiLong Wang <wangkailong@jari.cn> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
This commit is contained in:
parent
9f8fe64779
commit
30daacc571
@ -153,7 +153,7 @@ static void md4_transform(uint32_t *hash, uint32_t const *in)
|
||||
|
||||
static inline void md4_transform_helper(struct md4_ctx *ctx)
|
||||
{
|
||||
le32_to_cpu_array(ctx->block, sizeof(ctx->block) / sizeof(uint32_t));
|
||||
le32_to_cpu_array(ctx->block, ARRAY_SIZE(ctx->block));
|
||||
md4_transform(ctx->hash, ctx->block);
|
||||
}
|
||||
|
||||
@ -216,7 +216,7 @@ static void md4_final_ascii(struct md4_ctx *mctx, char *out, unsigned int len)
|
||||
le32_to_cpu_array(mctx->block, (sizeof(mctx->block) -
|
||||
sizeof(uint64_t)) / sizeof(uint32_t));
|
||||
md4_transform(mctx->hash, mctx->block);
|
||||
cpu_to_le32_array(mctx->hash, sizeof(mctx->hash) / sizeof(uint32_t));
|
||||
cpu_to_le32_array(mctx->hash, ARRAY_SIZE(mctx->hash));
|
||||
|
||||
snprintf(out, len, "%08X%08X%08X%08X",
|
||||
mctx->hash[0], mctx->hash[1], mctx->hash[2], mctx->hash[3]);
|
||||
|
Loading…
Reference in New Issue
Block a user