From patchwork Mon May 27 21:08:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 13675827 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 57280C25B74 for ; Mon, 27 May 2024 21:09:32 +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=MhcV81gvTDObJ2x4pvHxbH/araVSxiFcY70O4BuvnmE=; b=KN2dUehbtx3nJK GYxNTET3rsJSrEoZ9xUGvOhjpj62WNJHGxreP5lcOqsBo7GuZvdNOR89vYzjKe6CwslbIUbW/0jJM IPX54yuBZaIfDR7b1L1fpbmh8Z8X1q0En5upBiucH8y78oAtW33tiuubXKcthgGrqKMDSZhIk10rd fF5J/rxHP9Njbe6EWYZn+Sap1J6nwttiax9cSZ5VizTNY+WljRBdHe99Y564VUOVPnWv+KjWDeQs0 x3N5YCh7rqy3rKdYUxC3D6A3oCKWmR6ifKvW2yasRTn3mNUFOZ+m/zRvX5j72AZWt235s1/nEm/vw sO/RaEL0rJFfCxl6CXqQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sBhar-0000000GKMz-07uI; Mon, 27 May 2024 21:09:21 +0000 Received: from mail-oi1-x22e.google.com ([2607:f8b0:4864:20::22e]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sBhaX-0000000GK68-2rKG for linux-arm-kernel@lists.infradead.org; Mon, 27 May 2024 21:09:03 +0000 Received: by mail-oi1-x22e.google.com with SMTP id 5614622812f47-3d1c1f4bbf5so117091b6e.0 for ; Mon, 27 May 2024 14:09:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1716844140; x=1717448940; 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=mBvUNOy5oqoGffRnBGlOX8VjvQupq+TiHn+tNWkPE3c=; b=Y1Ta26ZiukZGCzW+QnOQu6SoXlDIK3dJefqSPREDfmvexZU2qUq/ASlKxmkz0JG/ey urkCJZ28ubyzi0kDjRMyI2+VgE8afxEJK84KK8TPm2k/J/npVDUY89hS6scscyHL5ZSK bjguNBGV1ZXjjOS7u7n2y3zGBL934eqVGoijM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716844140; x=1717448940; 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=mBvUNOy5oqoGffRnBGlOX8VjvQupq+TiHn+tNWkPE3c=; b=BzcOJoxrhLi8uWcGXAkrnVFUe/W6dyMhHXfcOdr/75oBiPAMRNOcNyLq2bHbrmSR0i dKkJDIxL5F2MRWGk4BPAjrxV1A0qEdPoixP0kcRUISbWrccrg5GH+o9jkdczK2aZaY5d yc1/Qp5aqs5aK9kBcHcL1MidkO7xPJBUU/0pXspDSJPdfd1kvJwKF1loucZIqnKDhaoS +5c5HB1E9YEr6p48779TtBYF6sP4tj2Zvds26+qVwrp8ih2FG2Qpv3XMZWWY+zyr7+bU ZD6W69wpwgAq+YtJ5AnfE+9alotesnah9MqyvpjgKMzvqTgkYIHo9k+lIOYQy02JUVwV Mpvg== X-Forwarded-Encrypted: i=1; AJvYcCW1E+GIaJdt2ss4MaXjQ37QUyzzJrrHLg+hAXTI+DCyl7VABBfWyn7JO9g9TSuhNOYUwL88bH0G45kfy/eTVtegHY7FOVMCyiGduaZLBVRbdXDRvCk= X-Gm-Message-State: AOJu0YzzSWXvtOVrdgU29W34MlZIAXqXDBMNaBNxeAus668Q2ERE/paf eC9cL9L0YR5GCldl0rh3xDBpyXSkK4jcaNoSn/fWpt5EUFtUDpiNI8aSPvObmQ== X-Google-Smtp-Source: AGHT+IE7nm8EGv+xMLxhkV58cp2fsWk6T4ZsQ57GlnbqEOEZkcL5w4Fub0qLyq/Mtx0z8nTh8LZHcQ== X-Received: by 2002:aca:1003:0:b0:3c9:924c:8310 with SMTP id 5614622812f47-3d1a1e83258mr10375382b6e.0.1716844139979; Mon, 27 May 2024 14:08:59 -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.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 14:08:59 -0700 (PDT) From: Ricardo Ribalda Date: Mon, 27 May 2024 21:08:55 +0000 Subject: [PATCH v3 05/18] media: pci: cx18: Use flex arrays for struct cx18_scb MIME-Version: 1.0 Message-Id: <20240527-cocci-flexarray-v3-5-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_881856_FBB3212B X-CRM114-Status: GOOD ( 14.19 ) 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 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 --- drivers/media/pci/cx18/cx18-scb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);