[patch 01/10] t add cast to regain ablkcipher_request from private ctx

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This cast allows to regain the struct ablkcipher_request for a request 
from private data.

Signed-off-by: Sebastian Siewior <linux-crypto@xxxxxxxxxxxxxxxx>
--- a/include/linux/crypto.h
+++ b/include/linux/crypto.h
@@ -580,6 +580,12 @@ static inline struct ablkcipher_request 
 	return container_of(req, struct ablkcipher_request, base);
 }
 
+static inline struct ablkcipher_request *ablkcipher_ctx_cast(
+		void *ctx)
+{
+	return container_of(ctx, struct ablkcipher_request, __ctx);
+}
+
 static inline struct ablkcipher_request *ablkcipher_request_alloc(
 	struct crypto_ablkcipher *tfm, gfp_t gfp)
 {

-- 

-
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux