From patchwork Mon May 27 21:08:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 13675824 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 305B2C25B74 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=iOT6y3w5dr18VehWL/ubkT46ZQeRn9v0P5rEoVP4RSk=; b=Cy8wJFTxob6FBN NjKHCOxm1bx43tn2fZLa3Is13IY2bJ/y+oWayRtlJnZ6YZpk04Fs/m4cW82jV5ZzeDYFPwyH+Yvz8 q4ptehrlAHWjh0ICoulMxob5j1JBeyoMOMmU8zpIq6i/Nw0rLmFag3oNMusqM/lq8V+Nj0WczBPAF cRhp4DI7mMp9f3OLA4zknmY02KF7b7bamuClQWfMCQHcuNrKccJKkBuJZGsfTjBVV3GRp/Rv2NZu1 D5pFi+qVwUplmTU0ofXJh7cmkcImmuwVeu1+wDEnICsTe7VXfVVQjiaMsNLH/dbEdTn5g8iqvEW2M XnLAa062SSEPwE/1H4aw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sBhaq-0000000GKMO-05Aj; Mon, 27 May 2024 21:09:20 +0000 Received: from mail-qv1-xf32.google.com ([2607:f8b0:4864:20::f32]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sBhaW-0000000GK5e-3erA for linux-arm-kernel@lists.infradead.org; Mon, 27 May 2024 21:09:02 +0000 Received: by mail-qv1-xf32.google.com with SMTP id 6a1803df08f44-6a3652a732fso593296d6.3 for ; Mon, 27 May 2024 14:08:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1716844139; x=1717448939; 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=MFWoExP/wH3m7hjvZ2JqRkdunbepixaqBCDXaOKvVh4=; b=MItZd+8fWvyad8x1yqngUsDCjwzID+vbJFt+APCBSiuyqEXEoiC6+sjGH0WxXXYUTx QgOUxv88MGkF3UoepnQpn29ZYyK/wqZn083tmlSGN52KP2b8AkFEdSIiqMVWi9gkyiOA BQ6R34PQOdlaL7wCUsasuXq4IqqEO2WBCeia8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716844139; x=1717448939; 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=MFWoExP/wH3m7hjvZ2JqRkdunbepixaqBCDXaOKvVh4=; b=I5sSDa7EbdAzLXnh/P8xGCi53oNh0Q4zm2RVYCA4HE3Fx7Po9EbtfhahFBU/aBI4zu jalOYJSM1SJgPmvm2SnmMxHG158SbAXQWiRRJZSgqNGa+a/iIhBPJ8JwiA+wcX8K44XT 3/sb6FUnTV0OS9aaSp6vS9YxyIwja3hulWDZjx4+myQ69dsaG0YF5MEFgG1CJnXS2bRR 5i6r3F2W54vlqRyTLJ9BJVjwguGCFisBQwYLdCpJFj3vSc6x6QRAIo/KZ8GQq41htVUJ sZrg2dtAS38djiktGiDwjC/cOwRKLWQnA/Ymmz3gw4iVW9uoASPyhMDyQLNUMD36RO/P NWUQ== X-Forwarded-Encrypted: i=1; AJvYcCWv4PWCUkWa6/82RqYcKmhtaKRIsuI+V685CHR2aXbqHPkCq8iRkXbGF/60FZTvf/72GJzESKwca/D/G+2mlRKWeDG5XlmyB6imnw7Uv1cWqivl0ug= X-Gm-Message-State: AOJu0YxEHQXMXh9lTKzVhw9K8QDBs8kL1/DeI8yoi9OwJQReFzym/7TW f1n+0SQVFgmpZ1QL25INtG+JxrI6GTAwxrY7apETdeumqX4Nvq0nkUaLXRTVNA== X-Google-Smtp-Source: AGHT+IFivOXXvR8CUjqaAYwugV85CB4ajDPAOeknJmut8X/c8q8/lFGzrGSFxvIJPA/iWbuRhKRNlg== X-Received: by 2002:a05:6214:3d87:b0:6ab:898b:42e7 with SMTP id 6a1803df08f44-6abcda62be8mr118486476d6.65.1716844138851; Mon, 27 May 2024 14:08:58 -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.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 14:08:58 -0700 (PDT) From: Ricardo Ribalda Date: Mon, 27 May 2024 21:08:54 +0000 Subject: [PATCH v3 04/18] media: dvb-frontend/mxl5xx: Use flex array for MBIN_SEGMENT_T MIME-Version: 1.0 Message-Id: <20240527-cocci-flexarray-v3-4-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_140901_037552_6EA4A969 X-CRM114-Status: GOOD ( 13.38 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- drivers/media/dvb-frontends/mxl5xx_defs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 };