Received: by 2002:ab2:7104:0:b0:1f7:f6c3:9cb1 with SMTP id z4csp51448lql; Tue, 7 May 2024 09:28:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV+fTNNETL7zPKUnbNG01iR/mBYClO31BUwPjhryAX9j5CYQL7NIW1uUP3zVP4h5noP6rJXp+PAFHQffo7qjWQqLpGG4pmuUDXRInzYmg== X-Google-Smtp-Source: AGHT+IGn9O1rCI72D4coIny3D6L4cqKwzV9KV/UzQvUVsc/yht53b1MN95fuv05gsA8lUb2hv/VZ X-Received: by 2002:a50:ab49:0:b0:570:1ea8:c50a with SMTP id 4fb4d7f45d1cf-5731d9cd410mr203590a12.6.1715099280604; Tue, 07 May 2024 09:28:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715099280; cv=pass; d=google.com; s=arc-20160816; b=xHYwsKAZpN/dG/+tJBoqigyStvTnZVW5ZpRedyct+STgD2tNVU+yDdQbH8rSrTRvtZ vVDUb8DB1aY+i1SxukV0ESghHzcDOezEfCkta49/i4DqHbv/OFq4Z6MFypQGG3jf7Q5B +spM4Yc2ebuhzprkI9jgGYAkVuc5C76Yy9BsBIigzDFBbeD6izWsFxGleAdqGK9y4Q9Y sTh4MjJsbg1dXllUBtmlbYZdsWw4nno7wCQBDMKm3WznB8mERH4FnfEz8J9p/NQe+AbS 4YrpzNVPNk4b+PRXitYFh4pOOqIRql6cCMqyinuEMeWpq8/ff1XRFDmBtsO2CeEaM/7u 5GDw== 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=dp/a3NMmYGz+hm8qsmJibF9yTx35ajv4b4FGHxOOJ3Q=; fh=Zw4ecGKE/LisU8kwipFIq+7hcxuN3jMwMYd/laZKtdk=; b=TxSeDNUSq/M21UcOZw0w8ni1XW8EsfNSYCZ1FH4u3Ww+fSC7PiFJ2zgQp60X+bHgFh DLtQDZsEv6M9UK/FreSXsDmTH+gHXG1eJpIE3hgSKGYxgHrfPVOHBs7Tvp5ZkNosHD/u 9JUoLoNAzvTJStI27WuuwVPkfGJafNZVbBcHbfhinBPvdSsycQvFBH2MzEuPPcgoPIxq 1QY44N9sTOfcsUqeUVEiEJj2hUoGKm9ip/Nc/J9XnsEzdVCcoJH+w6wM/Pg0Z0SY+qv4 YEECyZVFOF1sN+bdPoNP/N92SA8r9h89PdPqHroI8EiTC0Wp4soXJgRVjRtbuKZ3lxRU FpOA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=EWrsmasr; 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-171800-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171800-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id b18-20020a05640202d200b00572a931e88bsi5956631edx.687.2024.05.07.09.28.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 09:28:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-171800-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=EWrsmasr; 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-171800-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171800-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 570831F219F2 for ; Tue, 7 May 2024 16:28:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1864416D31E; Tue, 7 May 2024 16:27:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="EWrsmasr" Received: from mail-qt1-f175.google.com (mail-qt1-f175.google.com [209.85.160.175]) (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 78AAB15FD0E for ; Tue, 7 May 2024 16:27:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715099234; cv=none; b=qgsLPNpiD86JC2kBQWKeLZBT/R2dZEmNrAxWuiNMNwsoE5o5BaUS4OFIQXQxNfFudfOeH6eO7gDpwpOZKeGak+z1Twf41A1La7su66iQBktD2wXkn5GjLzJQsPW/iCvQlBQ1qkM71Oq9MpJ3z/z7g+w1tlb6eQnp5GhVLILhElE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715099234; c=relaxed/simple; bh=gcgfOXZpVAPIhRvVAmX6aT02WeOzRZpm8OajsHdcMqo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=n8b86wzwoTfnZh5OtBO9FeI52Idc8GqULTbTMC6LsgXDmcEND2LBa2Uy9DOZ4ygBIB/fmnVNAb9NInJ8Y/4xtBviHz0WX+hExoOgi4kPpr3KkANSbzGoP1Sgt5SyXj2YD45A2sVJ7cuSNCONpJoWwwZcX6sFil229LFlT8mA9Y8= 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=EWrsmasr; arc=none smtp.client-ip=209.85.160.175 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-qt1-f175.google.com with SMTP id d75a77b69052e-4365c1451d4so22802501cf.2 for ; Tue, 07 May 2024 09:27:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1715099231; x=1715704031; 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=dp/a3NMmYGz+hm8qsmJibF9yTx35ajv4b4FGHxOOJ3Q=; b=EWrsmasruJmAsuCQ4HnwOxZv3Sb1Qb+ZKM+FUTvAwpxy1MTn509ain+ehT3gI1Qbgq t3Yuh7VCJCzeS5hTdMDxxwB4Aik0qSw0dDgFveURZxjDhdZtEdYcAeSmyCAkoKgY8hS3 r9QPmJjf6xDUxx+sgkc/JVsYlbRStJjA9npP8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715099231; x=1715704031; 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=dp/a3NMmYGz+hm8qsmJibF9yTx35ajv4b4FGHxOOJ3Q=; b=gzjYyUrlZU9VG22D/PBJ6m8HOBArq2ZzaaBYeJxRkB+GEibECFNFJcyEeshIz+vb8M zt4X1kyNuUmmI5cEweDqCwPo9+r6l1XWRUaPgSqiJ4QRq3Mo6NxwYAbF9N32QuLeJAbp IiYWRITOvYUcoq6zVawWIVwsXxM/m+MoYurgbRisjFUMvWftBOf/liqaPafFxXJLtFrg vlMUj833zZWwS77LNW6ehy7It/SU/TaWHWlxDGOMMOnj33/92hc8iyH2wndifg6epjuK PnkZ0+/JgNapKgzYS6dMIBbo7bOBBXNN2hMOeG88qfa0o4yOEVfvV5noDxsl4aZLaQhu +oIA== X-Forwarded-Encrypted: i=1; AJvYcCWwwMBtIbtYME+YmBl4T6tr0/TDJQYXGoHzU99+P7eLxbD9d0xWbLKImWNVEFbbq6ZnzVnZdFBL3r+bx4mDy5TCI+edCD2E2gG1LrGp X-Gm-Message-State: AOJu0YxfS8XSTEEjsrL+zUN3bZfwmcEQYDdC8KXmPVZQJ62kI9iDbMY6 9WG7C73fFeiW8zbn6cwBVooPPJFpQaOq6PKZ6R1qxCpxSPnCaMvsHhLgxFHQdA== X-Received: by 2002:ac8:5753:0:b0:43a:f64f:c2a with SMTP id d75a77b69052e-43dbf853b66mr1566601cf.46.1715099231571; Tue, 07 May 2024 09:27:11 -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 hf23-20020a05622a609700b0043d1fc9b7d9sm4160597qtb.48.2024.05.07.09.27.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 09:27:10 -0700 (PDT) From: Ricardo Ribalda Date: Tue, 07 May 2024 16:27:07 +0000 Subject: [PATCH v2 02/18] media: xilinx: Refactor struct xvip_dma 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: <20240507-cocci-flexarray-v2-2-7aea262cf065@chromium.org> References: <20240507-cocci-flexarray-v2-0-7aea262cf065@chromium.org> In-Reply-To: <20240507-cocci-flexarray-v2-0-7aea262cf065@chromium.org> To: Michael Tretter , Pengutronix Kernel Team , Mauro Carvalho Chehab , Laurent Pinchart , Michal Simek , Andy Walls , Stanimir Varbanov , Vikash Garodia , Bryan O'Donoghue , Bjorn Andersson , Konrad Dybcio Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, Hans Verkuil , Ricardo Ribalda X-Mailer: b4 0.12.4 Replace a single element array with a single field. The following cocci warning is fixed: drivers/media/platform/xilinx/xilinx-dma.h:100:19-22: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) Signed-off-by: Ricardo Ribalda --- drivers/media/platform/xilinx/xilinx-dma.c | 4 ++-- drivers/media/platform/xilinx/xilinx-dma.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/xilinx/xilinx-dma.c b/drivers/media/platform/xilinx/xilinx-dma.c index a96de5d388a1..a1687b868a44 100644 --- a/drivers/media/platform/xilinx/xilinx-dma.c +++ b/drivers/media/platform/xilinx/xilinx-dma.c @@ -348,8 +348,8 @@ static void xvip_dma_buffer_queue(struct vb2_buffer *vb) } dma->xt.frame_size = 1; - dma->sgl[0].size = dma->format.width * dma->fmtinfo->bpp; - dma->sgl[0].icg = dma->format.bytesperline - dma->sgl[0].size; + dma->sgl.size = dma->format.width * dma->fmtinfo->bpp; + dma->sgl.icg = dma->format.bytesperline - dma->sgl.size; dma->xt.numf = dma->format.height; desc = dmaengine_prep_interleaved_dma(dma->dma, &dma->xt, flags); diff --git a/drivers/media/platform/xilinx/xilinx-dma.h b/drivers/media/platform/xilinx/xilinx-dma.h index 9c6d4c18d1a9..18f77e1a7b39 100644 --- a/drivers/media/platform/xilinx/xilinx-dma.h +++ b/drivers/media/platform/xilinx/xilinx-dma.h @@ -97,7 +97,7 @@ struct xvip_dma { struct dma_chan *dma; unsigned int align; struct dma_interleaved_template xt; - struct data_chunk sgl[1]; + struct data_chunk sgl; }; #define to_xvip_dma(vdev) container_of(vdev, struct xvip_dma, video) -- 2.45.0.rc1.225.g2a3ae87e7f-goog