Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2278777lqb; Mon, 27 May 2024 14:13:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUiUPOIwf/YH9DjrVb3hGh2HlGZBkqNnYdgGCwDAgt9PfJONhNO5MsLazNHyrSFmZRRYahB6iiQl5S63TlAlajNejlL+xOhKgj1RQUqmQ== X-Google-Smtp-Source: AGHT+IFgYkod4WeDnQ9WtfCiBg3FApdk4rLE2Y2q/vCDMyQowDm5LlNeUbknWB4qdWzNhlPFL9Xb X-Received: by 2002:a05:6358:9107:b0:194:80bd:3e8c with SMTP id e5c5f4694b2df-197e50ca46dmr1435243655d.4.1716844435277; Mon, 27 May 2024 14:13:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716844435; cv=pass; d=google.com; s=arc-20160816; b=ogVSNSPahs55gH7tF9yXrdGvEyuubrwwHormNIB37aLdOT/i2pLOxDjdTMvOfnIs59 hFAu8EWYx4MULzWi3JL+Y2AhaLS1jaVM4s10T5lnxjml/wr1Mxn5c+y+cJflzSmwcOLP MHzvW1xOhCtASewA+NtREGWTwQlpLzRF4Krpt0+IJ3CgoN0ct+45t2kGHhSHBSzi0heF UKaWvtY3ONTJRRJDOuxLpfYdJ4X2wxHLWqQ/RdydEOzGoBvJxrDaDBsumbQGTCIqj6KV /wht52TYObJDyPc+s0It7A18l4dHqXSn4+V4a2hru0JTUZYnI91uB20RWLA7Pxjn99aq xDzg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=wezSjtqVEo6M70U5aktCNd9/8NZeYOZUNM9cGTCe/BY=; fh=Mj3Xh36tEDUBDMFEv4yH6j4YV7vMn72uhQG17j50BHM=; b=Low8QMhgUdryHLBtCVKVzdziR+sd0gbvPUOvetxXppfOUahdmM03m80WdiBoWMsZKM YlZgAcSfn6UYqAggDygeA0TSyYvBzclZkApvAoeuYKlG4H0e1JA1UUlAmOr63oEgL7EG faWqmFSNBoF2xC3e2H3YS4Ca0u27AlzLy/nulscxJEpPRA9NyNKgpsFZz93YQ126IHMj krHBBlRDgl4SQ2JqsQ0GrrJR7LH2FPoSoL7xSyQ/jFBxmRqLnKMZjwfTwtKXwGL3VpuB yyc3qGW0iUgGQZqTJAPoffY2/EAffY9prDC/A8aQWzKwod2wTc9k1XaD9qgvcYevtZRM Xnkw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=MbJskAPc; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-191442-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191442-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-68228609792si3494594a12.435.2024.05.27.14.13.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 14:13:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-191442-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=MbJskAPc; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-191442-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191442-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 653812836DA for ; Mon, 27 May 2024 21:13:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 373381649DA; Mon, 27 May 2024 21:09:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="MbJskAPc" Received: from mail-oi1-f180.google.com (mail-oi1-f180.google.com [209.85.167.180]) (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 E1B8D16D4D3 for ; Mon, 27 May 2024 21:09:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716844156; cv=none; b=Ds517DusbyhSNUSuSbW3hlvXQjiYoZ/qud7sB5+QFzE0KnKLoT3DTNq1KLJZCtwf4X1ugPfrNYcndtMJ/T8PxnBgOJhce7qjPRfLUjVKH5mEq8hI4TejJJFrhnElzqWn6W3wtF5Kq5l3+jhrTFhmHzjnmn6lHZwRJc3zDBh32K4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716844156; c=relaxed/simple; bh=vq5XPbrneys7sUYRmsmLUBdJqp5KlWLzYqdDrrKd+uo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=qIflGKe6TnStizEFAjyIgNF7RYBAw9JUabOKepZbUrvYck2ExoGDAcAcs/GmlPLOozx3SvN3fy/KzREAWQorQdxEeoxyN3LAiED8AHK5X/HjteC5/0QdH5/byT42ejhSTyqoOKRlLaIWgD97w9OuEsLNQhRgbsdDAT4QNu4c+Dg= 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=MbJskAPc; arc=none smtp.client-ip=209.85.167.180 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 Received: by mail-oi1-f180.google.com with SMTP id 5614622812f47-3d1c1f4bbf5so117222b6e.0 for ; Mon, 27 May 2024 14:09:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1716844154; x=1717448954; 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=wezSjtqVEo6M70U5aktCNd9/8NZeYOZUNM9cGTCe/BY=; b=MbJskAPcSrvjOAy0DviqwXBsFX3oEGs3LqpCaCu5mfZEwQ27ILECF1dEjWwxt4G2hV dGjDi0u3uzAePispGYRrfmmDaZEEeMAQEL6nixoVr0jbtdutbgAybTKezMCyTum8w6u3 VDzyXS6gQolJ3f3okliB5PRqIewCT4VXPnqdU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716844154; x=1717448954; 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=wezSjtqVEo6M70U5aktCNd9/8NZeYOZUNM9cGTCe/BY=; b=Vf+jsXLxjdVkGI2wLEimsR8hN/Df22Sgn1wTN+xxJLMwUUxZh9o7EEB3TbJmmQ8bv+ wK6yQr1UPHjQYhb2Gec08KZHwFnhv8U1FUYf/tTDFt77l+2Cvc9wI8UkDe0KQmdjd8MS MN90lIf2gChgEkOeP2vID6aD3Cf20JJYHWfJE02kVvfm6AXELyirnoCHT1yC/jelGfcu mLxaSkC8RiwySZSpc4bbvo0ASOy6+y9YDHo/e44uuSEHYDVwpGxRHnskbQfwvKkZOoNp A5YoHSkeQ+TW79ZqT7uzHNkoav5gN4hgtP1ypWsm3k6JEAKODybxw43j5GQiJRpL9BM2 nNHQ== X-Forwarded-Encrypted: i=1; AJvYcCWOgNx+X9Gedu38kWohrpehkGrlIOSJLDNQYWInvU4BOZPI/yJQuG5qQgPiEtRGbOBy11cCKo1At6OPtjLgSlUUw30f7sISTUn7/sBe X-Gm-Message-State: AOJu0YycfvUE84KdBaBA6x0pQ/e6a+h/nqsVYXilVsODYzf+Mmo2z/jx GcViYm+x0PJIKaYPmkSLU5r89Xa1J4lMu6873YWH3N4hP4Nj6xE6q5rknHgq2A== X-Received: by 2002:a05:6808:199c:b0:3c9:c7a0:94f7 with SMTP id 5614622812f47-3d1a50ad2aamr13149063b6e.1.1716844154031; Mon, 27 May 2024 14:09:14 -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.09.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 14:09:13 -0700 (PDT) From: Ricardo Ribalda Date: Mon, 27 May 2024 21:09:08 +0000 Subject: [PATCH v3 18/18] media: venus: Refactor hfi_buffer_alloc_mode_supported Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240527-cocci-flexarray-v3-18-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 Replace the old style single element array at the end of the struct with a flex array. The code does not allocate this structure, so the size change should not be a problem. This fixes the following cocci warning: drivers/media/platform/qcom/venus/hfi_helper.h:1233:5-9: 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/platform/qcom/venus/hfi_helper.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/qcom/venus/hfi_helper.h b/drivers/media/platform/qcom/venus/hfi_helper.h index dee439ea4d2e..9545c964a428 100644 --- a/drivers/media/platform/qcom/venus/hfi_helper.h +++ b/drivers/media/platform/qcom/venus/hfi_helper.h @@ -1230,7 +1230,7 @@ struct hfi_interlace_format_supported { struct hfi_buffer_alloc_mode_supported { u32 buffer_type; u32 num_entries; - u32 data[1]; + u32 data[]; }; struct hfi_metadata_pass_through { -- 2.45.1.288.g0e0cd299f1-goog