From patchwork Thu Jun 6 13:16:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 102243 X-Patchwork-Delegate: hverkuil@xs4all.nl Received: from ny.mirrors.kernel.org ([147.75.199.223]) by linuxtv.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1sFD03-0007VH-0a for patchwork@linuxtv.org; Thu, 06 Jun 2024 13:17:51 +0000 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 8FE1F1C256C1 for ; Thu, 6 Jun 2024 13:17:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2BD1B196428; Thu, 6 Jun 2024 13:17:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="NvYMBhPb" X-Original-To: linux-media@vger.kernel.org Received: from mail-oo1-f45.google.com (mail-oo1-f45.google.com [209.85.161.45]) (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 5FFB1195B3B for ; Thu, 6 Jun 2024 13:17:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717679853; cv=none; b=XEVZmlQKr1PwnBnmpJF+HS5bjHa0IylqtDv7F6FxduWcEAIfHeHDk2IJShr0zFFD3YySiD8AMhxkKPoXFKBOc9++KdT6fpwF4cYQytVOtADfvSDwrBSWI6FXKxkYLV/WfeHVMGXuL9+oBe5dUyO5ZC1Ul5Nj9IGwxc0jHIfv6Z0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717679853; c=relaxed/simple; bh=9Ex/psXstRZqGMxxPJ0VpkCq64t7rGKg+zLLyU8qbQM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Th03EPUCz9plt4M//uoVz0wifgNiocOl3dh7tyW+AIGS7ew4U+195Vl2Mu/Y25XnRqsNIkYZIc7/3ASKDeVpYHkOW/zzNfN3YeNMN2nAwB90DX4VXseVw33ahgtDSWd4BZGvwA9bfyk0+ECK9WurQMr/xNR0+Z5wPyxQD0Sywuw= 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=NvYMBhPb; arc=none smtp.client-ip=209.85.161.45 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-oo1-f45.google.com with SMTP id 006d021491bc7-5b9794dad09so419738eaf.3 for ; Thu, 06 Jun 2024 06:17:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1717679850; x=1718284650; 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=AAL4006xAnRJyzvWwdXcDdqMP35ODneV2/4JxIJoTYE=; b=NvYMBhPbL4ddCR1Xdo0TVjY2+0mkBDXcQoJmDaBfuAgBEBD5KBI+0Vy9Ew7LZ3U64g gqGYDYnPcUh6vAl+FOBCQdz9IbPMcv32KFFTjVy5vxB7Y0wv7ovxcZgmcRTNmJFVjL00 7szNGD1s7aojdVbkjcCPwbxa2KzrH/8JTxr2I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717679850; x=1718284650; 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=AAL4006xAnRJyzvWwdXcDdqMP35ODneV2/4JxIJoTYE=; b=jnN+zAKaANvco6HMP3EONU8va/RCQc6Yj6YGHvmaLmunwBaMU9QghIWtYB8yNMODPj zb+qD41PjnQx2iKGoR36HxEK4/eTd+B37P0Dt0vcqOVim6Z1v92poByqGo3f3ceaznh+ 3+zNri5YL9uizEv4IxGEtTHE6vLkmdVJZFve51YWx+sgO+XtIpIFr0zPvt9GS58HrBPu REh5DxEobtUQj27l3BrfeN9q/pmt9TxS2xNTzE7wTtlq4pfbYGKuZj61TTSte7PFzVlD ONSAViJoj1qpDb5L4Xv0Cb1qdEo14+CwR8P4aRt6s9tHE32tFZ1OoaDe2fnJAvsn962j CeKA== X-Forwarded-Encrypted: i=1; AJvYcCVfabgy2+lf9wuYlJkGn+zJ/u+F2B7mue3lf8IH+Z3kM2/jYp33x0pJS3rnRWpo5uY5XJwXpRwqGfNejt2C4c75NW5S7fRs40Jd/Xo= X-Gm-Message-State: AOJu0YyocYZTx6VxCiFH6PQP9rXX80fjmfpwcfc0VPqrdhg+4BNSxO43 FeudMWvn51enXSHdVmslixIg0DFUeQnByNolvJVf7PZIxcJkURD9/QOL0m/vcg== X-Google-Smtp-Source: AGHT+IFMfHqWudPNwZ7gEE3WDMg2/DCijf/SGmLWSwqmxlW9rIKDz6JeqdjExEkt/BTcjfNpWLogIg== X-Received: by 2002:a05:6358:2609:b0:199:2b63:9f42 with SMTP id e5c5f4694b2df-19c6c68a2femr652957255d.10.1717679850292; Thu, 06 Jun 2024 06:17:30 -0700 (PDT) Received: from denia.c.googlers.com (123.178.145.34.bc.googleusercontent.com. [34.145.178.123]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6b04f6607f5sm6118036d6.31.2024.06.06.06.17.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 06:17:29 -0700 (PDT) From: Ricardo Ribalda Date: Thu, 06 Jun 2024 13:16:35 +0000 Subject: [PATCH v4 01/11] media: dvb-frontend/mxl5xx: Refactor struct MBIN_FILE_T and MBIN_SEGMENT_T Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240606-cocci-flexarray-v4-1-3379ee5eed28@chromium.org> References: <20240606-cocci-flexarray-v4-0-3379ee5eed28@chromium.org> In-Reply-To: <20240606-cocci-flexarray-v4-0-3379ee5eed28@chromium.org> To: Mauro Carvalho Chehab , Stanimir Varbanov , Vikash Garodia , Bryan O'Donoghue Cc: Hans Verkuil , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Ricardo Ribalda X-Mailer: b4 0.12.4 X-LSpam-Score: -3.6 (---) X-LSpam-Report: No, score=-3.6 required=5.0 tests=ARC_SIGNED=0.001,ARC_VALID=-0.1,BAYES_00=-1.9,DKIMWL_WL_HIGH=-1,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,DMARC_PASS=-0.001,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,SPF_HELO_NONE=0.001,SPF_PASS=-0.001 autolearn=ham autolearn_force=no Replace the older style one-element array with a flexible array member. There does not seem to be any allocation for these structs in the code, so no more code changes are required. The following cocci warnings are 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) drivers/media/dvb-frontends/mxl5xx_defs.h:171: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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/dvb-frontends/mxl5xx_defs.h b/drivers/media/dvb-frontends/mxl5xx_defs.h index 097271f73740..bf08d82ba2cc 100644 --- a/drivers/media/dvb-frontends/mxl5xx_defs.h +++ b/drivers/media/dvb-frontends/mxl5xx_defs.h @@ -168,7 +168,7 @@ struct MBIN_FILE_HEADER_T { struct MBIN_FILE_T { struct MBIN_FILE_HEADER_T header; - u8 data[1]; + u8 data[]; }; struct MBIN_SEGMENT_HEADER_T { @@ -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 }; From patchwork Thu Jun 6 13:16:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 102244 X-Patchwork-Delegate: stanimir.varbanov@linaro.org Received: from sy.mirrors.kernel.org ([147.75.48.161]) by linuxtv.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1sFD08-0007VX-1X for patchwork@linuxtv.org; Thu, 06 Jun 2024 13:17:57 +0000 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id D0DE3B225BA for ; Thu, 6 Jun 2024 13:17:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 60BE2195B19; Thu, 6 Jun 2024 13:17:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="oFdujwms" X-Original-To: linux-media@vger.kernel.org Received: from mail-qt1-f177.google.com (mail-qt1-f177.google.com [209.85.160.177]) (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 67A8F195F20 for ; Thu, 6 Jun 2024 13:17:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.177 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717679854; cv=none; b=OgNSHZeOh6Mz5FRBOK+S5iVFKWIbVSGA351pSzOXEGKc8SpsbWTWEms9QKmiW3x0H4ePf+J/uRcK9lrQcoMYjrtVC3g7I/lGGtjO2Og8UOD6OEy06wH37C+IrNtx2SI/aiIt6PO13poz5MjUSXW/TGAOMki6QFM2us4bWzZYj7s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717679854; c=relaxed/simple; bh=q4cFhQIrNm36IK0wKmtb142H9pZ1e7X8A6hufGU+NQA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=STb/NVB9fC9TTlth5gV8AAXS3uZorWxFF0eBj9CWUNGb77YUTGltZ1aDz3VapmdtL8VBiNaN+hzUnj5/jVG4vhGoM9JKWalt7JNqO1DXDDZ/w97eYOO0iFi/dWCsAnQ43RwRs3scwwsn0WYydV3XtfihEg7o7oPsenRmAzbs1G0= 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=oFdujwms; arc=none smtp.client-ip=209.85.160.177 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-qt1-f177.google.com with SMTP id d75a77b69052e-43fdd85a284so4887181cf.0 for ; Thu, 06 Jun 2024 06:17:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1717679851; x=1718284651; 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=VDRaTdfmVls7s4JXTIr052tZZ8CsVVd2h9OYORJYJok=; b=oFdujwmsXFGwYvB6T4Jq5RqxKjkJKijWGA/SBGvV/aBtUgMjL0nFyrsDVUvmyX3IDJ E15h4gACU12nGT8LrNRtbFcixUz8AsJKPX7VMmD+0aOQj23tm0qDp1g7gxSF68/98tBa 5WF9srZy4jkdKcapEU99i9BcRL8mNGtZsvrAM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717679851; x=1718284651; 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=VDRaTdfmVls7s4JXTIr052tZZ8CsVVd2h9OYORJYJok=; b=DUTHU84BvjGS2TKyeNu5lZOz1p0n1zLm/b4QymAK0W7F1gQdwZjPjNgPQ0B5Spewp0 0x+xZd5hJaD46cDyjRGPbU1Rpyzz8yI9vINE9k6rUb6DeVhjkm7s5Hhm0ABW+p50ZwsK AWr+YAI9vQD7msHTSJuXV6KK56VAQboEw5KGpYnDv8fxIj4GnsJLjVSQGaxkezQl6Scu muyRwBp8yvgjedMvcy1yhtrfnpxht+OFXTaJFruyGMKTn4WzGSTO+NWSK85+bsBCfQK3 LpzTGYe+K871OggEhE7JFQK1InXhK6fyP/SlXmttds7FePnUzFKhPu2q21lVJyv1YrNp Yg9g== X-Forwarded-Encrypted: i=1; AJvYcCWuvUO5TeJTh5MkteJdXkrAktE7yVw7jD/EzdrOLsi9MVuDSrdTgrOhDuXNlOEPh8THXmQ/eCXlhe1dib5jn4+1H0TtDVdfs081ym8= X-Gm-Message-State: AOJu0Yxrc6pDif3KBOaWfdEmrapVgkqiUxcfCr3gQJipo7Lp4JPUH3jL juOJURpEhHyr7l5Jzdru7rxNvY+t6Nl2aTfXn8+4Ro3aGyNAWl5+GfYN27pdTw== X-Google-Smtp-Source: AGHT+IElHMEsqGGHpqcblsnwqqLDX7sT+d+kcozCrmBwpsokQJqPWqYJMIGR5jCeUabczgf3kJPYpw== X-Received: by 2002:a05:6214:5505:b0:6b0:3b5:17c9 with SMTP id 6a1803df08f44-6b030a3da36mr80057696d6.39.1717679850970; Thu, 06 Jun 2024 06:17:30 -0700 (PDT) Received: from denia.c.googlers.com (123.178.145.34.bc.googleusercontent.com. [34.145.178.123]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6b04f6607f5sm6118036d6.31.2024.06.06.06.17.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 06:17:30 -0700 (PDT) From: Ricardo Ribalda Date: Thu, 06 Jun 2024 13:16:36 +0000 Subject: [PATCH v4 02/11] media: venus: Remove unused structs Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240606-cocci-flexarray-v4-2-3379ee5eed28@chromium.org> References: <20240606-cocci-flexarray-v4-0-3379ee5eed28@chromium.org> In-Reply-To: <20240606-cocci-flexarray-v4-0-3379ee5eed28@chromium.org> To: Mauro Carvalho Chehab , Stanimir Varbanov , Vikash Garodia , Bryan O'Donoghue Cc: Hans Verkuil , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Ricardo Ribalda X-Mailer: b4 0.12.4 X-LSpam-Score: -3.6 (---) X-LSpam-Report: No, score=-3.6 required=5.0 tests=ARC_SIGNED=0.001,ARC_VALID=-0.1,BAYES_00=-1.9,DKIMWL_WL_HIGH=-1,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,DMARC_PASS=-0.001,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,SPF_HELO_NONE=0.001,SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no This structures are not used, and have a single element array at the end of them. Remove them. This fix the following cocci warnings: drivers/media/platform/qcom/venus/hfi_helper.h:764:5-15: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) drivers/media/platform/qcom/venus/hfi_helper.h:1041:5-15: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) drivers/media/platform/qcom/venus/hfi_helper.h:1088:39-51: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) drivers/media/platform/qcom/venus/hfi_helper.h:1093:5-22: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) drivers/media/platform/qcom/venus/hfi_helper.h:1144:4-8: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) drivers/media/platform/qcom/venus/hfi_helper.h:1239:4-8: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) drivers/media/platform/qcom/venus/hfi_helper.h:1272:4-13: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) drivers/media/platform/qcom/venus/hfi_cmds.h:85:5-16: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) drivers/media/platform/qcom/venus/hfi_cmds.h:180:5-9: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) drivers/media/platform/qcom/venus/hfi_cmds.h:189: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_cmds.h | 26 ----------------- drivers/media/platform/qcom/venus/hfi_helper.h | 39 -------------------------- 2 files changed, 65 deletions(-) diff --git a/drivers/media/platform/qcom/venus/hfi_cmds.h b/drivers/media/platform/qcom/venus/hfi_cmds.h index 20acd412ee7b..41f765eac4d9 100644 --- a/drivers/media/platform/qcom/venus/hfi_cmds.h +++ b/drivers/media/platform/qcom/venus/hfi_cmds.h @@ -77,14 +77,6 @@ struct hfi_sys_get_property_pkt { u32 data[1]; }; -struct hfi_sys_set_buffers_pkt { - struct hfi_pkt_hdr hdr; - u32 buffer_type; - u32 buffer_size; - u32 num_buffers; - u32 buffer_addr[1]; -}; - struct hfi_sys_ping_pkt { struct hfi_pkt_hdr hdr; u32 client_data; @@ -171,24 +163,6 @@ struct hfi_session_empty_buffer_uncompressed_plane0_pkt { u32 data[1]; }; -struct hfi_session_empty_buffer_uncompressed_plane1_pkt { - u32 flags; - u32 alloc_len; - u32 filled_len; - u32 offset; - u32 packet_buffer2; - u32 data[1]; -}; - -struct hfi_session_empty_buffer_uncompressed_plane2_pkt { - u32 flags; - u32 alloc_len; - u32 filled_len; - u32 offset; - u32 packet_buffer3; - u32 data[1]; -}; - struct hfi_session_fill_buffer_pkt { struct hfi_session_hdr_pkt shdr; u32 stream_id; diff --git a/drivers/media/platform/qcom/venus/hfi_helper.h b/drivers/media/platform/qcom/venus/hfi_helper.h index e4c05d62cfc7..7c0edef263ae 100644 --- a/drivers/media/platform/qcom/venus/hfi_helper.h +++ b/drivers/media/platform/qcom/venus/hfi_helper.h @@ -759,11 +759,6 @@ struct hfi_multi_stream_3x { u32 enable; }; -struct hfi_multi_view_format { - u32 views; - u32 view_order[1]; -}; - #define HFI_MULTI_SLICE_OFF 0x1 #define HFI_MULTI_SLICE_BY_MB_COUNT 0x2 #define HFI_MULTI_SLICE_BY_BYTE_COUNT 0x3 @@ -1036,11 +1031,6 @@ struct hfi_codec_supported { u32 enc_codecs; }; -struct hfi_properties_supported { - u32 num_properties; - u32 properties[1]; -}; - struct hfi_max_sessions_supported { u32 max_sessions; }; @@ -1083,16 +1073,6 @@ struct hfi_resource_ocmem_requirement { u32 size; }; -struct hfi_resource_ocmem_requirement_info { - u32 num_entries; - struct hfi_resource_ocmem_requirement requirements[1]; -}; - -struct hfi_property_sys_image_version_info_type { - u32 string_size; - u8 str_image_version[1]; -}; - struct hfi_codec_mask_supported { u32 codecs; u32 video_domains; @@ -1135,15 +1115,6 @@ struct hfi_index_extradata_config { u32 index_extra_data_id; }; -struct hfi_extradata_header { - u32 size; - u32 version; - u32 port_index; - u32 type; - u32 data_size; - u8 data[1]; -}; - struct hfi_batch_info { u32 input_batch_count; u32 output_batch_count; @@ -1234,11 +1205,6 @@ static inline void hfi_bufreq_set_count_min_host(struct hfi_buffer_requirements req->count_min = val; }; -struct hfi_data_payload { - u32 size; - u8 data[1]; -}; - struct hfi_enable_picture { u32 picture_type; }; @@ -1267,11 +1233,6 @@ struct hfi_buffer_alloc_mode_supported { u32 data[1]; }; -struct hfi_mb_error_map { - u32 error_map_size; - u8 error_map[1]; -}; - struct hfi_metadata_pass_through { int enable; u32 size; From patchwork Thu Jun 6 13:16:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 102245 X-Patchwork-Delegate: stanimir.varbanov@linaro.org Received: from sy.mirrors.kernel.org ([147.75.48.161]) by linuxtv.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1sFD0I-0007W8-1T for patchwork@linuxtv.org; Thu, 06 Jun 2024 13:18:07 +0000 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id D4C45B2280F for ; Thu, 6 Jun 2024 13:18:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D2C86196447; Thu, 6 Jun 2024 13:17:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="Q8dS9Jfh" X-Original-To: linux-media@vger.kernel.org Received: from mail-oo1-f50.google.com (mail-oo1-f50.google.com [209.85.161.50]) (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 24652195FD8 for ; Thu, 6 Jun 2024 13:17:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717679854; cv=none; b=lRPuYC34wmDLkz6JGsjLGLPUtfJ+0T7S1ORedVtyD1q17qZfmSZswPn001walIpO4HbhNcbac8loccWgROtMI5Ft7f4a2hELoak+T8EA2LEB5pF0jVgesNgoiGM5kgwM5qv8ZXebqhYlJoXFHDuFUVm36yDZc85BdVJHfovAR1M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717679854; c=relaxed/simple; bh=LKep9+SsMgXIw7N/wwAo5L/YSHeXN3o1qd6elsENQvg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=RzoMAd7afZ8G3kajg839NovOXyQw0XD421wH+vjrAp7YfSJ+qT8J5/h+4pLedpOSc2cSgOvKs7pbkiB2nERzuD4B5fbVPl/PLN8am/DvbE+Vj3yJVivXnGj3/3Jvt2E6Bx+tjr3qPcIDcnyt7u+Mfup2PRaMdynRS1TR5QYNnl0= 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=Q8dS9Jfh; arc=none smtp.client-ip=209.85.161.50 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-oo1-f50.google.com with SMTP id 006d021491bc7-5ba6859fb57so436122eaf.2 for ; Thu, 06 Jun 2024 06:17:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1717679852; x=1718284652; 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=bZZh27lvax1pQKtebKo1tSyfI2/RfGD2+tRBLkwHpFg=; b=Q8dS9JfhUN0JBhPQ2Pc+v0JQqNI9KiQVlEXPQ4YhjjMFO4vefxSidC2dXIJ2fMT41b 6rUYMQCj/lQSwE5Tmx6gtNRVdD4pkx7Hg5Ex9J8uuMl76DnLrYLyKPulvDvDWrkcFSQ9 WxbuomJvMde3Xv92dEN+InNMT0gFjt8sqnSd0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717679852; x=1718284652; 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=bZZh27lvax1pQKtebKo1tSyfI2/RfGD2+tRBLkwHpFg=; b=cT44I/4HjBuUneKpzH1NGUdH4zWbcUpoKutr6owYLjN5HBbG0wVDWocsaHImHneZ0j XIeUr31PwZDPOmYhvC3SzfWZDC8tcewW3CKLKUK4WA71n0wworTfYsqkPRMUsZhEDnKf upKKAV78rOfIKJgkSQmm5vWabYrEjMg+w0ovrtgWjdNALSSANIfcgHdJPzZ8r3w5/kPV GBrei+hM2IQYpZfgRm4OrpT2r+L6QZ+teLCv4n+ysSaliGVb182uMDJB3F/sTSoJBIj6 RbeKuZpVSkWgd1OHp5jVxWrWI1xwO6m47OjUGEJfSVAMm9QbfeNSRarT6Z8j7gF27IdB 9vFQ== X-Forwarded-Encrypted: i=1; AJvYcCVIn1HKXdzXicWv/5waiLB4nOajcqgyB3SAHbXK00z2Ixv6Ims94UKnaQA4tVw+Ia73Z8KEK8txMi9k43tKLn24pmlYS1F0zr0C64c= X-Gm-Message-State: AOJu0YxK+oLizoqJBm4I1zt7lC/A75ugrblW8NqaBIgBbnvYCT1/BK1d P1r+nQRObLiG6FphELR8CiMjOT032Daisx54C2rdNzjlMmB77eYJInqMKFvFsg== X-Google-Smtp-Source: AGHT+IGNI9HGZGYM1bs7kXBQ+Gzd7oXjy4+AygNfoD1Lq7a40uZ9nWHXC95xkS7mtZToVDJBYIlggA== X-Received: by 2002:a05:6358:9985:b0:19e:e402:4d17 with SMTP id e5c5f4694b2df-19ee4025007mr233623255d.7.1717679852165; Thu, 06 Jun 2024 06:17:32 -0700 (PDT) Received: from denia.c.googlers.com (123.178.145.34.bc.googleusercontent.com. [34.145.178.123]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6b04f6607f5sm6118036d6.31.2024.06.06.06.17.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 06:17:31 -0700 (PDT) From: Ricardo Ribalda Date: Thu, 06 Jun 2024 13:16:37 +0000 Subject: [PATCH v4 03/11] media: venus: Use flex array for hfi_session_release_buffer_pkt Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240606-cocci-flexarray-v4-3-3379ee5eed28@chromium.org> References: <20240606-cocci-flexarray-v4-0-3379ee5eed28@chromium.org> In-Reply-To: <20240606-cocci-flexarray-v4-0-3379ee5eed28@chromium.org> To: Mauro Carvalho Chehab , Stanimir Varbanov , Vikash Garodia , Bryan O'Donoghue Cc: Hans Verkuil , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Ricardo Ribalda X-Mailer: b4 0.12.4 X-LSpam-Score: -3.6 (---) X-LSpam-Report: No, score=-3.6 required=5.0 tests=ARC_SIGNED=0.001,ARC_VALID=-0.1,BAYES_00=-1.9,DKIMWL_WL_HIGH=-1,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,DMARC_PASS=-0.001,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,SPF_HELO_NONE=0.001,SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no Replace the old style single element array with a flex array. We do not allocate this structure, so the size change should not be an issue. This fixes the following cocci warning: drivers/media/platform/qcom/venus/hfi_cmds.h:204:5-16: 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_cmds.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/qcom/venus/hfi_cmds.h b/drivers/media/platform/qcom/venus/hfi_cmds.h index 41f765eac4d9..6dff949c4402 100644 --- a/drivers/media/platform/qcom/venus/hfi_cmds.h +++ b/drivers/media/platform/qcom/venus/hfi_cmds.h @@ -201,7 +201,7 @@ struct hfi_session_release_buffer_pkt { u32 extradata_size; u32 response_req; u32 num_buffers; - u32 buffer_info[1]; + u32 buffer_info[]; }; struct hfi_session_release_resources_pkt { From patchwork Thu Jun 6 13:16:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 102246 X-Patchwork-Delegate: stanimir.varbanov@linaro.org Received: from sy.mirrors.kernel.org ([147.75.48.161]) by linuxtv.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1sFD0q-0007Wi-12 for patchwork@linuxtv.org; Thu, 06 Jun 2024 13:18:41 +0000 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 9546EB23993 for ; Thu, 6 Jun 2024 13:18:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E4B36196D93; Thu, 6 Jun 2024 13:17:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="k0x+fHDm" X-Original-To: linux-media@vger.kernel.org Received: from mail-qv1-f47.google.com (mail-qv1-f47.google.com [209.85.219.47]) (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 1D736196457 for ; Thu, 6 Jun 2024 13:17:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717679856; cv=none; b=DKOyk7O6IuRn5b3aEjdq/0dEFzp3VsDcBSyzF1Nz+MMU5EPYiM56myBcvqyIzW2mlwmB8epUTvMklmClnGa4oUELSJjamFPm1Jro1VcCD/RM0atRFl8lQg34ICTGzmtrMoLbKQ+u5FqrX9+sFA7b5KdvEBiCur7twvEuVQxCxyc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717679856; c=relaxed/simple; bh=0b1zuE1MbEB0QXjShSrW/hvbjBrNrmRe+hDcjTlyO2c=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=duPbTtYdX/jo7iGjubCoiBZRAbFkJ/LEX516f7bsX8OKSJnMO1LgBwghnw6LL10+ONLIlPSbGy3RRtW0dI5nx9FG7VxbAq7iPbL2GC5faAk+R5x1ncwytcRlv0sq/zv1PKkcKRWghRQV1eFgszrazhw1k+RYOKpmftBi+QGza4A= 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=k0x+fHDm; arc=none smtp.client-ip=209.85.219.47 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-qv1-f47.google.com with SMTP id 6a1803df08f44-6ae1b32752aso4737816d6.0 for ; Thu, 06 Jun 2024 06:17:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1717679854; x=1718284654; 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=6CC1kPEM1QEeXV+54pCQUERgeWC6whHxHJCePKioCow=; b=k0x+fHDmaHogDzg/tqEzGFmB29TaGllQUFT4vOGuoemJaQNuXGtFFcy9MdMXxRXNr1 EZL3UcgEGUCSAP/6oVI2nR5A6VtbyuokqZ36xdLa7lCHb4hKjwPNXQ8FvSqTyiRYkSyD Ok8HuHcsp3My3anUOmD3hmZlSWadiUPPXBA1g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717679854; x=1718284654; 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=6CC1kPEM1QEeXV+54pCQUERgeWC6whHxHJCePKioCow=; b=CB6sSjzCo1WmIgijMJKRBa62JX4ZyBUGQ1cL0bcaaxMrWA2JgHwAZOJWjLfLGL0aFx Zjz1XtInlfN+PuV27MkN3ZCrjhjBmfTgUuhKs4ewzQ29J/AmHE5K2RLHBdW8f7QCaLbI Pxy7++gOMqWvClzsJCko3l8eNVgrQA8lcsqKXF4q88e+gRF4E3meDRzpEokdARAsK/u+ M1/ipLS2SAHI10tRyfCHmi5rXMa05OcNHzOBt1hHDuZujl/u6LFE76MucIFAnbefQ6R2 q3BsUtzjxo5oA4BPuZyVOUOpMD5cbp7bb5ujfzCAEUSKcV0yN0kZ3kfFG1wmWNE4y7VR ciNQ== X-Forwarded-Encrypted: i=1; AJvYcCXVF7EYOhgj0ykgkdmgRt/pU+3ad5hcJPHsSuFCdl2xOtQ4mH164f6DoyDcel0rhykstfupxwK/1cKLLZzsN8aSi42McJceLXQN4ys= X-Gm-Message-State: AOJu0YxGQ+hky59KbI8gw71W+7OPi0snsqQ0da4g44TvoqGRDQ2ZU/If zmbhMznmXrSX5MAeklwZB0RAJKBQmKXX2y1xRrVXJ47+3YEfFnnDSY5zna4tIg== X-Google-Smtp-Source: AGHT+IGbbRegP2RzDH+X9svE133yMQUWHCvloWmhh0XtejpJh8/fXunC7mYI78Zn+Xm9usjDEMhazw== X-Received: by 2002:a05:6214:5d81:b0:6af:31cd:f1a3 with SMTP id 6a1803df08f44-6b02bf87f4dmr58276916d6.27.1717679853817; Thu, 06 Jun 2024 06:17:33 -0700 (PDT) Received: from denia.c.googlers.com (123.178.145.34.bc.googleusercontent.com. [34.145.178.123]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6b04f6607f5sm6118036d6.31.2024.06.06.06.17.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 06:17:32 -0700 (PDT) From: Ricardo Ribalda Date: Thu, 06 Jun 2024 13:16:38 +0000 Subject: [PATCH v4 04/11] media: venus: Refactor struct hfi_uncompressed_plane_info Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240606-cocci-flexarray-v4-4-3379ee5eed28@chromium.org> References: <20240606-cocci-flexarray-v4-0-3379ee5eed28@chromium.org> In-Reply-To: <20240606-cocci-flexarray-v4-0-3379ee5eed28@chromium.org> To: Mauro Carvalho Chehab , Stanimir Varbanov , Vikash Garodia , Bryan O'Donoghue Cc: Hans Verkuil , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Ricardo Ribalda X-Mailer: b4 0.12.4 X-LSpam-Score: -3.6 (---) X-LSpam-Report: No, score=-3.6 required=5.0 tests=ARC_SIGNED=0.001,ARC_VALID=-0.1,BAYES_00=-1.9,DKIMWL_WL_HIGH=-1,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,DMARC_PASS=-0.001,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,SPF_HELO_NONE=0.001,SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no This field is never used, but if we remove it we would change the size of the struct and can lead to behavior change. Stay on the safe side by replacing the single element array with a single element field. This fixes the following cocci warning: drivers/media/platform/qcom/venus/hfi_helper.h:1003:43-60: 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 Reviewed-by: Bryan O'Donoghue --- 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 7c0edef263ae..eb0a4c64b7ef 100644 --- a/drivers/media/platform/qcom/venus/hfi_helper.h +++ b/drivers/media/platform/qcom/venus/hfi_helper.h @@ -1000,7 +1000,7 @@ struct hfi_uncompressed_plane_constraints { struct hfi_uncompressed_plane_info { u32 format; u32 num_planes; - struct hfi_uncompressed_plane_constraints plane_constraints[1]; + struct hfi_uncompressed_plane_constraints plane_constraints; }; struct hfi_uncompressed_format_supported { From patchwork Thu Jun 6 13:16:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 102247 X-Patchwork-Delegate: stanimir.varbanov@linaro.org Received: from ny.mirrors.kernel.org ([147.75.199.223]) by linuxtv.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1sFD1N-0007Xl-21 for patchwork@linuxtv.org; Thu, 06 Jun 2024 13:19:14 +0000 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 8602F1C25337 for ; Thu, 6 Jun 2024 13:19:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9431319751A; Thu, 6 Jun 2024 13:17:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="UkKa/XJl" X-Original-To: linux-media@vger.kernel.org Received: from mail-qv1-f41.google.com (mail-qv1-f41.google.com [209.85.219.41]) (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 D26AB196C7B for ; Thu, 6 Jun 2024 13:17:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717679858; cv=none; b=FHYaii8zLkuQt4T7CLkg5sW/GAh4+5iXiB/08RtecuqRksz9FzDnOwteKFzI7+EpdeFyzXSvKEMy1dgX16D0Onj9Oo5aw9nbTp9SZYQ8ROVIqRK42eCeFp0VC54qd1qqOF7DssTcyuJwtDx4IzDucJbjyGLJpNBM1No6CJWN0k0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717679858; c=relaxed/simple; bh=q/yIjMSqnXj8v7L7GkQC3K27otk7HPW5heUqxBmLTVc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=PMbt29kIKx6GL0nVeW2V7T37TgLvLjHQD4FkKnQgApobD9ymoSXVXp91NoZlpSVELUTnAfTREs+DRDOvbUiDfcDc0ljZbJXF09mHWsTlhw1pn6JJsNed+UG/W9acDQo7QO2ctSX6Pj584849H+cnS8bF1nzorUIaU3Vm4D6S9cw= 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=UkKa/XJl; arc=none smtp.client-ip=209.85.219.41 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-qv1-f41.google.com with SMTP id 6a1803df08f44-6af27d0c9f8so4471506d6.2 for ; Thu, 06 Jun 2024 06:17:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1717679855; x=1718284655; 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=e2AAUOSqY0VuuUiDfECnNkpzmbnAcXOGiikRuWRSAa4=; b=UkKa/XJlLcI5Ssyawo/sbucMPb9oT0FmCygLPm740rx/AcjqYX++l6CaF6nYEkSLZ4 CyxYLm0jWtaboiQXA4KL+w62uvipVV1pstDxFK/us1gRV12IDaLlj8k1OqSp3MWfu8nv Q4WdCbzl9rY85sr8hcO18Mq/E5nB1v0P46+RI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717679855; x=1718284655; 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=e2AAUOSqY0VuuUiDfECnNkpzmbnAcXOGiikRuWRSAa4=; b=ttZbttqoUOcSVuk7U5pdoMu68LYpWUJJWpxzhgzpb2auX+l8h62R1/ntIEWRg/fwF7 S82w/AvLAHMPS2quEfS4etOfwWZBWsNVZUk2+sQMmyIVqN6kSpa8I9Zzkp3Pkf97yx/u 7KtYSOIHn8+KzvPjsLcuar2daMQhiI6XTC+Jhw8F6oGh95myz/8RSu17Rh2uXY056vXl GNjDh2yQzwkLgJsfgNLyxVYYnBwJcM5D6JGWFzCgPPBN8M5hurPvNI1wUEvFjE1XDvTA OKATGCM/5inwdr+TIkM7/bd+dttJE4ojLoADVOkq8+edTQluajVT4Lhj0n2+YP0lSvcC FELQ== X-Forwarded-Encrypted: i=1; AJvYcCWaIAbIdAYoMsvswTwvTaksxPYlyrkH3F5pmf4DhxwqfXcrdK6CZzmTdf0ShBX2etLQmKLVl07/UK4d1hVWFR3F6h+eDas5b+rK0hM= X-Gm-Message-State: AOJu0YxO1j8wg6adsKVou4KTUMvL2OEl+MhyRnhDDlHJwnJsX4iwzh4A l9VQ3WaW07Ss8c0Fo2Id1N47q9uEpO4S805wSt+jaz++CGSsUOJqXZ/15Y+r/A== X-Google-Smtp-Source: AGHT+IF2SHvoVvYn/P2leNQvN1o8bRfjg6tCknHvek81SGWfjCxGxX7kcfXDgqQa2sakPR4YvGy8vg== X-Received: by 2002:a05:6214:3d8b:b0:6a9:b253:58d5 with SMTP id 6a1803df08f44-6b02bf1eb0amr54587866d6.17.1717679854725; Thu, 06 Jun 2024 06:17:34 -0700 (PDT) Received: from denia.c.googlers.com (123.178.145.34.bc.googleusercontent.com. [34.145.178.123]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6b04f6607f5sm6118036d6.31.2024.06.06.06.17.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 06:17:34 -0700 (PDT) From: Ricardo Ribalda Date: Thu, 06 Jun 2024 13:16:39 +0000 Subject: [PATCH v4 05/11] media: venus: Refactor struct hfi_session_get_property_pkt Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240606-cocci-flexarray-v4-5-3379ee5eed28@chromium.org> References: <20240606-cocci-flexarray-v4-0-3379ee5eed28@chromium.org> In-Reply-To: <20240606-cocci-flexarray-v4-0-3379ee5eed28@chromium.org> To: Mauro Carvalho Chehab , Stanimir Varbanov , Vikash Garodia , Bryan O'Donoghue Cc: Hans Verkuil , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Ricardo Ribalda X-Mailer: b4 0.12.4 X-LSpam-Score: -3.6 (---) X-LSpam-Report: No, score=-3.6 required=5.0 tests=ARC_SIGNED=0.001,ARC_VALID=-0.1,BAYES_00=-1.9,DKIMWL_WL_HIGH=-1,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,DMARC_PASS=-0.001,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,SPF_HELO_NONE=0.001,SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no The struct hfi_session_get_property_pkt is always used to fectch a single property. Make that explicit in the code and avoid a single element array at the end of the struct. This change fixes the following cocci warning: drivers/media/platform/qcom/venus/hfi_cmds.h:194:5-9: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) Reviewed-by: Bryan O'Donoghue Signed-off-by: Ricardo Ribalda --- drivers/media/platform/qcom/venus/hfi_cmds.c | 4 ++-- drivers/media/platform/qcom/venus/hfi_cmds.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/qcom/venus/hfi_cmds.c b/drivers/media/platform/qcom/venus/hfi_cmds.c index 3418d2dd9371..75f4a3d3e748 100644 --- a/drivers/media/platform/qcom/venus/hfi_cmds.c +++ b/drivers/media/platform/qcom/venus/hfi_cmds.c @@ -402,7 +402,7 @@ static int pkt_session_get_property_1x(struct hfi_session_get_property_pkt *pkt, pkt->shdr.hdr.pkt_type = HFI_CMD_SESSION_GET_PROPERTY; pkt->shdr.session_id = hash32_ptr(cookie); pkt->num_properties = 1; - pkt->data[0] = ptype; + pkt->data = ptype; return 0; } @@ -1110,7 +1110,7 @@ pkt_session_get_property_3xx(struct hfi_session_get_property_pkt *pkt, switch (ptype) { case HFI_PROPERTY_CONFIG_VDEC_ENTROPY: - pkt->data[0] = HFI_PROPERTY_CONFIG_VDEC_ENTROPY; + pkt->data = HFI_PROPERTY_CONFIG_VDEC_ENTROPY; break; default: ret = pkt_session_get_property_1x(pkt, cookie, ptype); diff --git a/drivers/media/platform/qcom/venus/hfi_cmds.h b/drivers/media/platform/qcom/venus/hfi_cmds.h index 6dff949c4402..f5708fdfb197 100644 --- a/drivers/media/platform/qcom/venus/hfi_cmds.h +++ b/drivers/media/platform/qcom/venus/hfi_cmds.h @@ -191,7 +191,7 @@ struct hfi_session_resume_pkt { struct hfi_session_get_property_pkt { struct hfi_session_hdr_pkt shdr; u32 num_properties; - u32 data[1]; + u32 data; }; struct hfi_session_release_buffer_pkt { From patchwork Thu Jun 6 13:16:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 102248 X-Patchwork-Delegate: stanimir.varbanov@linaro.org Received: from ny.mirrors.kernel.org ([147.75.199.223]) by linuxtv.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1sFD1s-0007Yf-1D for patchwork@linuxtv.org; Thu, 06 Jun 2024 13:19:45 +0000 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id CD4701C231B0 for ; Thu, 6 Jun 2024 13:19:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 02E18196C7C; Thu, 6 Jun 2024 13:17:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="Hz5QRfdb" X-Original-To: linux-media@vger.kernel.org Received: from mail-qv1-f50.google.com (mail-qv1-f50.google.com [209.85.219.50]) (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 BA5051974E3 for ; Thu, 6 Jun 2024 13:17:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717679860; cv=none; b=AIRUesVkRG8/++E2cC+XGl/X8orsbM67DkhDt4TCygK4Ea2ANC5S2OU751f+uh5bH7d3vS+rbclBeEIQYtL6WtugK9xzNLChQfBgL5KW3ziai5zB+isA7Oc/nDIlHE45Av8ipRY7keAZOXghRUacTfa/QooPmCiQVtKtAoZr1CU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717679860; c=relaxed/simple; bh=eSS6CFxpjOrEMCtb9xmg56c0gCLfaI7dITUwdjRcSbo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=EadpLDnHuA29yVhK34wCUrFZGDd5DemqyV3HAbEK/wrK6COCJFjFXzyO6vEp53EO9jztcMj/FM4pxzMeIqSEby1b9t+QRQoEjQ9Q9+CyuX6uE/GEXC1Fr1ci2r11cxw5cNQCMI/u/jh62Wozf1fL/kh/OPU7eXvkLvxmnbSAOoE= 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=Hz5QRfdb; arc=none smtp.client-ip=209.85.219.50 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-qv1-f50.google.com with SMTP id 6a1803df08f44-6ae2e6dba36so5067606d6.3 for ; Thu, 06 Jun 2024 06:17:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1717679857; x=1718284657; 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=iAc0af9hq9pueFWwvpNqs+gjxvVge6a6O9DHrtQZV0s=; b=Hz5QRfdbzej5QLlbrWvb4i+VPuU2IgPOnLuFxX7frGcuhbkT9mZy3FbM35RiBVoJIv 7zeEOd/K0SSh/F0Vaeb8eQOq77+5ef6L8xe2HOYFsGB7hcgUHaSRVw5T6ru9QvcDGFHz m8FvAIrqdJkP8dyR1Qo6oJuLOWyFLcxWsewKE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717679857; x=1718284657; 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=iAc0af9hq9pueFWwvpNqs+gjxvVge6a6O9DHrtQZV0s=; b=MY9UUP6vfJH/6ut/KX2SyFlQic773nJ5/1gvS+DlMssQX7gEHHT6WBiArOPd4A25k1 Oky4v+r1VK+O1qJgqxIDr9wZEYhErqNUutO8hw9lStscnxrg7FRFgA37ce/+Wlc8KKTy +3KK1FGGUcI6khMptJWVSDx34SN1xBLTpO9DtIOlFYmgN+VR3W1qdzIN9Trp4cQ0idwo TefXZD1kWVYVLe8IrIvixVshPBJRLhzy0sN8uY35n6LxuC+8w0ScYFnso2viEGis4PQS x0e74E9qWFNpS5DtqGb3AfeSF9/0uYEGgnHru6RCJMWMgXeeiXvG1QscbON+sTzfiv1O 6hiA== X-Forwarded-Encrypted: i=1; AJvYcCWIZpAOK5X8nV00m1DZRdMBEITQGtO8kosXDMQMYh1Ansj2m72zLG4Agc91Ga+/hw7YaI1HVfLm++TAT70HXJUjqvd7U8rmJUyKgI4= X-Gm-Message-State: AOJu0YxWf7yMpsskWtaOJRPq0tySbqu4GnyapvtnEfaVf7JussMmdhwg aEiy728GUQm+bVNQdrwypAKqal7C7RntPTCG2pbEslckLc00eKmQmkrcc76F2g== X-Google-Smtp-Source: AGHT+IEJIOJiyMJDDmMHLc74buNW9eEFQjpvgj2J4ah7/DbHCd2DHUJMyDhfPoLk1ARALTqqXFgIww== X-Received: by 2002:a05:6214:451e:b0:6af:5af5:cf63 with SMTP id 6a1803df08f44-6b020320c3emr73595046d6.1.1717679856728; Thu, 06 Jun 2024 06:17:36 -0700 (PDT) Received: from denia.c.googlers.com (123.178.145.34.bc.googleusercontent.com. [34.145.178.123]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6b04f6607f5sm6118036d6.31.2024.06.06.06.17.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 06:17:35 -0700 (PDT) From: Ricardo Ribalda Date: Thu, 06 Jun 2024 13:16:40 +0000 Subject: [PATCH v4 06/11] media: venus: Refactor struct hfi_uncompressed_format_supported Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240606-cocci-flexarray-v4-6-3379ee5eed28@chromium.org> References: <20240606-cocci-flexarray-v4-0-3379ee5eed28@chromium.org> In-Reply-To: <20240606-cocci-flexarray-v4-0-3379ee5eed28@chromium.org> To: Mauro Carvalho Chehab , Stanimir Varbanov , Vikash Garodia , Bryan O'Donoghue Cc: Hans Verkuil , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Ricardo Ribalda X-Mailer: b4 0.12.4 X-LSpam-Score: -3.6 (---) X-LSpam-Report: No, score=-3.6 required=5.0 tests=ARC_SIGNED=0.001,ARC_VALID=-0.1,BAYES_00=-1.9,DKIMWL_WL_HIGH=-1,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,DMARC_PASS=-0.001,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,SPF_HELO_NONE=0.001,SPF_PASS=-0.001 autolearn=ham autolearn_force=no plane_info is not a typical array, the data is not contiguous: pinfo = (void *)pinfo + sizeof(*constr) * num_planes + 2 * sizeof(u32); Replace the single element array with a single element field. This fixes the following cocci warning: drivers/media/platform/qcom/venus/hfi_helper.h:1009:36-46: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) Reviewed-by: Bryan O'Donoghue Signed-off-by: Ricardo Ribalda --- drivers/media/platform/qcom/venus/hfi_helper.h | 2 +- drivers/media/platform/qcom/venus/hfi_parser.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/qcom/venus/hfi_helper.h b/drivers/media/platform/qcom/venus/hfi_helper.h index eb0a4c64b7ef..dee439ea4d2e 100644 --- a/drivers/media/platform/qcom/venus/hfi_helper.h +++ b/drivers/media/platform/qcom/venus/hfi_helper.h @@ -1006,7 +1006,7 @@ struct hfi_uncompressed_plane_info { struct hfi_uncompressed_format_supported { u32 buffer_type; u32 format_entries; - struct hfi_uncompressed_plane_info plane_info[1]; + struct hfi_uncompressed_plane_info plane_info; }; struct hfi_uncompressed_plane_actual { diff --git a/drivers/media/platform/qcom/venus/hfi_parser.c b/drivers/media/platform/qcom/venus/hfi_parser.c index c43839539d4d..3df241dc3a11 100644 --- a/drivers/media/platform/qcom/venus/hfi_parser.c +++ b/drivers/media/platform/qcom/venus/hfi_parser.c @@ -157,7 +157,7 @@ static void parse_raw_formats(struct venus_core *core, u32 codecs, u32 domain, void *data) { struct hfi_uncompressed_format_supported *fmt = data; - struct hfi_uncompressed_plane_info *pinfo = fmt->plane_info; + struct hfi_uncompressed_plane_info *pinfo = &fmt->plane_info; struct hfi_uncompressed_plane_constraints *constr; struct raw_formats rawfmts[MAX_FMT_ENTRIES] = {}; u32 entries = fmt->format_entries; From patchwork Thu Jun 6 13:16:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 102249 X-Patchwork-Delegate: stanimir.varbanov@linaro.org Received: from ny.mirrors.kernel.org ([147.75.199.223]) by linuxtv.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1sFD1w-0007ZE-18 for patchwork@linuxtv.org; Thu, 06 Jun 2024 13:19:49 +0000 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 76EE01C21EE9 for ; Thu, 6 Jun 2024 13:19:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 26D83197A64; Thu, 6 Jun 2024 13:17:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="ntd/dDPP" X-Original-To: linux-media@vger.kernel.org Received: from mail-qv1-f54.google.com (mail-qv1-f54.google.com [209.85.219.54]) (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 6B6D1197536 for ; Thu, 6 Jun 2024 13:17:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717679860; cv=none; b=hXq7hY3yUQPsb0a3osFWOblfhKOFZBaJSaeLEU5t5ATSdH8PKfmIEcv/iqnj/7H5ItWn6OSnV/Afgp/AxVwKyQCZswjCjPvPv6tsuHkcnQFVTYZwWBS7twEHg773P9F7BrTka8LMSIoaCigVmGmQlsGDNdzF4E4EjmGGODGBfTc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717679860; c=relaxed/simple; bh=rr+ZAD9eEY9wxQwSyBHAujNTY1n691T+07WEbe4AI+g=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=F1gr8oqRaZRcU1lO6iHx7niMIlVqFxtUuEJ+8QHZFwBHDM/5VGdYeeR7KppMqVLuyznIWy5egfM/IDlqHUPlh2MfCJXSn6zhaNsycOasx4n9BMV7ArWprTd7E9RG5j9kghoWxmyvlHodneMS/hho1um6CUE7kOzeKr8WUUjFX4s= 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=ntd/dDPP; arc=none smtp.client-ip=209.85.219.54 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-qv1-f54.google.com with SMTP id 6a1803df08f44-6ae1b32752fso5008606d6.0 for ; Thu, 06 Jun 2024 06:17:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1717679858; x=1718284658; 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=rV++zhXkLm63xkLNQev5FMXGRPhSAuf2+6p1s7sOLOM=; b=ntd/dDPPjOuAXrysYvbBo83QdWpNwlilfdrgAUQYRbdE0RAfoenU+qfyECYt2/kU5r 4TStcYC0Gs8kNraSTw6Fie4A8jMmytxs6UO4DHIJDDCdQgKIsqfClLQkP6jtmko+q/OV A73vOxGemKnuZQYGGsJ8PrIZ3h6uygmC/JDOU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717679858; x=1718284658; 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=rV++zhXkLm63xkLNQev5FMXGRPhSAuf2+6p1s7sOLOM=; b=NQQ9FvRhQJLoKOw9Itt6tgCXXHpQKPMAeVE72TSIFWb58Hd/kSppweus2WEwzCFmVS Dk4yoxHKy05ydtnTUFRyb3nhNNM7s1DiXexUmIfn4XGS6kPER1eg1rDdpp9giChJVHmx wc91hGGdTuD0Sy+/MwOj6BRxgdZSpqycE6/+3o2VFUGB+G+dqkPi3CJeBAzyvq8PTcjS lxMLz2j3Dd6vktvnxbEvq5DIFlX+dUPFbwitFJAaZ/+XZ6wrpmn6OfSW38BrA4BdY0au IdAk7OcdjCyW9xUxgdfG1hiIJHBiaVkxAiIi07Ex0PA5tjlqoo4Zwkv83GeSnzjwR2dz 0/kQ== X-Forwarded-Encrypted: i=1; AJvYcCUPSmFYtZkkIKGTnNQeURTp1B2ZJc6mGywHwWlNPuNOcVLQJFnkru7Pz1ykCKCUnZKYH2mnzQELttfXiTDGWpgrMRuOcLpi+iY8Yg0= X-Gm-Message-State: AOJu0YwS1O3SXykVUUvOL6YJCSusuFqZ/bg+0VR8pmdIj1zEX4tKs29y iQ0PtbybFWyaeH4zr/b06+gSbNa1ZBL7TXjzFm9/7kRckKVIFcO2QyhU189Umg== X-Google-Smtp-Source: AGHT+IFEbhMVQzLzMehFBZ5O1a5UQYgBDvAL87jiyZxeXK49H/vAmDrzba4DetgTJ+cq2bB+dcgNzQ== X-Received: by 2002:a05:6214:3c8e:b0:6af:b8b3:338e with SMTP id 6a1803df08f44-6b04aeb2647mr34544096d6.53.1717679857474; Thu, 06 Jun 2024 06:17:37 -0700 (PDT) Received: from denia.c.googlers.com (123.178.145.34.bc.googleusercontent.com. [34.145.178.123]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6b04f6607f5sm6118036d6.31.2024.06.06.06.17.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 06:17:37 -0700 (PDT) From: Ricardo Ribalda Date: Thu, 06 Jun 2024 13:16:41 +0000 Subject: [PATCH v4 07/11] media: venus: Refactor hfi_session_empty_buffer_uncompressed_plane0_pkt Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240606-cocci-flexarray-v4-7-3379ee5eed28@chromium.org> References: <20240606-cocci-flexarray-v4-0-3379ee5eed28@chromium.org> In-Reply-To: <20240606-cocci-flexarray-v4-0-3379ee5eed28@chromium.org> To: Mauro Carvalho Chehab , Stanimir Varbanov , Vikash Garodia , Bryan O'Donoghue Cc: Hans Verkuil , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Ricardo Ribalda X-Mailer: b4 0.12.4 X-LSpam-Score: -3.6 (---) X-LSpam-Report: No, score=-3.6 required=5.0 tests=ARC_SIGNED=0.001,ARC_VALID=-0.1,BAYES_00=-1.9,DKIMWL_WL_HIGH=-1,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,DMARC_PASS=-0.001,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,SPF_HELO_NONE=0.001,SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no The single element array data[1] is never used. Replace it whit a padding field of the same size. This fixes the following cocci error: drivers/media/platform/qcom/venus/hfi_cmds.h:163: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_cmds.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/qcom/venus/hfi_cmds.h b/drivers/media/platform/qcom/venus/hfi_cmds.h index f5708fdfb197..8768ee052adc 100644 --- a/drivers/media/platform/qcom/venus/hfi_cmds.h +++ b/drivers/media/platform/qcom/venus/hfi_cmds.h @@ -160,7 +160,7 @@ struct hfi_session_empty_buffer_uncompressed_plane0_pkt { u32 input_tag; u32 packet_buffer; u32 extradata_buffer; - u32 data[1]; + u32 data; }; struct hfi_session_fill_buffer_pkt { From patchwork Thu Jun 6 13:16:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 102252 X-Patchwork-Delegate: stanimir.varbanov@linaro.org Received: from sy.mirrors.kernel.org ([147.75.48.161]) by linuxtv.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1sFD2v-0007bZ-1F for patchwork@linuxtv.org; Thu, 06 Jun 2024 13:20:50 +0000 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id D9323B251B9 for ; Thu, 6 Jun 2024 13:20:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 675A3198A2E; Thu, 6 Jun 2024 13:17:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="DjjfF8dT" X-Original-To: linux-media@vger.kernel.org Received: from mail-ot1-f45.google.com (mail-ot1-f45.google.com [209.85.210.45]) (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 1823519755E for ; Thu, 6 Jun 2024 13:17:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717679865; cv=none; b=Po22JXo3aj+euP/icOlbCv3mXZznTbTKJPTwBw/dVTFHV8hh76khkcP4UhcZ3L2CAhlpGXAimO8LtHNY6EEXK6L94TEAn/mJtr/fKvHTTlSgvlZOoLTjbn3aF3puxKxrTGvmRWkSG/Vslve/KhBcd3MeqyA0hdaK+hq8wVoUabQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717679865; c=relaxed/simple; bh=uRrwC8FD53XE8snF88MCg3YmB4JlgvZCoOrRUf+Aarg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=DK4oeeqZ5OdiulprxM8h4yfOurk95qXttrAqElc7ytz8Tg04wEFgEeQRpeFo1odSeSwxKeSDDvvOgkJipvnH16x/AWSTcnIyaWD4AXxV+EF8t4kr0PlFR/geNmu07tRg6heC7NCbPFy0gc+AUR95BMoKgZGVpAiXLfbjc2siRPU= 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=DjjfF8dT; arc=none smtp.client-ip=209.85.210.45 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-ot1-f45.google.com with SMTP id 46e09a7af769-6f952906314so171123a34.0 for ; Thu, 06 Jun 2024 06:17:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1717679860; x=1718284660; 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=6VGhOi0hNkAMdTQTUdauz7KIyv6SLUrF14jCtpe3Zco=; b=DjjfF8dTX6CwRsYinTcX+b0YEDptOW/hHDl897jSdewsymydisNcuYARPQ9UEVMvjC ix1XdM/e8qrCtSzoO2SHQ8uBWpwyLQUt+oBc0lzeuW9YDrJvjiEs7px100wjZ+XMn7YF lUlVn1HBIpgMoTTJ8Vi1nCz20SIIAEOE9bIZI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717679860; x=1718284660; 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=6VGhOi0hNkAMdTQTUdauz7KIyv6SLUrF14jCtpe3Zco=; b=SAcA03U0Dyl232rLBrUi8IzdI9k/V0EgGm+AtpiOBey1ox3+TsaS9Fbk8YGVr5fHe9 s1y5JExK9vQC/L2enymcafGjABWaj9+s+Ah+pOxBWRnFQ1eL7BT8Ok2zKzRj77Badkdy 4CbfcV5ZJf1/7ykJ8CZZ7Xb1jDmL4PuYyRyzZ5H3JN0KJYtdPyuqHaI9gQ/qdYeB+LcF 4uf0o8JYozgF3eemnZlCHjt1nZOY1jqk0mJPVlQ2j0lpP7P0kmNSkGUghwZX3fnnfDEL WA42L0K23Gug/n+u3OonkD6BReJYfQcb2Kqo0L3lOPC4dfhgG3gxPF14bTw+yWSSKmy7 Cl3A== X-Forwarded-Encrypted: i=1; AJvYcCXFKRmhUfH+/Ld6RBDAlkCoStuY/T9PxphvELCX2mS6L6fiJhy1SkRaGlVUG7IN5jKUI2iTLiNtx1rBn/AUt8RD2vQTB4IbyabBJGc= X-Gm-Message-State: AOJu0YzZSsoROYiv0GjF/Jb50cOedox4Hk26qdgNjVP3rYwEe5wrjb+O QfWs9f9ly0UTNonx2EhsPfw5Qn9NwUz6q+cig45soyqvidwRgF5tfdsuGSr5XA== X-Google-Smtp-Source: AGHT+IFX9KGFgZD+xuwao+c++qZJRxYqYJVh/LsTI7EaXew+xbdJzstfPx2aof9T7S7zaI4fW+k32A== X-Received: by 2002:a05:6358:2908:b0:19c:45cc:e2c9 with SMTP id e5c5f4694b2df-19c69b89b75mr683604755d.7.1717679860105; Thu, 06 Jun 2024 06:17:40 -0700 (PDT) Received: from denia.c.googlers.com (123.178.145.34.bc.googleusercontent.com. [34.145.178.123]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6b04f6607f5sm6118036d6.31.2024.06.06.06.17.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 06:17:39 -0700 (PDT) From: Ricardo Ribalda Date: Thu, 06 Jun 2024 13:16:42 +0000 Subject: [PATCH v4 08/11] media: venus: Refactor hfi_session_empty_buffer_compressed_pkt Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240606-cocci-flexarray-v4-8-3379ee5eed28@chromium.org> References: <20240606-cocci-flexarray-v4-0-3379ee5eed28@chromium.org> In-Reply-To: <20240606-cocci-flexarray-v4-0-3379ee5eed28@chromium.org> To: Mauro Carvalho Chehab , Stanimir Varbanov , Vikash Garodia , Bryan O'Donoghue Cc: Hans Verkuil , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Ricardo Ribalda X-Mailer: b4 0.12.4 X-LSpam-Score: -3.6 (---) X-LSpam-Report: No, score=-3.6 required=5.0 tests=ARC_SIGNED=0.001,ARC_VALID=-0.1,BAYES_00=-1.9,DKIMWL_WL_HIGH=-1,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,DMARC_PASS=-0.001,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,SPF_HELO_NONE=0.001,SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no The single element array data[1] is never used. Replace it with a padding field of the same size. This fixes the following cocci warning: drivers/media/platform/qcom/venus/hfi_cmds.h:146: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 Reviewed-by: Bryan O'Donoghue --- drivers/media/platform/qcom/venus/hfi_cmds.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/qcom/venus/hfi_cmds.h b/drivers/media/platform/qcom/venus/hfi_cmds.h index 8768ee052adc..2c56ae303989 100644 --- a/drivers/media/platform/qcom/venus/hfi_cmds.h +++ b/drivers/media/platform/qcom/venus/hfi_cmds.h @@ -143,7 +143,7 @@ struct hfi_session_empty_buffer_compressed_pkt { u32 input_tag; u32 packet_buffer; u32 extradata_buffer; - u32 data[1]; + u32 data; }; struct hfi_session_empty_buffer_uncompressed_plane0_pkt { From patchwork Thu Jun 6 13:16:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 102250 X-Patchwork-Delegate: stanimir.varbanov@linaro.org Received: from am.mirrors.kernel.org ([147.75.80.249]) by linuxtv.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1sFD2T-0007a8-0n for patchwork@linuxtv.org; Thu, 06 Jun 2024 13:20:21 +0000 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 4A2D81F217DC for ; Thu, 6 Jun 2024 13:20:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EBAAF198833; Thu, 6 Jun 2024 13:17:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="hBvkXsXa" X-Original-To: linux-media@vger.kernel.org Received: from mail-qt1-f171.google.com (mail-qt1-f171.google.com [209.85.160.171]) (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 3BE55197A85 for ; Thu, 6 Jun 2024 13:17:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717679863; cv=none; b=BC50A08ZIHlORrd73ubne7dCsw8lU3P/eLtjs3C2qNuzIxmHKIdMsGD9hGQ8sTsmThIK/1E9n/bHJrW2zZgVgoTCWxb8IdE3pTiZzq1Ce/XNvXAVgc/Ci3KkyWGVsgMEI1scV3e6mBkW7DxyQBABYShAKpxXAzIs0MS2UYpXb6M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717679863; c=relaxed/simple; bh=AWMP5+BquLDtzLKwUlgSS7VtSoQfhl9NrOwjnGNd7WI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=on3MBUX8rlTjwiQAgHkthTreZJ9ff43ekpNW+b8RP0M00AjB8aJIjnuZy1Df9yT1BgeHVv9M6JjHVr8Jz77AItxo478rsRIciZFxBDnlK0N5brsdWcxrD35bdZdeCPUh1v018wwYFRejqAwIxdkc7qONWPJNcdNHd5DtzrCTM1M= 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=hBvkXsXa; arc=none smtp.client-ip=209.85.160.171 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-qt1-f171.google.com with SMTP id d75a77b69052e-4401a1ee681so4399261cf.1 for ; Thu, 06 Jun 2024 06:17:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1717679861; x=1718284661; 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=Ox++ObHoucj04Nng5whrLexOcEwZLp6Wnb/NRj7bOEs=; b=hBvkXsXaGc8ztZwyZdsJtflSByqW+KORAWXRGhyLbOagYTMp8aHnmY9HcV+JCPLtnM 83YMLcZXDyMC5n9g6dW/ypqZHCeZZOBLwJy9D67FL87T4OS5cNXeEhlqUFqq8FnnwwXL /O9LuvK7Hli26AzPKpFkHi63RAZtj7QSyhByo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717679861; x=1718284661; 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=Ox++ObHoucj04Nng5whrLexOcEwZLp6Wnb/NRj7bOEs=; b=ph95LZLyszC/cbWl/zTMldwZXhUyQKySJ6AUq4dRJZ0/GdJVWdiiJmsvQWSyItEmED QTfB4j4cpq6iildioxR/2kCi8i/Xqs7bEAWO6Hh1egd96jfohlSbkg4ksbQhJs35rjih H9hJQTbWsQAenH19RZtpqqyM7bv8+up9IgdKsNTIscpA3njRC3b+fHIgXPqtCZYc9c4Q U/a4rCRfkkZQW4lPCHwc5Da+s2NpBaKROgdSGN9wWkW4octT7Irc8Emg2KSXfkgkNesx 2hjEEGogFmt8SMYfQa1B0/MTJXeo6Kzf978gjVvI3eElifvU6PPzglSn/PWgtJc/DHPy +7Tw== X-Forwarded-Encrypted: i=1; AJvYcCX7OuQhvePgjk27bXvnO94ZTpv2sHAA0BXI1VhMucsX8hibIy1PYHN87ih2mG6i/UFPx9Ax3c1BZDlxN6iZ7naZkMc4KP4Pc1IvPJo= X-Gm-Message-State: AOJu0YwWirIg2LZTH/O0vou+QGfCn686M+um46CBFa/YYYHpB93iwimf BOAafRxj2CK4M//RjFtq07+wl/LDhqNsUP30DsVKTi5CpXhd8tRzem3fHpJLrA== X-Google-Smtp-Source: AGHT+IFzv3hWSZczWB+TZSLeuXfXc1Q2NFlWyqPdthC4uOD9GBvoBOQzGOjMlXNfaGf9AaNt1yvmQA== X-Received: by 2002:a05:6214:4806:b0:6ae:47b1:58a with SMTP id 6a1803df08f44-6b013913980mr61775836d6.0.1717679861047; Thu, 06 Jun 2024 06:17:41 -0700 (PDT) Received: from denia.c.googlers.com (123.178.145.34.bc.googleusercontent.com. [34.145.178.123]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6b04f6607f5sm6118036d6.31.2024.06.06.06.17.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 06:17:40 -0700 (PDT) From: Ricardo Ribalda Date: Thu, 06 Jun 2024 13:16:43 +0000 Subject: [PATCH v4 09/11] media: venus: Refactor hfi_sys_get_property_pkt Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240606-cocci-flexarray-v4-9-3379ee5eed28@chromium.org> References: <20240606-cocci-flexarray-v4-0-3379ee5eed28@chromium.org> In-Reply-To: <20240606-cocci-flexarray-v4-0-3379ee5eed28@chromium.org> To: Mauro Carvalho Chehab , Stanimir Varbanov , Vikash Garodia , Bryan O'Donoghue Cc: Hans Verkuil , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Ricardo Ribalda X-Mailer: b4 0.12.4 X-LSpam-Score: -3.6 (---) X-LSpam-Report: No, score=-3.6 required=5.0 tests=ARC_SIGNED=0.001,ARC_VALID=-0.1,BAYES_00=-1.9,DKIMWL_WL_HIGH=-1,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,DMARC_PASS=-0.001,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,SPF_HELO_NONE=0.001,SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no Replace a single length element array with an element. This fixes the following cocci warning: drivers/media/platform/qcom/venus/hfi_cmds.h:77: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_cmds.c | 2 +- drivers/media/platform/qcom/venus/hfi_cmds.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/qcom/venus/hfi_cmds.c b/drivers/media/platform/qcom/venus/hfi_cmds.c index 75f4a3d3e748..0a4de8ca1df5 100644 --- a/drivers/media/platform/qcom/venus/hfi_cmds.c +++ b/drivers/media/platform/qcom/venus/hfi_cmds.c @@ -156,7 +156,7 @@ void pkt_sys_image_version(struct hfi_sys_get_property_pkt *pkt) pkt->hdr.size = sizeof(*pkt); pkt->hdr.pkt_type = HFI_CMD_SYS_GET_PROPERTY; pkt->num_properties = 1; - pkt->data[0] = HFI_PROPERTY_SYS_IMAGE_VERSION; + pkt->data = HFI_PROPERTY_SYS_IMAGE_VERSION; } int pkt_session_init(struct hfi_session_init_pkt *pkt, void *cookie, diff --git a/drivers/media/platform/qcom/venus/hfi_cmds.h b/drivers/media/platform/qcom/venus/hfi_cmds.h index 2c56ae303989..f91bc9087643 100644 --- a/drivers/media/platform/qcom/venus/hfi_cmds.h +++ b/drivers/media/platform/qcom/venus/hfi_cmds.h @@ -74,7 +74,7 @@ struct hfi_sys_set_property_pkt { struct hfi_sys_get_property_pkt { struct hfi_pkt_hdr hdr; u32 num_properties; - u32 data[1]; + u32 data; }; struct hfi_sys_ping_pkt { From patchwork Thu Jun 6 13:16:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 102251 X-Patchwork-Delegate: stanimir.varbanov@linaro.org Received: from sv.mirrors.kernel.org ([139.178.88.99]) by linuxtv.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1sFD2g-0007aT-0o for patchwork@linuxtv.org; Thu, 06 Jun 2024 13:20:34 +0000 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 8CCBD285D36 for ; Thu, 6 Jun 2024 13:20:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CC962198A0A; Thu, 6 Jun 2024 13:17:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="B0m2W8Yc" X-Original-To: linux-media@vger.kernel.org Received: from mail-oo1-f48.google.com (mail-oo1-f48.google.com [209.85.161.48]) (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 14552197A9A for ; Thu, 6 Jun 2024 13:17:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717679864; cv=none; b=qzO+f+xXnpqvbawN3tYS8bVNloM4VrZZWBXH3M/rqst0dH5PV5bwSTInty0kl+AWcJNw+gE4nFI2H05JLR3FUc8vwXOwliQmLZuRhlp3G6VP7cWozg+UUxuaGYf/kXH8UhIyXq1LRWkqp1oQAw4tdQJiehigDDUoY203ZEo2xYQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717679864; c=relaxed/simple; bh=/NolsqpFl438TCqFo9LQEcg+v+sNSkqQj0PpqvI4hys=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=duuPZ71eA2IR4pUeex0jGKNTqyMrvusssBt1+cMbKvNQd8J1bAmr1H1Flz4cYnlGoaDYQD5hKcaFNMfq0RLHa+06iY17H8u04PFe4AnjTsg5GJIrF70LObQl3BDrqs/YxEzOhVUR8Dzu5CxXWNzoOKkD0tLTiKcGeC65dlBlSq0= 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=B0m2W8Yc; arc=none smtp.client-ip=209.85.161.48 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-oo1-f48.google.com with SMTP id 006d021491bc7-5b970a97e8eso479467eaf.1 for ; Thu, 06 Jun 2024 06:17:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1717679862; x=1718284662; 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=9kZibIjO2Z4ZCSJlx2Ohq41MEqbhxGGlKtW/qmnnTcc=; b=B0m2W8YcCHfDC4u1Xmsgo73tUGvDyueDVroXxO9OL8c342QQY+D0w+AqzlzB+FSepg VYNOz4WDZiEH6usVHvTAWUl3MOIQ2nEr/4wmyDbdflv7Al9aaOvfC1TVesXa5ePhTpEz BgPlKq1RuHWbcY9EjEXv2fZG+eB8iT8cj61eg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717679862; x=1718284662; 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=9kZibIjO2Z4ZCSJlx2Ohq41MEqbhxGGlKtW/qmnnTcc=; b=o/vYl1pZKGhV1SykCF4va37toU1e42hsmSH+/egFM+IcXUXYqi70I84snB0+fyPiMy eD2Js6QhkAa3LQa2JrwEIrRQakF2ANoByIoi2W4cQxo9TCKVMsJm8gg4GC8Sq9sl4g5L KsmqMlk6IMxQXLCNKPot2fQb+clCB4AN7lJaV+Uh+UP4+Pp8GdNQTagnCl2mEQoSo5fS 5S8bMz7/MjPmnxt4sYcz+QhqRDo2opnjZVIZoImi3V/mzITZq3toeptbYNKaChxq2+e3 hDB5rbk7RRgxhPmFwvUqlYH+Sbdf9po5O0Kb49rZ4S+goQc9wfTDwDeRtlQepWk/36wo okxw== X-Forwarded-Encrypted: i=1; AJvYcCV4XSsfw7EPMllplAZJBUci32EKyxAGVwM5YmodQyjGy41fnmF/UKGpOC0K+1uREYC64/V6yPntyBk+hkbt1eCLPE2J2bJoiHSp+ss= X-Gm-Message-State: AOJu0YwtN7ALubxgDI8Li8wqkxijVFkENwLxFBlmN+mvR7+ziOhM3siy YaNQI1XAE4IC4AtyXhCrBJsJKELoPlZKf1pt9QVXxzAAZuTtP/OliSrIOdSF7Q== X-Google-Smtp-Source: AGHT+IEGO3j4JeIIT057xPo5p1aauD1hqTN0PU5iBBrHrF1scvkyvtDkNWbpsNVMkjbf/7njNIrIMA== X-Received: by 2002:a05:6358:72a:b0:19f:13dd:b7a7 with SMTP id e5c5f4694b2df-19f13ddbb03mr111660555d.29.1717679862024; Thu, 06 Jun 2024 06:17:42 -0700 (PDT) Received: from denia.c.googlers.com (123.178.145.34.bc.googleusercontent.com. [34.145.178.123]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6b04f6607f5sm6118036d6.31.2024.06.06.06.17.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 06:17:41 -0700 (PDT) From: Ricardo Ribalda Date: Thu, 06 Jun 2024 13:16:44 +0000 Subject: [PATCH v4 10/11] media: venus: Refactor hfi_session_fill_buffer_pkt Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240606-cocci-flexarray-v4-10-3379ee5eed28@chromium.org> References: <20240606-cocci-flexarray-v4-0-3379ee5eed28@chromium.org> In-Reply-To: <20240606-cocci-flexarray-v4-0-3379ee5eed28@chromium.org> To: Mauro Carvalho Chehab , Stanimir Varbanov , Vikash Garodia , Bryan O'Donoghue Cc: Hans Verkuil , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Ricardo Ribalda X-Mailer: b4 0.12.4 X-LSpam-Score: -5.9 (-----) X-LSpam-Report: No, score=-5.9 required=5.0 tests=ARC_SIGNED=0.001,ARC_VALID=-0.1,BAYES_00=-1.9,DKIMWL_WL_HIGH=-1,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,DMARC_PASS=-0.001,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,RCVD_IN_DNSWL_MED=-2.3,SPF_HELO_NONE=0.001,SPF_PASS=-0.001 autolearn=ham autolearn_force=no The single data array data[1] is only used to save the extradata_size. Replace it with a single element field. This fixes the following cocci warning: drivers/media/platform/qcom/venus/hfi_cmds.h:175:5-9: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) Reviewed-by: Bryan O'Donoghue Signed-off-by: Ricardo Ribalda --- drivers/media/platform/qcom/venus/hfi_cmds.c | 2 +- drivers/media/platform/qcom/venus/hfi_cmds.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/qcom/venus/hfi_cmds.c b/drivers/media/platform/qcom/venus/hfi_cmds.c index 0a4de8ca1df5..3ae063094e3e 100644 --- a/drivers/media/platform/qcom/venus/hfi_cmds.c +++ b/drivers/media/platform/qcom/venus/hfi_cmds.c @@ -331,7 +331,7 @@ int pkt_session_ftb(struct hfi_session_fill_buffer_pkt *pkt, void *cookie, pkt->alloc_len = out_frame->alloc_len; pkt->filled_len = out_frame->filled_len; pkt->offset = out_frame->offset; - pkt->data[0] = out_frame->extradata_size; + pkt->data = out_frame->extradata_size; return 0; } diff --git a/drivers/media/platform/qcom/venus/hfi_cmds.h b/drivers/media/platform/qcom/venus/hfi_cmds.h index f91bc9087643..daba45720ddc 100644 --- a/drivers/media/platform/qcom/venus/hfi_cmds.h +++ b/drivers/media/platform/qcom/venus/hfi_cmds.h @@ -172,7 +172,7 @@ struct hfi_session_fill_buffer_pkt { u32 output_tag; u32 packet_buffer; u32 extradata_buffer; - u32 data[1]; + u32 data; }; struct hfi_session_flush_pkt { From patchwork Thu Jun 6 13:16:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 102253 X-Patchwork-Delegate: stanimir.varbanov@linaro.org Received: from sy.mirrors.kernel.org ([147.75.48.161]) by linuxtv.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1sFD34-0007bo-2l for patchwork@linuxtv.org; Thu, 06 Jun 2024 13:20:59 +0000 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 958A7B25236 for ; Thu, 6 Jun 2024 13:20:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F023B19755E; Thu, 6 Jun 2024 13:17:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="dr0D+icq" X-Original-To: linux-media@vger.kernel.org Received: from mail-qt1-f179.google.com (mail-qt1-f179.google.com [209.85.160.179]) (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 3F2AC197A89 for ; Thu, 6 Jun 2024 13:17:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.179 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717679865; cv=none; b=uZ+JqXw4vI0CwSEWOvKsVcXRMtOr1Z7AroumWf4fnQeALbTl1oEp0brAV7FmZ1uX42wQAUDiFF1ILnKMR97wGnjwx1L1bKXSukQzDGBekIGLJ/+OrTDcaDCSTNvNmvHcibZ8PSAOUkPTm2Rpx6OPjqdkFm8K4IyafgugdbeNMRw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717679865; c=relaxed/simple; bh=Avo2Fleh4ujjt70o15EeficxKnpelBo2TOFCLUdZKFI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=nZuycRCrMur1gCPcqQ+WYBeqP20us5rM/Upc4OaqlVQuxhx0miSqg2Mnd7Dwc/Loy3EMiwCfBZdBEPq1lHRCVjR0Ixu06pZAqm9r/O+Yubxku1QsjtMf0l03N58/RFMPeaLI5pEpPYql+Xm2W/Xbb4zkSoLYLCMLQ36A7WNeQNU= 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=dr0D+icq; arc=none smtp.client-ip=209.85.160.179 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-qt1-f179.google.com with SMTP id d75a77b69052e-440299bcf53so4553251cf.3 for ; Thu, 06 Jun 2024 06:17:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1717679863; x=1718284663; 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=2o9uFpZwETiKeZWYLVPp/h/C01HBTzSktsioUGg06Ew=; b=dr0D+icqsuyL2nuQ7p7S3Vud/E3YjHXXW6VdaFnIvukhdpS6XoVSxygvcFuE3lurd4 ElRlCgM7ovhhl4r98jnxmqNfFGAemoaFK95QcAr78CbdyY7YSZRiDvoAgDLT1m3Hjd6n yrt+P0n5v7LJW1e/NjwPDP670UOhdTjCZpvfM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717679863; x=1718284663; 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=2o9uFpZwETiKeZWYLVPp/h/C01HBTzSktsioUGg06Ew=; b=BtAhA3yiOnwFUCybUe6ToxGLJDb+CBMthDU7X/r4SSdR9jVMOOosUSwYMJQuc/Sb05 wnyu+MrqtC0+sab8rHU+JKT1eUw27VkA8hvwiZ0FfRghRj1vs/YJDoJl0l0OyNSuREL2 qXiBlS7whaajADUYM6noBuSs98XTOO+MmW08KN5uwgBQiBnNccRy4ZXALbmQjtJnxXpI Qmg/R84+0h6nPljiDJGrNItpdx4kscUkLki/BDqor3VAEIHWCWvdUbGf9pJDcEWtQF0n LjgjEmlvhjWqQ39xMFuD+CQ1SKRoqLuhDSsU78EiFlr322d7Q9u5r6XJkU4ml/AuloBM z9cA== X-Forwarded-Encrypted: i=1; AJvYcCVgxvNiV1CiiX68HewPjGQ3tlYJLKxPCpeqSro+2zaz7RGwQenGj3okJIBE4thzcx96GfXodoP42psYPDXaZeYkBarb0PBtTVAdyK4= X-Gm-Message-State: AOJu0YzV2rA5HgUn99TYesX6KDw4JVK09AZc3KctY5HnEJuA/9USLASS HrN8Xk7lrfWjg//3SaSYcoJhbzIPzu071x3T51gueYHqYp3CMUV7jUaPtV2grw== X-Google-Smtp-Source: AGHT+IE8jXrmgfRC91PfzOqBRQfeMgy1DzBFB7+DOjFIBnca6lzwJN2RUcERx9LU43E0vr3vRV6ErQ== X-Received: by 2002:a05:6214:3f91:b0:6af:cdb3:5db with SMTP id 6a1803df08f44-6b031cecca9mr63488376d6.63.1717679863024; Thu, 06 Jun 2024 06:17:43 -0700 (PDT) Received: from denia.c.googlers.com (123.178.145.34.bc.googleusercontent.com. [34.145.178.123]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6b04f6607f5sm6118036d6.31.2024.06.06.06.17.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 06:17:42 -0700 (PDT) From: Ricardo Ribalda Date: Thu, 06 Jun 2024 13:16:45 +0000 Subject: [PATCH v4 11/11] media: venus: Refactor hfi_buffer_alloc_mode_supported Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240606-cocci-flexarray-v4-11-3379ee5eed28@chromium.org> References: <20240606-cocci-flexarray-v4-0-3379ee5eed28@chromium.org> In-Reply-To: <20240606-cocci-flexarray-v4-0-3379ee5eed28@chromium.org> To: Mauro Carvalho Chehab , Stanimir Varbanov , Vikash Garodia , Bryan O'Donoghue Cc: Hans Verkuil , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Ricardo Ribalda X-Mailer: b4 0.12.4 X-LSpam-Score: -3.6 (---) X-LSpam-Report: No, score=-3.6 required=5.0 tests=ARC_SIGNED=0.001,ARC_VALID=-0.1,BAYES_00=-1.9,DKIMWL_WL_HIGH=-1,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,DMARC_PASS=-0.001,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,SPF_HELO_NONE=0.001,SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no 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 {