Lines Matching refs:result
19 struct incfs_hash_alg *result = NULL; in incfs_get_hash_alg() local
24 result = &sha256; in incfs_get_hash_alg()
27 if (result == NULL) in incfs_get_hash_alg()
31 shash = smp_load_acquire(&result->shash); in incfs_get_hash_alg()
33 return result; in incfs_get_hash_alg()
35 shash = crypto_alloc_shash(result->name, 0, 0); in incfs_get_hash_alg()
40 result->name, err); in incfs_get_hash_alg()
45 if (cmpxchg_release(&result->shash, NULL, shash) != NULL) in incfs_get_hash_alg()
48 return result; in incfs_get_hash_alg()
59 static bool read_u32(u8 **p, u8 *top, u32 *result) in read_u32() argument
64 *result = le32_to_cpu(*(__le32 *)*p); in read_u32()
69 static bool read_u8(u8 **p, u8 *top, u8 *result) in read_u8() argument
74 *result = *(u8 *)*p; in read_u8()
135 struct mtree *result = NULL; in incfs_alloc_mtree() local
157 result = kzalloc(sizeof(*result), GFP_NOFS); in incfs_alloc_mtree()
158 if (!result) in incfs_alloc_mtree()
161 result->alg = hash_alg; in incfs_alloc_mtree()
162 hash_per_block = INCFS_DATA_FILE_BLOCK_SIZE / result->alg->digest_size; in incfs_alloc_mtree()
176 result->depth = lvl; in incfs_alloc_mtree()
177 result->hash_tree_area_size = total_blocks * INCFS_DATA_FILE_BLOCK_SIZE; in incfs_alloc_mtree()
178 if (result->hash_tree_area_size > INCFS_MAX_HASH_AREA_SIZE) in incfs_alloc_mtree()
183 for (lvl = 0; lvl < result->depth; lvl++) { in incfs_alloc_mtree()
190 result->hash_level_suboffset[lvl] = suboffset; in incfs_alloc_mtree()
194 memcpy(result->root_hash, si.root_hash.data, hash_alg->digest_size); in incfs_alloc_mtree()
195 return result; in incfs_alloc_mtree()
198 kfree(result); in incfs_alloc_mtree()