Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3912115pxv; Tue, 13 Jul 2021 06:45:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzriRM8tiHErXFxPut+MV5XmGC2L3g807xAuLT/+NHfgTA1Ok+xzty0uEJSI4u2naNqlP45 X-Received: by 2002:a92:c24c:: with SMTP id k12mr3077207ilo.28.1626183951979; Tue, 13 Jul 2021 06:45:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626183951; cv=none; d=google.com; s=arc-20160816; b=khr2fttV++8voFIwDb8Z0fn4tDGE/eWBetf3lNjo84aCTe50Q3lAbMAzeqXRvwNVxQ zDmOa1D1k5Ta4ItoP1dmByDYYrptoRyEQrfNHfIvTdp9Lkt9CxweUXnymOOa3D7J1R0z tkmDQwDKgFq0t6zsWCt12XiNhiMrjK5x2muIlwyuHxMtsN7B7R2Qx1tt5LkP+cM0r+/A 2+PTyutiNAkANaowRuhuZZUZiyi2VlXDOImJn+hXuzOHf9vW4Frc4b2JS731YPPLMg0C 8Uf/oONhVABkgdf/lN2K4S1hBlvxyivBwhZYK4joT+7S7IymaGXDznphLpXizwEMgP98 rqIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=A9GCE1XyokBjHqSgBA/iJEz3drr7IdUuNv0RdsnzLeE=; b=Fj5uNFw/zlylsQDA51OYFpKJQApQg5/AnkcabJMS7YYBQDGxxXwxgqrPzqqIChMJ/P 1ctuRxKe8g3XPyRTYDKHr8o08qBn8KrT/4rHZf54NOnLNn9Mv4gQFaI2OGsvvjwh5Yp6 5/MjFAd7JY3F8NvNgQIUwO6A2ZQg8PAfmSaYysEoGRsVsDCysYBFayl2TBY1Ws6CtiEV reF0FBAWhZqsGasaKT36JsJEwfzjnUXvltZZCoXbGNkM8VdLvByLS0/Zc2z1hs4eKtsG Iy3UebWXwI0aRJRFhODAA3dxaMw9y3/FYLhSoGI/DIt+j//wIozKK8KC8/rvwfCINIBi y3Xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=EqpBeNln; 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 f10si10528188ila.58.2021.07.13.06.45.37; Tue, 13 Jul 2021 06:45:51 -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=EqpBeNln; 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 S236596AbhGMNrq (ORCPT + 99 others); Tue, 13 Jul 2021 09:47:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236222AbhGMNrp (ORCPT ); Tue, 13 Jul 2021 09:47:45 -0400 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB718C0613DD for ; Tue, 13 Jul 2021 06:44:54 -0700 (PDT) Received: by mail-lf1-x12d.google.com with SMTP id y42so50394519lfa.3 for ; Tue, 13 Jul 2021 06:44:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=A9GCE1XyokBjHqSgBA/iJEz3drr7IdUuNv0RdsnzLeE=; b=EqpBeNlnm4ViPyJwMUgvpLbBGimxy8xUkaxEZarGaWkEXICuUxFFVTvA+wNN/nvEn6 pgVxHY/63YMpCOFYGKlNZGhhOhRcTKpfiPpmLretPtpO6zu2QV1/4l2yP4QL0ruMFIDX 6sFSCpc9GeIPsOLFoAb8fuv15fponjyWlCeKQQAsvZ9bJXtvqhhlls4bT3KoRUV4OJX0 L9CujbEumsmiCetHoMatkDpyaxIt5iOPMCSsJ4LMdsaztrwyJAvPL3AC6oMMA+3ktx9I LnugzSh7/SCUe49vfiS+QYKv1GB7FZBy3flf7gn4TtC3NQ271reHq5tX+VBZpE5pUW7r uOzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=A9GCE1XyokBjHqSgBA/iJEz3drr7IdUuNv0RdsnzLeE=; b=oN7z7v/W1Us+DZW/GbykNDkFIUSj4ArnlhPZMzs2kzkoKWqj6Mi/wyaD9R4PYWz6QQ RkNZsuIEPI9xtxVjdmmNNcwMAFSKKhWNd9COcg2kqEFzO43K8C2CWp3hiDMon892DLYh EbE4dyzJsPSIasDcApCpToXg6umqBqlD9jwHlwbfmqM1jyABwMEDCX6YYda5ZbtO/ikY Dw00frDS+bI5bIFiDSube+i5EFTpdUksBGSkdSvOYP69H9Nf2x19LiMe8LTz3GtYqluc SochU7m5NxCWq6PAEZJm9wiSIyxI44/Y3MEcG2HbVdYNrZDHXUIfTvR7fwZfaoect+DQ B1gw== X-Gm-Message-State: AOAM531MUQSbY/BqHrlA5nlOM2qBttzxjfHYv9C2d2AeHkt5fM6HZI8M tYGceFzOUax2gnBfkJ/Nrg2N8BdSKzOSHosmRFM= X-Received: by 2002:ac2:5297:: with SMTP id q23mr3528281lfm.223.1626183893269; Tue, 13 Jul 2021 06:44:53 -0700 (PDT) MIME-Version: 1.0 References: <20210713133230.GA1872993@pc> In-Reply-To: <20210713133230.GA1872993@pc> From: Fabio Estevam Date: Tue, 13 Jul 2021 10:44:41 -0300 Message-ID: Subject: Re: [PATCH] gpu: ipu-v3: use swap() To: Salah Triki Cc: Philipp Zabel , alexdeucher@gmail.com, linux-kernel , DRI mailing list Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Salah, On Tue, Jul 13, 2021 at 10:33 AM Salah Triki wrote: > > Use swap() instead of implementing it since it makes code more clean. s/more clean/cleaner > 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; The 'tmp' variable seems to be unused now, so its declaration should be removed. Thanks