diff mbox series

[2/17] net: macsec: Add scaffolding to change completion function signature

Message ID E1pOydb-007zgc-0p@formenos.hmeau.com (mailing list archive)
State Handled Elsewhere
Delegated to: Netdev Maintainers
Headers show
Series crypto: api - Change completion callback argument to void star | expand

Checks

Context Check Description
netdev/tree_selection success Guessing tree name failed - patch did not apply

Commit Message

Herbert Xu Feb. 6, 2023, 10:22 a.m. UTC
This patch adds temporary scaffolding so that the Crypto API
completion function can take a void * instead of crypto_async_request.
Once affected users have been converted this can be removed.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
---

 drivers/net/macsec.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Jarkko Sakkinen Feb. 10, 2023, 12:43 a.m. UTC | #1
On Mon, Feb 06, 2023 at 06:22:15PM +0800, Herbert Xu wrote:
> This patch adds temporary scaffolding so that the Crypto API

nit: "Add ..."

> completion function can take a void * instead of crypto_async_request.
> Once affected users have been converted this can be removed.
> 
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
> ---
> 
>  drivers/net/macsec.c |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/macsec.c b/drivers/net/macsec.c
> index bf8ac7a3ded7..b7d9d487ccd2 100644
> --- a/drivers/net/macsec.c
> +++ b/drivers/net/macsec.c
> @@ -528,9 +528,9 @@ static void count_tx(struct net_device *dev, int ret, int len)
>  	}
>  }
>  
> -static void macsec_encrypt_done(struct crypto_async_request *base, int err)
> +static void macsec_encrypt_done(crypto_completion_data_t *data, int err)
>  {
> -	struct sk_buff *skb = base->data;
> +	struct sk_buff *skb = crypto_get_completion_data(data);
>  	struct net_device *dev = skb->dev;
>  	struct macsec_dev *macsec = macsec_priv(dev);
>  	struct macsec_tx_sa *sa = macsec_skb_cb(skb)->tx_sa;
> @@ -835,9 +835,9 @@ static void count_rx(struct net_device *dev, int len)
>  	u64_stats_update_end(&stats->syncp);
>  }
>  
> -static void macsec_decrypt_done(struct crypto_async_request *base, int err)
> +static void macsec_decrypt_done(crypto_completion_data_t *data, int err)
>  {
> -	struct sk_buff *skb = base->data;
> +	struct sk_buff *skb = crypto_get_completion_data(data);
>  	struct net_device *dev = skb->dev;
>  	struct macsec_dev *macsec = macsec_priv(dev);
>  	struct macsec_rx_sa *rx_sa = macsec_skb_cb(skb)->rx_sa;

Acked-by: Jarkko Sakkinen <jarkko@kernel.org>

BR, Jarkko
diff mbox series

Patch

diff --git a/drivers/net/macsec.c b/drivers/net/macsec.c
index bf8ac7a3ded7..b7d9d487ccd2 100644
--- a/drivers/net/macsec.c
+++ b/drivers/net/macsec.c
@@ -528,9 +528,9 @@  static void count_tx(struct net_device *dev, int ret, int len)
 	}
 }
 
-static void macsec_encrypt_done(struct crypto_async_request *base, int err)
+static void macsec_encrypt_done(crypto_completion_data_t *data, int err)
 {
-	struct sk_buff *skb = base->data;
+	struct sk_buff *skb = crypto_get_completion_data(data);
 	struct net_device *dev = skb->dev;
 	struct macsec_dev *macsec = macsec_priv(dev);
 	struct macsec_tx_sa *sa = macsec_skb_cb(skb)->tx_sa;
@@ -835,9 +835,9 @@  static void count_rx(struct net_device *dev, int len)
 	u64_stats_update_end(&stats->syncp);
 }
 
-static void macsec_decrypt_done(struct crypto_async_request *base, int err)
+static void macsec_decrypt_done(crypto_completion_data_t *data, int err)
 {
-	struct sk_buff *skb = base->data;
+	struct sk_buff *skb = crypto_get_completion_data(data);
 	struct net_device *dev = skb->dev;
 	struct macsec_dev *macsec = macsec_priv(dev);
 	struct macsec_rx_sa *rx_sa = macsec_skb_cb(skb)->rx_sa;