Message ID | 20240507-cocci-flexarray-v2-5-7aea262cf065@chromium.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> 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 39589C10F1A for <linux-arm-kernel@archiver.kernel.org>; Tue, 7 May 2024 16:27:52 +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=wGeXZQ9Ul9l+8vbaRqcCa/GelSvbP5tj15V9xMhCHQQ=; b=m2ri72K+spcgul BBnAjWs6WPRj7/IL16Phs4cnFdcjQtOkvRMPAW1jaw5Ly3XNkjMDv3IPUdFj1hrK5ETY+s4mSYBwD Hy4viChGTvCyCzSae0+Ej8t9eNKQhXd0aU2AYDe0JK8uHybl3lyCrlHAK8yL4+I0JB/1dypZfxg4n YGHOT1KxL8bSqOVMuxTxA4T4snfAQ6Ai2JW3+T28qIv5caAGXZ6gEx0f5vhKJqdiplBnFoLflqgvG XRX6n1uGJGuoC5Fheyi8SEn5xHdRv+3kVvnfbfn6+ss4d2aGGCsqVS4xjjJUp2/g4gP2xQG+zFCVE ykNE3TeshMjsw1U7oHew==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4NfE-0000000Bxpz-0da4; Tue, 07 May 2024 16:27:36 +0000 Received: from mail-qt1-x833.google.com ([2607:f8b0:4864:20::833]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4New-0000000BxTv-0EgN for linux-arm-kernel@lists.infradead.org; Tue, 07 May 2024 16:27:22 +0000 Received: by mail-qt1-x833.google.com with SMTP id d75a77b69052e-43a317135a5so23473111cf.0 for <linux-arm-kernel@lists.infradead.org>; Tue, 07 May 2024 09:27:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1715099233; x=1715704033; 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=yEp5ZozBkj0x9D1ws5SUxXE7DcMsbsSxhL1FOw8KqVY=; b=KkyuFeKI6Pn39mfOT+DkFGXiadjEc1eyFLRHdSyk1YN5ojxY7Wal3zZ4UgOft2e/fa 67OeBUD4fiy2jZ+M8z0MK1ZvpaLywaxTdotn57aSSJsAzo7jIa2HzVLSqjX98Ce1cYOo rA2KUwYkd2MJmgRxTR/hhCiP3tqObK3Cuzyh0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715099233; x=1715704033; 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=yEp5ZozBkj0x9D1ws5SUxXE7DcMsbsSxhL1FOw8KqVY=; b=tjfxl2L14wLnd/nbo5mMayB7hGgwnwXEq7u9QQ4RPj1J0/Yzn9dsD14ICpbhce0q/K 2a+njWWp+N63KvvI0Co0XtgYTR/McLC5TQDKO+/kMY3KzLZkuv5T18mmJNTar9/sVzdC cJKqZfwfzo2xvZWrmXEWIXzuVCLNafGMNk3XYd8OwLZMUSSksCltVwSQn2eWKLS/lc9K D4gWGVDeYgr5WVCW9+zRC/8YnQLmp2gX1Ee1QpzIp3P3ytd7FHe5QKlCW/eHC8yg1FfY WatX+/TcMHVVa+5lvmoxU3DHrJm9JBiCeBcVuvBrkkFj1EqpASkeLTiEWpwhzdIQej8c i1UA== X-Forwarded-Encrypted: i=1; AJvYcCWAX0kzK7nVk1zTnCXHhIcBvehiqHtV0C0Y/+0hxsqbw9sITI1aflkqYddQmQq0PsnRxPOOpMGOtgwu9utDaer+laWP8nOG+k3KrLuVpu4cL5oDHe0= X-Gm-Message-State: AOJu0YwfcwViQzJ4BZwd/+XTfFe1UaIVu5OocY2Y3HeJ981uA4XOhOV/ Zns4/z0ztImr+Me7WuoiDakE4F4GtLGMF4UFADCzV542IJ7jglFo3/Uh4iKl6Q== X-Google-Smtp-Source: AGHT+IFG5P8cF3bvogi35ZVCCh3mpoFd/JBPtTJGyHj5A6ptYc39Pcqw/IlsAeEpo3GtlKvW+qflBQ== X-Received: by 2002:ac8:5a15:0:b0:43b:16d1:a6ee with SMTP id d75a77b69052e-43d8f44bd11mr53130171cf.17.1715099233681; Tue, 07 May 2024 09:27:13 -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.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 09:27:13 -0700 (PDT) From: Ricardo Ribalda <ribalda@chromium.org> Date: Tue, 07 May 2024 16:27:10 +0000 Subject: [PATCH v2 05/18] media: pci: cx18: Use flex arrays for struct cx18_scb MIME-Version: 1.0 Message-Id: <20240507-cocci-flexarray-v2-5-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 <m.tretter@pengutronix.de>, Pengutronix Kernel Team <kernel@pengutronix.de>, Mauro Carvalho Chehab <mchehab@kernel.org>, Laurent Pinchart <laurent.pinchart@ideasonboard.com>, Michal Simek <michal.simek@amd.com>, Andy Walls <awalls@md.metrocast.net>, Stanimir Varbanov <stanimir.k.varbanov@gmail.com>, Vikash Garodia <quic_vgarodia@quicinc.com>, Bryan O'Donoghue <bryan.odonoghue@linaro.org>, Bjorn Andersson <andersson@kernel.org>, Konrad Dybcio <konrad.dybcio@linaro.org> 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 <hverkuil-cisco@xs4all.nl>, Ricardo Ribalda <ribalda@chromium.org> X-Mailer: b4 0.12.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240507_092718_269708_0CD070EA X-CRM114-Status: GOOD ( 14.46 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
media: Fix the last set of coccinelle warnings
|
expand
|
diff --git a/drivers/media/pci/cx18/cx18-scb.h b/drivers/media/pci/cx18/cx18-scb.h index f7105421dd25..841edc0712ab 100644 --- a/drivers/media/pci/cx18/cx18-scb.h +++ b/drivers/media/pci/cx18/cx18-scb.h @@ -258,7 +258,7 @@ struct cx18_scb { struct cx18_mailbox ppu2epu_mb; struct cx18_mdl_ack cpu_mdl_ack[CX18_MAX_STREAMS][CX18_MAX_MDL_ACKS]; - struct cx18_mdl_ent cpu_mdl[1]; + struct cx18_mdl_ent cpu_mdl[]; }; void cx18_init_scb(struct cx18 *cx);
Replace the old-style single element array with a flexible array. This structure does not seem to be allocated in the code, so there is no need to change anything else. The following cocci warning is fixed: drivers/media/pci/cx18/cx18-scb.h:261:22-29: 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 <ribalda@chromium.org> --- drivers/media/pci/cx18/cx18-scb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)