linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicolas Ferre <nicolas.ferre@microchip.com>
To: Salah Triki <salah.triki@gmail.com>,
	<herbert@gondor.apana.org.au>, <davem@davemloft.net>,
	<alexandre.belloni@bootlin.com>,
	<ludovic.desroches@microchip.com>, <gregkh@linuxfoundation.org>,
	"Tudor Ambarus" <Tudor.Ambarus@microchip.com>
Cc: <linux-crypto@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [RESEND] gpu: ipu-v3: use swap()
Date: Fri, 23 Jul 2021 11:58:26 +0200	[thread overview]
Message-ID: <782cba94-2627-4c22-d445-31686866b722@microchip.com> (raw)
In-Reply-To: <20210722165938.GA4116@pc>

Wrong $subject then...

On 22/07/2021 at 18:59, Salah Triki wrote:
> Use swap() instead of implementing it in order to make code more clean.
> 
> Signed-off-by: Salah Triki <salah.triki@gmail.com>
> ---
>   drivers/crypto/atmel-aes.c | 8 ++------
>   1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/crypto/atmel-aes.c b/drivers/crypto/atmel-aes.c
> index b1d286004295..60041022c4f5 100644
> --- a/drivers/crypto/atmel-aes.c
> +++ b/drivers/crypto/atmel-aes.c
> @@ -1819,12 +1819,8 @@ static int atmel_aes_xts_process_data(struct atmel_aes_dev *dd)
>           * the order of the ciphered tweak bytes need to be reversed before
>           * writing them into the ODATARx registers.
>           */
> -       for (i = 0; i < AES_BLOCK_SIZE/2; ++i) {
> -               u8 tmp = tweak_bytes[AES_BLOCK_SIZE - 1 - i];
> -
> -               tweak_bytes[AES_BLOCK_SIZE - 1 - i] = tweak_bytes[i];
> -               tweak_bytes[i] = tmp;
> -       }
> +       for (i = 0; i < AES_BLOCK_SIZE/2; ++i)
> +               swap(tweak_bytes[i], tweak_bytes[AES_BLOCK_SIZE - 1 - i]);
> 
>          /* Process the data. */
>          atmel_aes_write_ctrl(dd, use_dma, NULL);
> --
> 2.25.1
> 


-- 
Nicolas Ferre

  reply	other threads:[~2021-07-23  9:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-22 16:59 [RESEND] gpu: ipu-v3: use swap() Salah Triki
2021-07-23  9:58 ` Nicolas Ferre [this message]
2021-07-22 17:21 Salah Triki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=782cba94-2627-4c22-d445-31686866b722@microchip.com \
    --to=nicolas.ferre@microchip.com \
    --cc=Tudor.Ambarus@microchip.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=davem@davemloft.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ludovic.desroches@microchip.com \
    --cc=salah.triki@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).