Received: by 2002:a89:288:0:b0:1f7:eeee:6653 with SMTP id j8csp514785lqh; Tue, 7 May 2024 06:23:50 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWTK7gkf74jWiNHSRE+gCTr3WfGvsBejFA1sC9EUzkovf/9O9ezQN5uW5oQ4OnskHzgCKUktGuY2lZZqHUyDKoQXI7+VGs3F/ShMZj8Mg== X-Google-Smtp-Source: AGHT+IHB0aDqLX+i0iWtWmekNXmDKFcj7hJPOrc2jgH326BWnDiwNmBCuhaTYHWKcjPG6Qaa95IG X-Received: by 2002:ae9:e110:0:b0:792:8d34:a9ba with SMTP id g16-20020ae9e110000000b007928d34a9bamr3631686qkm.24.1715088228893; Tue, 07 May 2024 06:23:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715088228; cv=pass; d=google.com; s=arc-20160816; b=SZDeOxm/IMCDaddHt1CCR0rmLC8V5DXX/LY7USEH3IquuZ9l1p42Y0q/RO3gGOdC3I zBEIhkOlPf5Y1o2jJBO0423WjSY9t5GRnNACXHf9w0JZiiHz2JGhkeWNIr0APTOUBOL8 g+n90qzVsguKuBsehyTgb4cA1RkB27xxXEzE6rgF3sW6QJ4qcm7/ItNTT9tboMUJKtJP 1Qn1g6byk8mfyAhQ6jDHfziybL97Iz0vYf56oooD9mtRuXI5mJTPIDyaPKZd8fo3S82L eVxAnbmBrHziJGHZaEe3jpd8IHPbM45LuZuiHW24XDxHJRWYjhG+v2v6C/SZVnMu8UOw rpCg== 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=g9qL3Inp/f9fsBh/kCRZTG2EDDdIDEJYKTG7/tj9afg=; b=FEklKPoN4BYtr6aj7a5KxBsVxMolgRZaKTvGba+gLIJtrkOmeggBjvg3LUGV1BmyeQ 70qng4FAuiFi3chsRR433MoOLzz9c4OGRTw0C6yIcmDopywcOdkFh1qGcXwOfaeqjoYA OaNNdhbdfdm5+PrPlyLGyV2otYlA8EwsKW6ox8ts7LQTb1Y0+ScS1tqoiuokrmVSmfEU NpHk3JXhbNbQ+KgNM79vY+k+CV3rXZX48gKTOb5GPb/R6ePECj5okGCf9UiUBLLNM/Cy NG3NWjiPBUQnFRlKa8uldrzA0iY9RLAcKposldq3fOToOgDChXwzzvW4qfCQXOCOUNVn X9NQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="MWJbM/cX"; 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-171391-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171391-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id j6-20020a05620a000600b0079297d0f45bsi4633991qki.247.2024.05.07.06.23.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 06:23:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-171391-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="MWJbM/cX"; 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-171391-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171391-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 968071C219E0 for ; Tue, 7 May 2024 13:23:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BB72D16C6B6; Tue, 7 May 2024 13:18:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="MWJbM/cX" Received: from mail-qt1-f171.google.com (mail-qt1-f171.google.com [209.85.160.171]) (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 D3125168B06 for ; Tue, 7 May 2024 13:18:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715087914; cv=none; b=qKBcU1oEbevYY09ydBYX3XUOYGKrt1mif7hvmBwxF1vJpy7geZn9L/rP0NQhfzOugr1KaUFuPSnTVtq4hMWrcVpWueERYxCnRds3YdK2UXtD0d0/1vwKpLQYJpqsMa4epgxMsP0rzk5nlbb6w/2CaT5MHptqIJhs5WlFY+LjxE8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715087914; c=relaxed/simple; bh=gcgfOXZpVAPIhRvVAmX6aT02WeOzRZpm8OajsHdcMqo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=CkmZHrOH5qC6izoobd2NYV0zH6Wyx4AvqYZ5dxSjuU7qyfUkaEgF/6nTGRcbBEj3cX+Ft3Z4b0hDoxPAn/aacGZQPKnduobZJchDKk/ay/ocOqe7zfTo5qcuS1n6SSQKsMpwOw3V4hAKn/NROXZW/RHH9FPr2c867zoiKdD2iWk= 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=MWJbM/cX; arc=none smtp.client-ip=209.85.160.171 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-f171.google.com with SMTP id d75a77b69052e-43d18a7c1deso23975621cf.0 for ; Tue, 07 May 2024 06:18:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1715087912; x=1715692712; 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=MWJbM/cX7EbscSOPeHi/T/KKwADPqBpUfpm1yZrj4iUqPCtvd+t42nlAPO9NPrmOYX KnIiVWe1kx+fUQxOGxOUmEQcVseVkRygoeWapSt/jJ1loCYt5eZDYHXyRIGpkDlVoR5m sFdHDl3h+mvVWCRLFCbQDC5H899GR2PYS3WJs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715087912; x=1715692712; 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=sCcRGZ1AfxJp9/Hc3i1fHvpFqrDXzGvvDmWXLQcUVQz3ycVqQcz3hNiD5Tc33tuIIj CeQOSlh+4+ua72hrUtSIaSrvIWl76f6YT6mfzjG9k30pZXl4gvWRNJuP9qts37xYaTPR w3wFe60Xlz73aM0eO2dkrakkkoe+JE40n7tos3JTvLMtC7x6OVhaApZ4oGPaB/iLpcG8 6BpX655pCWlUQjYXIz0ue47stLfmT3UFXhAFs1A29WpeBJv7qIMQxgSYOxLbaiuQn9W3 kg5LpF4aYKnGjwRGoNpgTK3uHDXJkDaNIpKIF/kNQhiiQtVDElFWuYn6c8mSh8LRisA0 leCg== X-Forwarded-Encrypted: i=1; AJvYcCV7b6NelswJNes8s6r0/fKf0vx2taOOrFup/5TqHfw9nTTHCm27nbM6SP8bmCeLZyfAbnzeT99hPGZ6TjvPyrh83CQd79ZO0HV6c+70 X-Gm-Message-State: AOJu0YzOxh0bP69OK7Qh36R4cmpMgkgB7bQYlm7B8jjU/SooJCGWWJpC 4zbC9giPjG69PBs0AShMuZf7m6oO6CFeY2DauvLwez2JxZ4NV3OAMgfMhn4n1w== X-Received: by 2002:ad4:5ca8:0:b0:6a0:c242:16d0 with SMTP id q8-20020ad45ca8000000b006a0c24216d0mr4441213qvh.31.1715087911865; Tue, 07 May 2024 06:18: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 t15-20020a05621405cf00b006a0d19c3139sm4655105qvz.118.2024.05.07.06.18.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 06:18:31 -0700 (PDT) From: Ricardo Ribalda Date: Tue, 07 May 2024 13:18:28 +0000 Subject: [PATCH 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-v1-2-4a421c21fd06@chromium.org> References: <20240507-cocci-flexarray-v1-0-4a421c21fd06@chromium.org> In-Reply-To: <20240507-cocci-flexarray-v1-0-4a421c21fd06@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