Commit d656c180de4d3eacd610c414fbcfe2509cf64a99
Committed by
Herbert Xu
1 parent
bb55a4c100
Exists in
ti-lsk-linux-4.1.y
and in
10 other branches
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: Marek Vasut <marex@denx.de> Reported-by: Arnd Bergmann <arnd@arndb.de> Cc: Pantelis Antoniou <panto@antoniou-consulting.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Showing 1 changed file with 1 additions and 2 deletions Side-by-side Diff
include/crypto/internal/skcipher.h
... | ... | @@ -81,8 +81,7 @@ |
81 | 81 | static inline struct skcipher_givcrypt_request *skcipher_dequeue_givcrypt( |
82 | 82 | struct crypto_queue *queue) |
83 | 83 | { |
84 | - return __crypto_dequeue_request( | |
85 | - queue, offsetof(struct skcipher_givcrypt_request, creq.base)); | |
84 | + return skcipher_givcrypt_cast(crypto_dequeue_request(queue)); | |
86 | 85 | } |
87 | 86 | |
88 | 87 | static inline void *skcipher_givcrypt_reqctx( |