crypto: caam - Set last bit on src SG list
[firefly-linux-kernel-4.4.55.git] / drivers / crypto / img-hash.c
index 027417273649ec8ee0952fe91fd0bc0692b315ba..ad47d0d6109845c810055fdb2ddaba8fa9d62039 100644 (file)
@@ -192,7 +192,7 @@ static int img_hash_xmit_cpu(struct img_hash_dev *hdev, const u8 *buf,
        u32 count, len32;
        const u32 *buffer = (const u32 *)buf;
 
-       dev_dbg(hdev->dev, "xmit_cpu:  length: %u bytes\n", length);
+       dev_dbg(hdev->dev, "xmit_cpu:  length: %zu bytes\n", length);
 
        if (final)
                hdev->flags |= DRIVER_FLAGS_FINAL;
@@ -459,13 +459,12 @@ static int img_hash_hw_init(struct img_hash_dev *hdev)
 {
        unsigned long long nbits;
        u32 u, l;
-       int ret;
 
        img_hash_write(hdev, CR_RESET, CR_RESET_SET);
        img_hash_write(hdev, CR_RESET, CR_RESET_UNSET);
        img_hash_write(hdev, CR_INTENAB, CR_INT_NEW_RESULTS_SET);
 
-       nbits = (hdev->req->nbytes << 3);
+       nbits = (u64)hdev->req->nbytes << 3;
        u = nbits >> 32;
        l = nbits;
        img_hash_write(hdev, CR_MESSAGE_LENGTH_H, u);
@@ -873,7 +872,7 @@ static const struct of_device_id img_hash_match[] = {
        { .compatible = "img,hash-accelerator" },
        {}
 };
-MODULE_DEVICE_TABLE(of, img_hash_match)
+MODULE_DEVICE_TABLE(of, img_hash_match);
 
 static int img_hash_probe(struct platform_device *pdev)
 {