lkml.org 
[lkml]   [2019]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 01/12] crypto: add helper function for akcipher_request
    Date
    Add akcipher_request_cast function to get an akcipher_request struct from
    a crypto_async_request struct.

    Remove this function from ccp driver.

    Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
    ---
    drivers/crypto/ccp/ccp-crypto-rsa.c | 6 ------
    include/crypto/akcipher.h | 6 ++++++
    2 files changed, 6 insertions(+), 6 deletions(-)

    diff --git a/drivers/crypto/ccp/ccp-crypto-rsa.c b/drivers/crypto/ccp/ccp-crypto-rsa.c
    index 649c91d..3ab659d 100644
    --- a/drivers/crypto/ccp/ccp-crypto-rsa.c
    +++ b/drivers/crypto/ccp/ccp-crypto-rsa.c
    @@ -19,12 +19,6 @@

    #include "ccp-crypto.h"

    -static inline struct akcipher_request *akcipher_request_cast(
    - struct crypto_async_request *req)
    -{
    - return container_of(req, struct akcipher_request, base);
    -}
    -
    static inline int ccp_copy_and_save_keypart(u8 **kpbuf, unsigned int *kplen,
    const u8 *buf, size_t sz)
    {
    diff --git a/include/crypto/akcipher.h b/include/crypto/akcipher.h
    index 6924b09..4365edd 100644
    --- a/include/crypto/akcipher.h
    +++ b/include/crypto/akcipher.h
    @@ -170,6 +170,12 @@ static inline struct crypto_akcipher *crypto_akcipher_reqtfm(
    return __crypto_akcipher_tfm(req->base.tfm);
    }

    +static inline struct akcipher_request *akcipher_request_cast(
    + struct crypto_async_request *req)
    +{
    + return container_of(req, struct akcipher_request, base);
    +}
    +
    /**
    * crypto_free_akcipher() - free AKCIPHER tfm handle
    *
    --
    2.1.0
    \
     
     \ /
      Last update: 2019-11-17 23:31    [W:3.471 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site