Linux 6.9-rc1
[linux-2.6-microblaze.git] / crypto / pcbc.c
index ae921fb..ab469ba 100644 (file)
@@ -10,6 +10,7 @@
  */
 
 #include <crypto/algapi.h>
+#include <crypto/internal/cipher.h>
 #include <crypto/internal/skcipher.h>
 #include <linux/err.h>
 #include <linux/init.h>
@@ -70,7 +71,7 @@ static int crypto_pcbc_encrypt(struct skcipher_request *req)
 
        err = skcipher_walk_virt(&walk, req, false);
 
-       while ((nbytes = walk.nbytes)) {
+       while (walk.nbytes) {
                if (walk.src.virt.addr == walk.dst.virt.addr)
                        nbytes = crypto_pcbc_encrypt_inplace(req, &walk,
                                                             cipher);
@@ -137,7 +138,7 @@ static int crypto_pcbc_decrypt(struct skcipher_request *req)
 
        err = skcipher_walk_virt(&walk, req, false);
 
-       while ((nbytes = walk.nbytes)) {
+       while (walk.nbytes) {
                if (walk.src.virt.addr == walk.dst.virt.addr)
                        nbytes = crypto_pcbc_decrypt_inplace(req, &walk,
                                                             cipher);
@@ -191,3 +192,4 @@ module_exit(crypto_pcbc_module_exit);
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("PCBC block cipher mode of operation");
 MODULE_ALIAS_CRYPTO("pcbc");
+MODULE_IMPORT_NS(CRYPTO_INTERNAL);