Lines Matching refs:total
19 static int omap_crypto_copy_sg_lists(int total, int bs, in omap_crypto_copy_sg_lists() argument
36 while (*sg && total) { in omap_crypto_copy_sg_lists()
39 if (total < len) in omap_crypto_copy_sg_lists()
40 len = total; in omap_crypto_copy_sg_lists()
43 total -= len; in omap_crypto_copy_sg_lists()
45 if (total <= 0) in omap_crypto_copy_sg_lists()
58 static int omap_crypto_copy_sgs(int total, int bs, struct scatterlist **sg, in omap_crypto_copy_sgs() argument
65 new_len = ALIGN(total, bs); in omap_crypto_copy_sgs()
76 scatterwalk_map_and_copy(buf, *sg, 0, total, 0); in omap_crypto_copy_sgs()
78 memset(buf + total, 0, new_len - total); in omap_crypto_copy_sgs()
91 static int omap_crypto_check_sg(struct scatterlist *sg, int total, int bs, in omap_crypto_check_sg() argument
97 if (!IS_ALIGNED(total, bs)) in omap_crypto_check_sg()
111 if (len >= total) in omap_crypto_check_sg()
118 if (len != total) in omap_crypto_check_sg()
124 int omap_crypto_align_sg(struct scatterlist **sg, int total, int bs, in omap_crypto_align_sg() argument
135 ret = omap_crypto_check_sg(*sg, total, bs, flags); in omap_crypto_align_sg()
138 ret = omap_crypto_copy_sgs(total, bs, sg, new_sg, flags); in omap_crypto_align_sg()
143 ret = omap_crypto_copy_sg_lists(total, bs, sg, new_sg, flags); in omap_crypto_align_sg()