提交 d656c180 编写于 作者: M Marek Vasut 提交者: Herbert Xu

crypto: skcipher - Don't use __crypto_dequeue_request()

Use skcipher_givcrypt_cast(crypto_dequeue_request(queue)) instead, which
does the same thing in much cleaner way. The skcipher_givcrypt_cast()
actually uses container_of() instead of messing around with offsetof()
too.
Signed-off-by: NMarek Vasut <marex@denx.de>
Reported-by: NArnd Bergmann <arnd@arndb.de>
Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 bb55a4c1
......@@ -81,8 +81,7 @@ static inline int skcipher_enqueue_givcrypt(
static inline struct skcipher_givcrypt_request *skcipher_dequeue_givcrypt(
struct crypto_queue *queue)
{
return __crypto_dequeue_request(
queue, offsetof(struct skcipher_givcrypt_request, creq.base));
return skcipher_givcrypt_cast(crypto_dequeue_request(queue));
}
static inline void *skcipher_givcrypt_reqctx(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册