Message ID | 20240507-cocci-flexarray-v2-4-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 B52BDC10F1A for <linux-arm-kernel@archiver.kernel.org>; Tue, 7 May 2024 16:27:44 +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=BnvzN667+K1j+jfD1oZ2By0WG4Vnw968IrFif1l6WQE=; b=pTK9Mh9k9e+ZTx sA6Xjgw+5P8GRe2OSjFeUwjtghMsRaH9qpvOHaYxEeMvsP0Jy8JwnxNoSPslN1Bwtftei3nUXFaXo 8Col8zK8z5QWPqA3aj0MwKGL5gP+oraRAO2Mt3LU2dCooDKK0vv6Y8iwRAyTkJyPvZwAMQvT8WfDM TGcKkUk6spmcXNt5+fHTnyW4pm1F7QhYre3F6Pnb+3zZgWdbWjfn6NPnZOLLtK40EIMZM8gj+S1/X ugwdkS3BIveLcV9QzwJFer5HKtRXMpI+jFAUcW3S286ccBSVCTysIA/k99OFiYJjvN2ciLxtbURjy 5vCA/wQcupC5BvAg61hw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4NfA-0000000Bxml-3kxE; Tue, 07 May 2024 16:27:32 +0000 Received: from mail-qt1-x82f.google.com ([2607:f8b0:4864:20::82f]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4New-0000000BxTR-0HpR for linux-arm-kernel@lists.infradead.org; Tue, 07 May 2024 16:27:20 +0000 Received: by mail-qt1-x82f.google.com with SMTP id d75a77b69052e-43d1d5c68b4so8853931cf.0 for <linux-arm-kernel@lists.infradead.org>; Tue, 07 May 2024 09:27:13 -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=1/P1ujR64RjpeY3CCEbW1xPPMvUuqlT7weCmbLOLgyg=; b=jog46REsX88N/TT8I58i9MVH03jir5HmF+lJ9Q23Fy+Og/P6ICdAS0sSMzQxWHiDVa yjll7RvEa0KckROW0I/z3P8go8N0k6BMIiENvfI7lMBqrkaYBHugFWKhiczBXoeK0M8q 8eUCIz+mikVo4urmfnC0DE1Zb095cOu5BveAc= 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=1/P1ujR64RjpeY3CCEbW1xPPMvUuqlT7weCmbLOLgyg=; b=XzN7n6qNABtCLe4wFGQ2qcG8MNPD9GbaQbekrIzbjZNr7wCJb9nqsqF9TQBM3EN7tx 4snLL/w/buEWzBaUGk1BJGinQZw4qXV63TrFH+zsHgofQhIiZFlteBGesmBXCcvujM1o xYGaX+6bN1+UVyTTNsGIXzCb8ZFWU17Z6HQBe8PO33Ctth4+wtGvzGfWDqnZMpk2ZuQ+ OOjqV440ou4bwXeTaLjCd4iLgPt0ZekBfVR1nEQ0nDKwGxG3HmZGHEwfCcR39HyMO9B5 z1mqRglu83qpoWwwk1AM2rF2yLkCj49nlswzKC40v0YBNXG2bzMqnnicXjaYtrBbC/AI RJ9Q== X-Forwarded-Encrypted: i=1; AJvYcCXdTESTaMxF1bIWjzkasU9+Fg4s6v4zMUPqB7zIS2j6swXyVM6TNKigKP05t+XuHQ/u/KcpDCtHMR69y32zODYw+qTPDzU116sxyMdRqbruAgdtC0g= X-Gm-Message-State: AOJu0YxdlHoW8TAiwUyb3vwY1sOOC7yz+S6o0nzWG03VXv6/PoDaMVbY LSvFYAEBjU2KPw4Cnd77lzKEXV6+qt6hRmvYXhivYFfbHQd4/0o0YvcYrshIhQ== X-Google-Smtp-Source: AGHT+IF13hjL17rg1ksLknz8RID4/qPhKnOZgs0TD68SX8wPAxraoJfg23Be6Og+r0EAzRQ8G/LBRw== X-Received: by 2002:a05:622a:2994:b0:43c:748f:6e96 with SMTP id d75a77b69052e-43dbf622550mr1868001cf.39.1715099233022; 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.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 09:27:12 -0700 (PDT) From: Ricardo Ribalda <ribalda@chromium.org> Date: Tue, 07 May 2024 16:27:09 +0000 Subject: [PATCH v2 04/18] media: dvb-frontend/mxl5xx: Use flex array for MBIN_SEGMENT_T MIME-Version: 1.0 Message-Id: <20240507-cocci-flexarray-v2-4-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_240478_8371EF90 X-CRM114-Status: GOOD ( 13.75 ) 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/dvb-frontends/mxl5xx_defs.h b/drivers/media/dvb-frontends/mxl5xx_defs.h index 3c5d75ed8fea..512ec979f96f 100644 --- a/drivers/media/dvb-frontends/mxl5xx_defs.h +++ b/drivers/media/dvb-frontends/mxl5xx_defs.h @@ -179,7 +179,7 @@ struct MBIN_SEGMENT_HEADER_T { struct MBIN_SEGMENT_T { struct MBIN_SEGMENT_HEADER_T header; - u8 data[1]; + u8 data[]; }; enum MXL_CMD_TYPE_E { MXL_CMD_WRITE = 0, MXL_CMD_READ };
Replace the older style one-element array with a flexible array member. There does not seem to be any allocation for this struct in the code, so no more code changes are required. The following cocci warning is fixed: drivers/media/dvb-frontends/mxl5xx_defs.h:182:4-8: 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/dvb-frontends/mxl5xx_defs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)