提交 58ed798b 编写于 作者: N Nicholas Mc Guire 提交者: Herbert Xu

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: NNicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 dd0fff8d
...@@ -576,6 +576,7 @@ static int sahara_aes_process(struct ablkcipher_request *req) ...@@ -576,6 +576,7 @@ static int sahara_aes_process(struct ablkcipher_request *req)
struct sahara_ctx *ctx; struct sahara_ctx *ctx;
struct sahara_aes_reqctx *rctx; struct sahara_aes_reqctx *rctx;
int ret; int ret;
unsigned long timeout;
/* Request is ready to be dispatched by the device */ /* Request is ready to be dispatched by the device */
dev_dbg(dev->device, dev_dbg(dev->device,
...@@ -602,9 +603,9 @@ static int sahara_aes_process(struct ablkcipher_request *req) ...@@ -602,9 +603,9 @@ static int sahara_aes_process(struct ablkcipher_request *req)
ret = sahara_hw_descriptor_create(dev); ret = sahara_hw_descriptor_create(dev);
ret = wait_for_completion_timeout(&dev->dma_completion, timeout = wait_for_completion_timeout(&dev->dma_completion,
msecs_to_jiffies(SAHARA_TIMEOUT_MS)); msecs_to_jiffies(SAHARA_TIMEOUT_MS));
if (!ret) { if (!timeout) {
dev_err(dev->device, "AES timeout\n"); dev_err(dev->device, "AES timeout\n");
return -ETIMEDOUT; return -ETIMEDOUT;
} }
...@@ -1045,6 +1046,7 @@ static int sahara_sha_process(struct ahash_request *req) ...@@ -1045,6 +1046,7 @@ static int sahara_sha_process(struct ahash_request *req)
struct sahara_dev *dev = dev_ptr; struct sahara_dev *dev = dev_ptr;
struct sahara_sha_reqctx *rctx = ahash_request_ctx(req); struct sahara_sha_reqctx *rctx = ahash_request_ctx(req);
int ret = -EINPROGRESS; int ret = -EINPROGRESS;
unsigned long timeout;
ret = sahara_sha_prepare_request(req); ret = sahara_sha_prepare_request(req);
if (!ret) if (!ret)
...@@ -1070,9 +1072,9 @@ static int sahara_sha_process(struct ahash_request *req) ...@@ -1070,9 +1072,9 @@ static int sahara_sha_process(struct ahash_request *req)
sahara_write(dev, dev->hw_phys_desc[0], SAHARA_REG_DAR); sahara_write(dev, dev->hw_phys_desc[0], SAHARA_REG_DAR);
ret = wait_for_completion_timeout(&dev->dma_completion, timeout = wait_for_completion_timeout(&dev->dma_completion,
msecs_to_jiffies(SAHARA_TIMEOUT_MS)); msecs_to_jiffies(SAHARA_TIMEOUT_MS));
if (!ret) { if (!timeout) {
dev_err(dev->device, "SHA timeout\n"); dev_err(dev->device, "SHA timeout\n");
return -ETIMEDOUT; return -ETIMEDOUT;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册