Lines Matching defs:length
261 * @length: the length of the final word.
263 static void stm32_hash_set_nblw(struct stm32_hash_dev *hdev, int length)
269 reg |= (8U * ((length) % 4U));
358 count = min(rctx->sg->length - rctx->offset, rctx->total);
362 if ((rctx->sg->length == 0) && !sg_is_last(rctx->sg)) {
377 if (rctx->offset == rctx->sg->length) {
388 const u8 *buf, size_t length, int final)
400 if (!(hdev->flags & HASH_FLAGS_INIT) && !length &&
407 len32 = DIV_ROUND_UP(length, sizeof(u32));
409 dev_dbg(hdev->dev, "%s: length: %zd, final: %x len32 %i\n",
410 __func__, length, final, len32);
434 stm32_hash_set_nblw(hdev, length);
520 struct scatterlist *sg, int length, int mdmat)
527 dev_dbg(hdev->dev, "%s mdmat: %x length: %d\n", __func__, mdmat, length);
530 if (length <= 0)
684 len = sg->length;
686 if (sg_is_last(sg) || (bufcnt + sg[0].length) >= rctx->total) {
691 sg->length -= sizeof(u32);
697 sg->length = rctx->total - bufcnt;
699 len = (ALIGN(sg->length, 16) - 16);
703 sg->length - len,
704 rctx->total - sg->length + len);
709 sg->length = len;
712 if (!(IS_ALIGNED(sg->length, sizeof(u32)))) {
713 len = sg->length;
714 sg->length = ALIGN(sg->length,
738 bufcnt += sg[0].length;
1149 if (!sg || !sg->length || !nbytes) {
1205 if (offset < sg_tmp->length) {
1211 if (!IS_ALIGNED(sg_tmp->length - offset, bs)) {
1218 offset -= sg_tmp->length;
1224 nbytes -= sg_tmp->length;
1349 free_pages((unsigned long)sg_virt(rctx->sg), get_order(rctx->sg->length));