Lines Matching refs:total
16 static int omap_crypto_copy_sg_lists(int total, int bs, in omap_crypto_copy_sg_lists() argument
33 while (*sg && total) { in omap_crypto_copy_sg_lists()
36 if (total < len) in omap_crypto_copy_sg_lists()
37 len = total; in omap_crypto_copy_sg_lists()
40 total -= len; in omap_crypto_copy_sg_lists()
42 if (total <= 0) in omap_crypto_copy_sg_lists()
55 static int omap_crypto_copy_sgs(int total, int bs, struct scatterlist **sg, in omap_crypto_copy_sgs() argument
62 new_len = ALIGN(total, bs); in omap_crypto_copy_sgs()
73 scatterwalk_map_and_copy(buf, *sg, 0, total, 0); in omap_crypto_copy_sgs()
75 memset(buf + total, 0, new_len - total); in omap_crypto_copy_sgs()
88 static int omap_crypto_check_sg(struct scatterlist *sg, int total, int bs, in omap_crypto_check_sg() argument
94 if (!IS_ALIGNED(total, bs)) in omap_crypto_check_sg()
112 if (len >= total) in omap_crypto_check_sg()
119 if (len != total) in omap_crypto_check_sg()
125 int omap_crypto_align_sg(struct scatterlist **sg, int total, int bs, in omap_crypto_align_sg() argument
136 ret = omap_crypto_check_sg(*sg, total, bs, flags); in omap_crypto_align_sg()
139 ret = omap_crypto_copy_sgs(total, bs, sg, new_sg, flags); in omap_crypto_align_sg()
144 ret = omap_crypto_copy_sg_lists(total, bs, sg, new_sg, flags); in omap_crypto_align_sg()