From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 474E8C25B7C for ; Mon, 27 May 2024 21:09:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=p1wFGD5tX2cklhVwgk3Wfce0LH/1+IcK2jQc3vwW4Ns=; b=Hu1i5SNE9gTOq3 cQLXV7SmOZdQxRfhSL43aVWf7jmB3yvBzqhxHPRm+YcQPWn9tFPOq+bBwmo/S1G3333KsAzm3huRk zHl6PaTsITUqw6UcpmuugPAg5DhpDm5Gfq20Njj8LVwHHIT1LqCewsVp4pweg2z3qRpyC4lA7opnt L3g2MfKeFc3bxkLwZzx8kVFmbt36NvI5ZTlUEC821G/n7NgbKNItw/ompEGccQrh4u5ffpDqz+rPK URXGu2G/Ya8pD3U2eQrPNMpEPW/gpewHoXjZaiGG5tQ101VlOWGGCSxoPSi0ooZQrdiXcws3TdOTP 7WH5L5titzFYw7gNF4ow==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sBhao-0000000GKKa-0SY2; Mon, 27 May 2024 21:09:18 +0000 Received: from mail-oi1-x22c.google.com ([2607:f8b0:4864:20::22c]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sBhaV-0000000GK4U-0gAT for linux-arm-kernel@lists.infradead.org; Mon, 27 May 2024 21:09:01 +0000 Received: by mail-oi1-x22c.google.com with SMTP id 5614622812f47-3c9cc681e4fso113991b6e.0 for ; Mon, 27 May 2024 14:08:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1716844138; x=1717448938; darn=lists.infradead.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=Y5FDS0KOQ47jasj32zxHr7JlmfKM7TOOvG63h142TVQ=; b=UEjHQb25e7LIg6LJnTfqWeW84IjjJ1GpXswqF0rsNAgkvdlaYZwggGeofhFJuN+lvP kVlT5wpV4f+jY1FkurD4DRBs3+UO8hr25mqpcR85XraZkEI2eHGWaUe+ISTfWkf+rD+5 DCggNvyBBFawxJotuv0TmNMNK5KQWraWEZ1ho= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716844138; x=1717448938; 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=Y5FDS0KOQ47jasj32zxHr7JlmfKM7TOOvG63h142TVQ=; b=Qc07uUf4tH+0MsDVqPBCxJ7DbP2Ar/w4vcja747wj3uSzhGhu5MmLZPfzE7B/ppgxg e6qHRb4d7LUkOUs7nhPMHZVGc8bcOEDSSJbnsAj+uZs/BU8NJdgib6F38qoitTBeTjev aQ0m/Eee7u/C9DguRB3/9cS0YoBzyktx4RewOZRnAQGHDugBeNA3B41t0EmkEiri6g8A wOV/zhAuyALu4uxEFAA+p07YEvbySfDybu9PAGHOIIl+6QfBLYRMK09vQoJzAKR+NNpE k/2GE3HESHYL8XLHiycUAL5ggCZjcaNBewBob9tcK08Fy0Zoj9cIUJcMlW+D469PKMoA e1Zw== X-Forwarded-Encrypted: i=1; AJvYcCWP93m6m0n6V30s8btbYnp2IHOtQei8sinwekMttRK8TeTnfWfEEMEvE7B/HJmti0DLm8YGuXSwb8SxRz3dWiSumlQm+quIydLQFpnk1Q1ksncqqfs= X-Gm-Message-State: AOJu0Yw2dG2YX49AIzWQJ+m3B568NS9UulCnf9qytJb7iIuST1DakwEj r65bsQPtrZin2qyYNXoTBS8geeP3nCecM53t183KtpBxG4ut7KilowNpnOiVyg== X-Google-Smtp-Source: AGHT+IGS4IcyWoHtoHLxYqVJXwNRWKOLERShKBdO4wfCuEj/TaqRAsEdR15fcRh4okWrTQcoQrX82A== X-Received: by 2002:a05:6808:1507:b0:3c9:949c:cc02 with SMTP id 5614622812f47-3d1a707df19mr15970807b6e.42.1716844136147; Mon, 27 May 2024 14:08:56 -0700 (PDT) Received: from denia.c.googlers.com (125.135.86.34.bc.googleusercontent.com. [34.86.135.125]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6ad850a6dc7sm9511866d6.93.2024.05.27.14.08.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 14:08:55 -0700 (PDT) From: Ricardo Ribalda Date: Mon, 27 May 2024 21:08:52 +0000 Subject: [PATCH v3 02/18] media: xilinx: Refactor struct xvip_dma MIME-Version: 1.0 Message-Id: <20240527-cocci-flexarray-v3-2-cda09c535816@chromium.org> References: <20240527-cocci-flexarray-v3-0-cda09c535816@chromium.org> In-Reply-To: <20240527-cocci-flexarray-v3-0-cda09c535816@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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240527_140859_241663_B63E3573 X-CRM114-Status: GOOD ( 13.57 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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.1.288.g0e0cd299f1-goog _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel