Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp520934lqt; Fri, 19 Apr 2024 02:53:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUKQwvhAyhFT/uktwnIpxDJ9/fgscVfVc1ya5eP0nPiuieuaTnp7E+ccYJv2unV8e6x92SLieht5PQHNrjqqsawC04kEyEElg3ZWg9ymw== X-Google-Smtp-Source: AGHT+IGfVLTjhbXfO1taAzQ0qeCSoUBraU+UADuBAbUBcSdbjA5OQp6vzmew8OYiwD6P1uXl0bP4 X-Received: by 2002:a05:6a00:a92:b0:6eb:3d37:ce7a with SMTP id b18-20020a056a000a9200b006eb3d37ce7amr1762636pfl.21.1713520386432; Fri, 19 Apr 2024 02:53:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713520386; cv=pass; d=google.com; s=arc-20160816; b=sGrIhSWkdnqC6KTQ4iku20tS85H+SyJTxpw0nKuoxVz0MdcN1WZr2Kh+wh0OXAPyA8 VVXsVMPbS9srtn+gDydU4vjBR5hBOrE9/jlAvOR4oYVZ4mqJpTD865zvI2GDTiZpRhO2 uh8Sgdaj7go7iQg3InCRTsQqb5FCNRDLYerdF+UMoRCubiq+TRn+oS2Xmu4/WLoSx9zo AlKS9LIyvQWqySjiVC2HWxDA/56zaOhsdCbN2vXIJAeFY3m8DC940hzenf+/P3B7Vc4J PtHgqe0Sc764LfMEEy3ONz6m/x3VXNEVVR4ISsUrhxyFjbHnynCLcUIAhT8/2ELlLoxH 2bGw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=I5MK517M661jXeUTMXVPJlov9z4l8/dISyr2IlNuzMY=; fh=s5D15SFeBLvABIpE7QNapiQJTsJze9JIDhtdWnwX//M=; b=fbhQgx2UnQxAnnv3xHeOMVdl7bCnNzuPu8bx4Sla5Lvj0frW4mRYCZj9trszeN85iN otZM0OS4N8ADpm841SUZhPIjnRKUX8xv/l0X6W5q+iwzTD0+t4ZaDbJSR3SuTOzUU3Gs rbuNH4iEmukAM+KvaK7l7xBxQVIhzNE0TYbfNRE0W4NuTGLIcHY7zRFJ41eHlQE4e9qX 7s/8SnHSbhRZdnbOCN9V5KKVqmJTqSi6c7kfqw1ikYRCrwGKPDLnUYav4IzlOhGbpsN9 V4+KH7SRGnRD+JJ8K0Z6EvDaODZa8Nijncvx7cq65qKqVbd9pUYd5PKlsbm89qx8RJj4 prVw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=RDXZTLyW; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-151256-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151256-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id w1-20020a056a0014c100b006ed6b1140a3si3070914pfu.397.2024.04.19.02.53.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Apr 2024 02:53:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-151256-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=RDXZTLyW; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-151256-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151256-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 2B48CB22211 for ; Fri, 19 Apr 2024 09:52:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 279B685C41; Fri, 19 Apr 2024 09:49:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="RDXZTLyW" Received: from mail-qk1-f178.google.com (mail-qk1-f178.google.com [209.85.222.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E0E647B3FA for ; Fri, 19 Apr 2024 09:49:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713520173; cv=none; b=WjxHfprO40iHjg9QEJr0eT4GCrvVh3L0P7VCJKxlluufGzvrhECoMtGYWc5EXzCeJPHball9Mvj6+gEMcYNkp0DwCAOs8pelJifbDqNNALSRrKlRAeyhx6Poievbt8gkvGKt8EotYcFTfucDbEM4ai9eTA82piK49aMbos9Gq54= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713520173; c=relaxed/simple; bh=+AXbzIt1DCOyX+j9nTM1S5LGWAW6l5Ne8tHYdxY2P08=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=rBA7nXJCu2mChZJZFIJt2DEo46G3ukeGZevkWOOeUzKFElXoZyQ1SWIlh7GOtXNI5p96CivvwxXKUPDtq8ep2HwJctdsNhENWXMsf9ndtiQHngrY+xmTzLR8IMOy3bfAchNlI/07RrND0ZmRFRdhODI/eymsyckLudYSkQPcurM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=RDXZTLyW; arc=none smtp.client-ip=209.85.222.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-qk1-f178.google.com with SMTP id af79cd13be357-78f03917484so111326185a.3 for ; Fri, 19 Apr 2024 02:49:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1713520171; x=1714124971; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=I5MK517M661jXeUTMXVPJlov9z4l8/dISyr2IlNuzMY=; b=RDXZTLyWM1k8dfz8A7WFBrq7+rQc1zX11Zn60dcP33fCc05oAyeDWx+WhVTNfuyiYq SZf4mw1lAQXWdrsEEtmTze09iT73ZK8HUFB+yyMCM98PKAzQZ9yUBEwnWEYyj7UYt9T8 xA2Rx2ovIzqhYA7DyPbfNIZlLqwxAtlu+p69s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713520171; x=1714124971; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=I5MK517M661jXeUTMXVPJlov9z4l8/dISyr2IlNuzMY=; b=rogJXYF8Pyuz3UgA1UEPcjVN1Bd0SdAJOZC9b0sZeUUB13tRx2r3bzOTKju9SlBQjF Au5jmqWutAPS+NKp2OR4lhhcmNXAl6++/Kq8BSUi7Lj423ZD31yFtzAUCUkNWkUqXK1o 56BFanib/M265XI4wLautqNjxsphkM6BCQRtTkiuDk5jrhqC+3uIH5OUOI4YZ+/kPYFc mf2hG7QYTEAIWRN2zqsECw3GgLyrkBe7u997fTm1V8ez6KkIVZK0Zw3zMFFN6BMpf5T5 36jZ9ZGxG3EFfFmCB8xlTzeLEtNCThPJthqzENU5W+DOyNNszIH4he+FZ75pSS95CEhB 3oog== X-Forwarded-Encrypted: i=1; AJvYcCUHIouwX9bwMkmkX2dmtZdxbTVDXxD1j8NzlAKn06Ww1C1ewl7IGfDcVcw+c1xRm1G0FEz+XUBP0klRM96D0kkj4JqPGVUs/qmUvogI X-Gm-Message-State: AOJu0Yxn9z7BSi8US3PYAy1ZPpTVxLL+82RzVoCBG/S1w4hgQDvalQ4P qiUPde1qjPPBJ6AtEGvIowsGqD8u4d/6MgdVygMmu9+Xng6WfaidlxnZ26A5MQ== X-Received: by 2002:a05:620a:1da6:b0:78d:5065:c5df with SMTP id pj38-20020a05620a1da600b0078d5065c5dfmr1596268qkn.18.1713520171055; Fri, 19 Apr 2024 02:49:31 -0700 (PDT) Received: from denia.c.googlers.com (114.152.245.35.bc.googleusercontent.com. [35.245.152.114]) by smtp.gmail.com with ESMTPSA id dt14-20020a05620a478e00b0078d735ca917sm1434532qkb.123.2024.04.19.02.49.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Apr 2024 02:49:30 -0700 (PDT) From: Ricardo Ribalda Date: Fri, 19 Apr 2024 09:47:56 +0000 Subject: [PATCH v2 10/26] staging: media: tegra-video: Use swap macro Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240419-fix-cocci-v2-10-2119e692309c@chromium.org> References: <20240419-fix-cocci-v2-0-2119e692309c@chromium.org> In-Reply-To: <20240419-fix-cocci-v2-0-2119e692309c@chromium.org> To: Martin Tuma , Mauro Carvalho Chehab , Laurent Pinchart , Hugues Fruchet , Alain Volmat , Maxime Coquelin , Alexandre Torgue , Paul Kocialkowski , Greg Kroah-Hartman , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Sakari Ailus , Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Luca Ceresoli , Matthias Brugger , AngeloGioacchino Del Regno , Hans Verkuil , Sergey Kozlov , Abylay Ospan , Ezequiel Garcia , Dmitry Osipenko , Benjamin Mugnier , Sylvain Petinot , Stanimir Varbanov , Vikash Garodia , Bryan O'Donoghue , Bjorn Andersson , Konrad Dybcio Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-staging@lists.linux.dev, linux-sunxi@lists.linux.dev, linux-tegra@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-msm@vger.kernel.org, Ricardo Ribalda X-Mailer: b4 0.12.4 Makes the code simpler and cocci happier: drivers/staging/media/tegra-video/tegra20.c:324:44-45: WARNING opportunity for swap() Reviewed-by: Luca Ceresoli Signed-off-by: Ricardo Ribalda --- drivers/staging/media/tegra-video/tegra20.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/staging/media/tegra-video/tegra20.c b/drivers/staging/media/tegra-video/tegra20.c index 630e2ff987a3..7b8f8f810b35 100644 --- a/drivers/staging/media/tegra-video/tegra20.c +++ b/drivers/staging/media/tegra-video/tegra20.c @@ -317,13 +317,8 @@ static void tegra20_channel_queue_setup(struct tegra_vi_channel *chan) chan->addr_offset_v = chan->addr_offset_u + stride * height / 4; /* For YVU420, we swap the locations of the U and V planes. */ - if (chan->format.pixelformat == V4L2_PIX_FMT_YVU420) { - unsigned long temp; - - temp = chan->addr_offset_u; - chan->addr_offset_u = chan->addr_offset_v; - chan->addr_offset_v = temp; - } + if (chan->format.pixelformat == V4L2_PIX_FMT_YVU420) + swap(chan->addr_offset_u, chan->addr_offset_v); chan->start_offset_u = chan->addr_offset_u; chan->start_offset_v = chan->addr_offset_v; -- 2.44.0.769.g3c40516874-goog