From patchwork Tue May 7 16:27:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 13657417 Received: from mail-qt1-f182.google.com (mail-qt1-f182.google.com [209.85.160.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 99A2D16D304 for ; Tue, 7 May 2024 16:27:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715099236; cv=none; b=NJu48KsrgvEMtVdffhRkVP5yEHMNO5mYd8OASOuJGYOe+5MnPvYkAjbs3xOJkTzsqi4fLYIcUmxltkjxq+sY0ytPxPO5UOKaTSm2WTi7Gx7fBaoCYx+ayWe7BGdhr8mlX0V6oEeMSUoSPBsD9BRzqFwUWuwoWefp+n+DR1Lt12w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715099236; c=relaxed/simple; bh=Ybzvge6Uw1Eh9FNqgRzW6qmy53LUrGIUlQOKIfHH8ug=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=lPzm5zSZwNHUrUmAZmqR7XPEhHApCRvJJzJNmc4gni4dqI2QB4Ep6ENQ/5rT8oSDem2yi33ljKZNzdbEhHVOk+qQjShpXpjgHbvdXwa4wsTSnFmGePndFDVy8jhQBTVmEvWLPSStS5SB29w5FYdKE+9n8BxUJHRuHpsuvxUzNVE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=QW9gJ5yp; arc=none smtp.client-ip=209.85.160.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="QW9gJ5yp" Received: by mail-qt1-f182.google.com with SMTP id d75a77b69052e-43ab76cac73so31118021cf.1 for ; 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=vger.kernel.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=QW9gJ5ypl03UwodfkeFY8pxPS83KW6HL+RNZ95hB3frMgnXPejntZrrwmLsoZ6Irg3 M+IJCLVXluMO9DWeHleoeguQlKPdg6CVYTYAb6OVQq+IkHkUH5R4c1bQYWj+UVegOOKy fzfiSQ6a58hSgddB5ZYYMrg4sKZYRfH+usGmk= 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=n43FVBWvGfjYFVMh4yk45kzb37P7oQqjBKHPbmtQ47g0lK7C6KTN1q64ynAMbrQCec dfilVMcZgm3deqqC67O+D06Q0WR1uPalEo9bJNxy9HFBdZxRu6I/XvW4EirRNw0hD7LQ ej0Y/33DMBx0UbTInB+SZtR8nDD44aY6O7oXUJ3cBCk/e1oqr2JsMd2u8/THbaXHBlxm vGpgww3FLY67hkUaZw/K0YTg9qWqn5UhcslbyEor0jSHtofwBgOBF0EfjIbHeT7wSYe0 8shkk11y3gFhi/jC4B5rSfWHV3vZu8jiQ3+AoqB9Aiy7v23AB1yhnoGCpOnEHmt9vyNE MvuA== X-Forwarded-Encrypted: i=1; AJvYcCVPlb8thxvH8Xx0xVZxxBjfxxHIKZrDqUqyBFo9+18AiswDDgY7h9Joa3IO/mrYrIfKogeJljb6Vcrx5WSe8IVOJsT0Y75OvrfQ203p8w== X-Gm-Message-State: AOJu0Yyp4+FxsoL26z6G5baV3Ne9kjfnNZTgmaP/C6PZIkE0XT9Y/YV9 uLAPk84/p6mpm68aVfl2Siu90kz3XEbEic7cBDNyat7roVTCxiWfahzYmvAWVA== 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 Date: Tue, 07 May 2024 16:27:10 +0000 Subject: [PATCH v2 05/18] media: pci: cx18: Use flex arrays for struct cx18_scb Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 , 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 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);