aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/crypto
diff options
context:
space:
mode:
authorNicholas Mc Guire <hofrat@osadl.org>2015-02-07 06:17:13 -0500
committerHerbert Xu <herbert@gondor.apana.org.au>2015-02-28 05:31:36 -0500
commit58ed798b8291f1d63c00d6dfe077587494a6790a (patch)
tree4e156afdbcc9b30cf9eb5b710ae85b9c80bb0da7 /drivers/crypto
parentdd0fff8db627e08272af98d9480ae8d892d8f440 (diff)
crypto: sahara - fix type of ret for wait_for_completion_timeout
return type of wait_for_completion_timeout is unsigned long not int, this patch adds appropriate variables of type unsigned long. Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto')
-rw-r--r--drivers/crypto/sahara.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/crypto/sahara.c b/drivers/crypto/sahara.c
index 290a7f0a681f..b65e2a5ab46f 100644
--- a/drivers/crypto/sahara.c
+++ b/drivers/crypto/sahara.c
@@ -576,6 +576,7 @@ static int sahara_aes_process(struct ablkcipher_request *req)
576 struct sahara_ctx *ctx; 576 struct sahara_ctx *ctx;
577 struct sahara_aes_reqctx *rctx; 577 struct sahara_aes_reqctx *rctx;
578 int ret; 578 int ret;
579 unsigned long timeout;
579 580
580 /* Request is ready to be dispatched by the device */ 581 /* Request is ready to be dispatched by the device */
581 dev_dbg(dev->device, 582 dev_dbg(dev->device,
@@ -602,9 +603,9 @@ static int sahara_aes_process(struct ablkcipher_request *req)
602 603
603 ret = sahara_hw_descriptor_create(dev); 604 ret = sahara_hw_descriptor_create(dev);
604 605
605 ret = wait_for_completion_timeout(&dev->dma_completion, 606 timeout = wait_for_completion_timeout(&dev->dma_completion,
606 msecs_to_jiffies(SAHARA_TIMEOUT_MS)); 607 msecs_to_jiffies(SAHARA_TIMEOUT_MS));
607 if (!ret) { 608 if (!timeout) {
608 dev_err(dev->device, "AES timeout\n"); 609 dev_err(dev->device, "AES timeout\n");
609 return -ETIMEDOUT; 610 return -ETIMEDOUT;
610 } 611 }
@@ -1045,6 +1046,7 @@ static int sahara_sha_process(struct ahash_request *req)
1045 struct sahara_dev *dev = dev_ptr; 1046 struct sahara_dev *dev = dev_ptr;
1046 struct sahara_sha_reqctx *rctx = ahash_request_ctx(req); 1047 struct sahara_sha_reqctx *rctx = ahash_request_ctx(req);
1047 int ret = -EINPROGRESS; 1048 int ret = -EINPROGRESS;
1049 unsigned long timeout;
1048 1050
1049 ret = sahara_sha_prepare_request(req); 1051 ret = sahara_sha_prepare_request(req);
1050 if (!ret) 1052 if (!ret)
@@ -1070,9 +1072,9 @@ static int sahara_sha_process(struct ahash_request *req)
1070 1072
1071 sahara_write(dev, dev->hw_phys_desc[0], SAHARA_REG_DAR); 1073 sahara_write(dev, dev->hw_phys_desc[0], SAHARA_REG_DAR);
1072 1074
1073 ret = wait_for_completion_timeout(&dev->dma_completion, 1075 timeout = wait_for_completion_timeout(&dev->dma_completion,
1074 msecs_to_jiffies(SAHARA_TIMEOUT_MS)); 1076 msecs_to_jiffies(SAHARA_TIMEOUT_MS));
1075 if (!ret) { 1077 if (!timeout) {
1076 dev_err(dev->device, "SHA timeout\n"); 1078 dev_err(dev->device, "SHA timeout\n");
1077 return -ETIMEDOUT; 1079 return -ETIMEDOUT;
1078 } 1080 }