Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 237f259c authored by Cong Wang's avatar Cong Wang Committed by Cong Wang
Browse files

crypto: remove the second argument of k[un]map_atomic()



Signed-off-by: default avatarCong Wang <amwang@redhat.com>
parent cfd8005c
Loading
Loading
Loading
Loading
+5 −5
Original line number Original line Diff line number Diff line
@@ -1731,9 +1731,9 @@ static int ablkcipher_get(void *saddr, unsigned int *srestp, unsigned int offset
	while (size) {
	while (size) {
		copy = min3(srest, dst->length, size);
		copy = min3(srest, dst->length, size);


		daddr = kmap_atomic(sg_page(dst), KM_IRQ0);
		daddr = kmap_atomic(sg_page(dst));
		memcpy(daddr + dst->offset + offset, saddr, copy);
		memcpy(daddr + dst->offset + offset, saddr, copy);
		kunmap_atomic(daddr, KM_IRQ0);
		kunmap_atomic(daddr);


		nbytes -= copy;
		nbytes -= copy;
		size -= copy;
		size -= copy;
@@ -1793,17 +1793,17 @@ static void hifn_process_ready(struct ablkcipher_request *req, int error)
				continue;
				continue;
			}
			}


			saddr = kmap_atomic(sg_page(t), KM_SOFTIRQ0);
			saddr = kmap_atomic(sg_page(t));


			err = ablkcipher_get(saddr, &t->length, t->offset,
			err = ablkcipher_get(saddr, &t->length, t->offset,
					dst, nbytes, &nbytes);
					dst, nbytes, &nbytes);
			if (err < 0) {
			if (err < 0) {
				kunmap_atomic(saddr, KM_SOFTIRQ0);
				kunmap_atomic(saddr);
				break;
				break;
			}
			}


			idx += err;
			idx += err;
			kunmap_atomic(saddr, KM_SOFTIRQ0);
			kunmap_atomic(saddr);
		}
		}


		hifn_cipher_walk_exit(&rctx->walk);
		hifn_cipher_walk_exit(&rctx->walk);