diff options
author | Eric Biggers <ebiggers@google.com> | 2023-06-03 19:23:48 -0700 |
---|---|---|
committer | Eric Biggers <ebiggers@google.com> | 2023-06-04 05:56:11 -0700 |
commit | 32ab3c5e6226a5c39b6674b5fbb16b492c2faa2e (patch) | |
tree | 1988c2696957c61a3e145b259ad56f4fb8a5680f /fs/verity/open.c | |
parent | 8fcd94add6c5c93ed3b9314456e8420914401530 (diff) |
fsverity: constify fsverity_hash_alg
Now that fsverity_hash_alg doesn't have an embedded mempool, it can be
'const' almost everywhere. Add it.
Link: https://lore.kernel.org/r/20230604022348.48658-1-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@google.com>
Diffstat (limited to 'fs/verity/open.c')
-rw-r--r-- | fs/verity/open.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/verity/open.c b/fs/verity/open.c index 52048b7630dc..f0383bef86ea 100644 --- a/fs/verity/open.c +++ b/fs/verity/open.c @@ -32,7 +32,7 @@ int fsverity_init_merkle_tree_params(struct merkle_tree_params *params, unsigned int log_blocksize, const u8 *salt, size_t salt_size) { - struct fsverity_hash_alg *hash_alg; + const struct fsverity_hash_alg *hash_alg; int err; u64 blocks; u64 blocks_in_level[FS_VERITY_MAX_LEVELS]; @@ -158,7 +158,7 @@ out_err: * Compute the file digest by hashing the fsverity_descriptor excluding the * signature and with the sig_size field set to 0. */ -static int compute_file_digest(struct fsverity_hash_alg *hash_alg, +static int compute_file_digest(const struct fsverity_hash_alg *hash_alg, struct fsverity_descriptor *desc, u8 *file_digest) { |