Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3905016pxv; Tue, 13 Jul 2021 06:35:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw6ZNT6LQDNYSkjwExMjrbhCxnhGbvZm5Hj0iGHdWYOT/YIqGj4VNTfbyLBM1g5McSwJFcm X-Received: by 2002:a92:c805:: with SMTP id v5mr2706844iln.293.1626183336058; Tue, 13 Jul 2021 06:35:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626183336; cv=none; d=google.com; s=arc-20160816; b=mAenTlCYX4ZyMoLQLtm3/R7AI7IYB+ipQVgQYubvalSr9JgNREXw4QkA1qtrK3gNqy S8qsA65/WgkaS9c4AwrqG4NDSiLPKcMugtkF6aaPgozshXv9izaNixyM2MGlPjmSuNm8 eOjwDbdniyvdwu6vxEHYPCT4nuAan96bRhj3NgtIQJrq6retjtwAjVGqo8O1k9o22Kic 55ngOY2OvucOAvpDvtAimG8E8293eHIdHHpvyo8pLk1Q82g0LfVMKE3Ze5CdBcQ7dL2q +0L/pZqGaimlXfelabuasEECN252UPmIxP53UxxZeXuRA/xL6q0lTCUyWMHAPmQDo6L1 5vmw== 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=AtdBxpTbfHI9zbIVsZ9n9GdLQqULdtTSE9Dda28OKGs=; b=EkDfSfhfSmVxV3/Pf+y9tbwg6ORE171ltZ4nwh2hTEUEDO8JJmJpgb+rB5QRK9oP2k nHYdmpu+n2jfIGXgDhAtlVWvI4wxDmacJcH1UAMjOeHgyya2cAFLxq8nyv00IPadPPJz qJDE95gJrsul2tZ8fJPc0xUobOyEMg46whySPmNXxNoldZ9xb4n4JIQUWcfI2cEoU0tr rFIcjf7u8YsRljNJoLfdtSP7MkbbUqXjoMu2Bw00bOyefdtBxW+2ROeM078p4BJ8m8Ws zfV/xq7h0caTJOZLz7lRUI/+sKvV/yqEI4cdf3+huq0nlQmAOuxrAniCSF0eI+uvatgu Gvyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=arzhzSex; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 l2si18384783jak.30.2021.07.13.06.35.22; Tue, 13 Jul 2021 06:35:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=arzhzSex; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 S236222AbhGMNfr (ORCPT + 99 others); Tue, 13 Jul 2021 09:35:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236620AbhGMNfr (ORCPT ); Tue, 13 Jul 2021 09:35:47 -0400 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A83DEC0613EF for ; Tue, 13 Jul 2021 06:32:56 -0700 (PDT) Received: by mail-ej1-x631.google.com with SMTP id o5so41527919ejy.7 for ; Tue, 13 Jul 2021 06:32:56 -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=AtdBxpTbfHI9zbIVsZ9n9GdLQqULdtTSE9Dda28OKGs=; b=arzhzSexletdezrIX00iuWr6PXJClFcKap26bWzVnlSQOe40YBLQ+Ssz06kLN81keY SzBy6GrM9I484ZCUT/RaDs/JKgEjCjqVddj2WSlUR6bAgNPMQIxA/ijqm05+wAyCskr2 oDnNb2WqeTPBMEUJGHMkAukjp8LnJB2v+FK6FkLoVPY1NbvJ3UmNzJiW9w0Sn4DZ4BwW s40mMKANdb1ifp+jqTKko1fHxb3/O84blBxJRC06alA7IBVyHr1NQ03PFUCtegIBpE7T ntKeAxPAHTWiUOnm532AIFrbSQYkCla5mwQlLqAps0Cb13KmQ7LhibDVYMDkQvPDpFcD K/mA== 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=AtdBxpTbfHI9zbIVsZ9n9GdLQqULdtTSE9Dda28OKGs=; b=r8lovhgtGOmq5cvF+qpcap86P9Dnz6OHZcd28rXP3Q0WJETf/bnqrVOU0d32hFOmoa RIqwyPmYja324R4C3QDuB/6LHVgkd14e2dLy9qebzSSeUj/UJGjLI9Gh9N5mEv4T9LTX 8g9sZWkJd9/wKICpOfBOZfWXDd61CC8e/6w6PMzfHuR9en9T77XPZSlgmLg+Q+e0Nko1 BNPooL2pomiRufXkQTPJnc5rUdNYvkbc3QDplJpHbe94v3GYt6oyRXI456wdw9fPUMjB RIplz0z3ecvW+G9IFNEsclgvu/5+zWW53aCsQTl2FmFPR1EFgeBhejIVjH7BdrQ3brrL FueA== X-Gm-Message-State: AOAM532e7XQKdR86zSfD3ohsqbNmMdHBGiHerKzd2VKlYkReCFyif0K5 AiGHYsp5ZsznG4TuArmgwi8= X-Received: by 2002:a17:907:7608:: with SMTP id jx8mr5613677ejc.233.1626183175273; Tue, 13 Jul 2021 06:32:55 -0700 (PDT) Received: from pc ([196.235.212.194]) by smtp.gmail.com with ESMTPSA id gg26sm7500555ejb.103.2021.07.13.06.32.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Jul 2021 06:32:54 -0700 (PDT) Date: Tue, 13 Jul 2021 14:32:52 +0100 From: Salah Triki To: p.zabel@pengutronix.de, alexdeucher@gmail.com Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] gpu: ipu-v3: use swap() Message-ID: <20210713133230.GA1872993@pc> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use swap() instead of implementing it since it makes code more clean. Signed-off-by: Salah Triki --- drivers/gpu/ipu-v3/ipu-image-convert.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/ipu-v3/ipu-image-convert.c b/drivers/gpu/ipu-v3/ipu-image-convert.c index aa1d4b6d278f..5f730cd6009d 100644 --- a/drivers/gpu/ipu-v3/ipu-image-convert.c +++ b/drivers/gpu/ipu-v3/ipu-image-convert.c @@ -1021,11 +1021,8 @@ static int calc_tile_offsets_planar(struct ipu_image_convert_ctx *ctx, u_off = y_size - y_off + uv_off; v_off = (fmt->uv_packed) ? 0 : u_off + uv_size; - if (fmt->uv_swapped) { - tmp = u_off; - u_off = v_off; - v_off = tmp; - } + if (fmt->uv_swapped) + swap(u_off, v_off); image->tile[tile].offset = y_off; image->tile[tile].u_off = u_off; -- 2.25.1