Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1298648 > unrolled thread
| Started by | Geliang Tang <geliangtang@163.com> |
|---|---|
| First post | 2015-12-28 15:00 +0100 |
| Last post | 2015-12-29 14:40 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] crypto: hifn_795x, picoxcell - use ablkcipher_request_cast Geliang Tang <geliangtang@163.com> - 2015-12-28 15:00 +0100
Re: [PATCH] crypto: hifn_795x, picoxcell - use ablkcipher_request_cast Herbert Xu <herbert@gondor.apana.org.au> - 2015-12-29 14:40 +0100
| From | Geliang Tang <geliangtang@163.com> |
|---|---|
| Date | 2015-12-28 15:00 +0100 |
| Subject | [PATCH] crypto: hifn_795x, picoxcell - use ablkcipher_request_cast |
| Message-ID | <qKGv8-2Oh-15@gated-at.bofh.it> |
Use ablkcipher_request_cast() instead of open-coding it.
Signed-off-by: Geliang Tang <geliangtang@163.com>
---
drivers/crypto/hifn_795x.c | 4 ++--
drivers/crypto/picoxcell_crypto.c | 3 +--
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/crypto/hifn_795x.c b/drivers/crypto/hifn_795x.c
index 201e57d..eee2c7e 100644
--- a/drivers/crypto/hifn_795x.c
+++ b/drivers/crypto/hifn_795x.c
@@ -1943,7 +1943,7 @@ static void hifn_flush(struct hifn_device *dev)
spin_lock_irqsave(&dev->lock, flags);
while ((async_req = crypto_dequeue_request(&dev->queue))) {
- req = container_of(async_req, struct ablkcipher_request, base);
+ req = ablkcipher_request_cast(async_req);
spin_unlock_irqrestore(&dev->lock, flags);
hifn_process_ready(req, -ENODEV);
@@ -2062,7 +2062,7 @@ static int hifn_process_queue(struct hifn_device *dev)
if (backlog)
backlog->complete(backlog, -EINPROGRESS);
- req = container_of(async_req, struct ablkcipher_request, base);
+ req = ablkcipher_request_cast(async_req);
err = hifn_handle_req(req);
if (err)
diff --git a/drivers/crypto/picoxcell_crypto.c b/drivers/crypto/picoxcell_crypto.c
index 15b5e39..3b1c7ec 100644
--- a/drivers/crypto/picoxcell_crypto.c
+++ b/drivers/crypto/picoxcell_crypto.c
@@ -856,8 +856,7 @@ static int spacc_ablk_need_fallback(struct spacc_req *req)
static void spacc_ablk_complete(struct spacc_req *req)
{
- struct ablkcipher_request *ablk_req =
- container_of(req->req, struct ablkcipher_request, base);
+ struct ablkcipher_request *ablk_req = ablkcipher_request_cast(req->req);
if (ablk_req->src != ablk_req->dst) {
spacc_free_ddt(req, req->src_ddt, req->src_addr, ablk_req->src,
--
2.5.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Herbert Xu <herbert@gondor.apana.org.au> |
|---|---|
| Date | 2015-12-29 14:40 +0100 |
| Subject | Re: [PATCH] crypto: hifn_795x, picoxcell - use ablkcipher_request_cast |
| Message-ID | <qL2Fl-17h-15@gated-at.bofh.it> |
| In reply to | #1298648 |
On Mon, Dec 28, 2015 at 09:53:07PM +0800, Geliang Tang wrote: > Use ablkcipher_request_cast() instead of open-coding it. > > Signed-off-by: Geliang Tang <geliangtang@163.com> Applied. -- Email: Herbert Xu <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web