Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp699746pxv; Thu, 22 Jul 2021 10:01:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzLyvfoQT55hFluvlFjpe62cixy5vV7jx6VuJws+ywZvy8jlTWz5SRvDlOEq0OCjn3I6Wd7 X-Received: by 2002:a50:ef0e:: with SMTP id m14mr722096eds.306.1626973313129; Thu, 22 Jul 2021 10:01:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626973313; cv=none; d=google.com; s=arc-20160816; b=D5LAP9QuyapWVxDFp/aaPvL+EGWQlckhfot0ubtW/0wGv3B6/xiiA3MgjWTywxb72n wXUnO1pn19GEhw0+bM7yBAsH+0gKtzy+iBCWBmhzmyLBVFosQxZDJS66vSnGJSgNxp27 xP6EVsyNNMzFQD8VpSN5F4HcK/U09Gt3QRQ1jH7P+5f8TunqvOaqxItIu8xS1eBk1bm2 RzzqmGQASShzpIK7H5kKifaSgCuV2PJ8ycYfKOlxLNd8EWhSTXJ9WOFuv60aYQBb2p0H 7nQdUYzmB/vpmZk35qd5bQ2xBWgamzVopVBwCPMzQNF8tZ62tZfMjPipBoTZOlqmPFGY 3Jiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=BM24k6H9LcY/dUUeA4LE+RhfS6GQmXK+4XERxfAvlv0=; b=BKsgX5DR1MT4v9oN7+O5wLReZMjfUeMBAco5DUZqdAndwmUmVQsl+LWAsHkSDx/Jtj EsrxprD0p2SyKPDDUI0Gimi5FPg16llrk4KWYuIu8CrsXbhzI17JfcaWuL4gosHq1uTB pfwO5L/0Ddo9UnSOytdDJLA3i0UjBl4kKgxrk9nwZ/kfdn01urnQOLrnf0vs63IY4bnt jirSRsPyxpJllRyVbX63QznZmL1Zy8bsCdSz6yCDfWyAthYYkcVEhLZ8o82AvDR+qtqu 5qyCr8OrWfOm4UtB/K1freKeDfqYvwD07CTXCe8YNgoO3exT9+GucjSu+IvnTf061z+F xuGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qgqjaOiR; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n1si31794492edy.32.2021.07.22.10.01.16; Thu, 22 Jul 2021 10:01:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qgqjaOiR; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236391AbhGVQUg (ORCPT + 99 others); Thu, 22 Jul 2021 12:20:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233491AbhGVQTK (ORCPT ); Thu, 22 Jul 2021 12:19:10 -0400 Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DBFEEC061796; Thu, 22 Jul 2021 09:59:42 -0700 (PDT) Received: by mail-wm1-x32c.google.com with SMTP id k12-20020a05600c1c8cb02901f259f3a250so30356wms.2; Thu, 22 Jul 2021 09:59:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=BM24k6H9LcY/dUUeA4LE+RhfS6GQmXK+4XERxfAvlv0=; b=qgqjaOiR5GDdZTa15bTl9JTnbzB07s9U9I9cEwDWRuN5S2mke859hy+UUqa9AvmPFs QnFQcBfyQYO2hoq+QCnMeAzFQrJjuhZwNSk8lKxsoQut82+gNyGeae8CX2fdtJ6AsPUJ sIFDuSM228csEcVbnMRcDLNmkw37EjzdGSBxe/+i5FutmwIEz61FJPGoXcNnt7LdzFmq 7HMiDuUAhpP0zT8ZvB+6hGaL+M+s14GjFJ8edGsNTcFdoBf+Bjtotk6/Fz1gTx1H1MVo lOn17fh/knU+cY7LH09yds5UE/7MbJXAnTDAQROY/7yRFOTdLDSVwG26C7HozDiY6WdQ 5ySA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=BM24k6H9LcY/dUUeA4LE+RhfS6GQmXK+4XERxfAvlv0=; b=mvhuGWJ60aPNmMVb+Vx2YbfZpN/kpuEPadJQVEat+zTFdcs+MC5HbqnibKZTadFS8+ MfL4pMUoIaivvE26TF7Thn3SzgEhQuSwl9cL5WhK6kZKCHFni6aU0a2DJMgDxec1O2To pwpriEU+4GWhAh83i7sCoiRB2frobrrSU0m5Gv/+XKSXSuq/XLx8xXF7zm6no/d1zB/N gpmJqiVv32uosDzC2RQbGtqZ6pXdUtm7+CNYTOCknqL6jk/5Qe0UgE3TUx5DNiIcpKKe Y5dYfEylkwUskiekkkSkEbDSGv8q1ZgliY/eV9C2Wz0/P5KDc2CRmZW8QgQHFLIXvrCT HxvA== X-Gm-Message-State: AOAM532wXJlU4DfUb0HYG1kysebJ7QpYjgeTcoliOVaBiFbu4kAphem6 myO78AcT7fBo9mDDRwVjjf1qhKXYa58= X-Received: by 2002:a7b:ca50:: with SMTP id m16mr10037592wml.140.1626973181475; Thu, 22 Jul 2021 09:59:41 -0700 (PDT) Received: from pc ([196.235.233.206]) by smtp.gmail.com with ESMTPSA id n23sm24009425wms.4.2021.07.22.09.59.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Jul 2021 09:59:40 -0700 (PDT) Date: Thu, 22 Jul 2021 17:59:38 +0100 From: Salah Triki To: herbert@gondor.apana.org.au, davem@davemloft.net, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, ludovic.desroches@microchip.com, gregkh@linuxfoundation.org Cc: linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [RESEND] gpu: ipu-v3: use swap() Message-ID: <20210722165938.GA4116@pc> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Use swap() instead of implementing it in order to make code more clean. Signed-off-by: Salah Triki --- 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