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: 13688477 Received: from mail-oo1-f46.google.com (mail-oo1-f46.google.com [209.85.161.46]) (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 5FFF5195F10 for ; Thu, 6 Jun 2024 13:17:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717679855; cv=none; b=cGa4IGQ5YFSS3KvsKzj8F0+JF5JejeqCrRJ8eQ/I+MIP8hHe0B4c8gi0jVraHzbiuq209qg+lYMta8LCU5RO4zH/oOgwhQ3aG2VGtUd5BKeVQt4YNhep3lpUUj0MHSoNQBhYpY5qNTgzQQVXnepwX/UCDLvLSXgq8FLMe6i+1IE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717679855; c=relaxed/simple; bh=9Ex/psXstRZqGMxxPJ0VpkCq64t7rGKg+zLLyU8qbQM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=d/ubcXedFIkXevZERYnMYA8q/zBEG7+vk7tmZnyvPFtOlxWdkN2k0CduYDKXY94WcnDQejRi7iua1/xG4uoe2RcpqhYHL3UmznBgWSmPj2/LU4lf26kByMPmAppR9hLtwi1jF6V6+8yKLoEZ3lzSJ+U6gRzZFcXPzT6uMfP0OUw= 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.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="NvYMBhPb" Received: by mail-oo1-f46.google.com with SMTP id 006d021491bc7-5b97a071c92so431590eaf.1 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=MEsrHbLPgklgj+ZY46UZrsPpjGjjeMlBX9igVvNbUkQ3/j3qiopFfv6e/miXeB0qES xarxIj3dHO4h8S+rUSP1TWvlOGwsn80gLPQC73jNr+rjwRe//yl9DcUQpnhJpC0j2z26 t6YaXUwtxaeN3yGS5qtYMrv13juZfvbEvHmBEZu96zSFeRlyLo5gwW7ZGgP2KtVJ6tgE QUuLMLR+h0Yb/6ZoCwnORZXqoORMUVOxU8Vjlrye/Ex0xXeSjcdvDrY/CcOJJ9GRNUbs lwouVa+WlLoKspLVcuy0y4LnSeQsOmLB3RjoUuHhFO58sAKFEaW/1O7Ttw2RQZW/nfnF TBGw== X-Forwarded-Encrypted: i=1; AJvYcCV1eg53NLtT6gHtsteu/wvK4Gm5f/hzCD/N0AzNhFCnHPiL4exowmaB0yvbkV1qAoS/agAzC9WHHny7pjucEHcUfcQfRStSHJHEsNLgww== X-Gm-Message-State: AOJu0YymmB7Vv6LRVocEIFN45FvpIDaHJnTzh95p3GS7qRvqVXVn0QSL rzfXDSvHzkuSZZ5W7i7g7NoCHzM5o34lWKRa+OUhlw0V4WtvsaByQ8WL0jJOcQ== 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-arm-msm@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 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: 13688475 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 22565195B19 for ; Thu, 6 Jun 2024 13:17:31 +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=1717679853; cv=none; b=dDMgb03Y0ufnOjErht9F6GJh00LrS8Zip6frtQNeGtxsbkz0lzVBahZNVNQkA+a07wQ8VtEcTfrNAguvmTeUwmtBy24TYxpd6rydtzPEGHLuBwbMgEqev/B0haPvQwagYnDLXR1u2WX95kVo1k7L0yIX2tV9UAFRLhw37tnANvA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717679853; c=relaxed/simple; bh=q4cFhQIrNm36IK0wKmtb142H9pZ1e7X8A6hufGU+NQA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=SlynygJ/yBf8nXMel9WZjWswdi6GBbHhZmh4qk8h0YE+mCF1ZUueK3TEcMTLxn41eaD7J4SIau92F8uBd5uvr25oAp9LsDEOCtJXz8m/mob3JGrZCcTHnFoHLGeVTvJI8j3XCn2w4Fy+FWgiL6ATQnOFnvPIaKF/hmfEqQ2s3gE= 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.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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="oFdujwms" Received: by mail-qv1-f54.google.com with SMTP id 6a1803df08f44-6ae0c4d23ddso5023966d6.0 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=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=hEHl9xmH+Mtdr2PWL7ifYsJkc0SuO6KIwxeWH8Rpv57fRGNOVo5SgBtogpuE0QfQIT Lnpjg/261dO10C7FmOkAbcwqwrfl1rH5nDUNxHaJz3hPnxMFkHHqXUkeJFqiMKiU+vrZ VoBdo5zFQeWDZDgRjQTo8CVpewBYUH+2chBBRA47hL22iqRtiQhphK3hMvzLhyYSfOw1 h4tLWcK6I0//HiFggZpVGh2yKcJaHbUyoJL6BxguZGj6hA2TSy/P8jrZyDsWs675b1Ng 5J43E1fSMX0i6Cm0dEcDf4mx3c8qBOzpLJbvWwo5llrg4mxSqyUFxleIDYDIonWewbqV MP4w== X-Forwarded-Encrypted: i=1; AJvYcCVD9aKoNc7Y5Wvji34YyQCh6ZP6ksbgbgAq6GQVlRxwb0r9bFP/cd2nt0F9YUHZVtMH8fmRgSIXeiJH8e9W2VvAIhk+Cgzefbr6b/UnXw== X-Gm-Message-State: AOJu0Yxvyb+4Vet2/wE9EkTGNVOmeeMTyKC9xDNPJLT0bS2Q2MdvVgGF u2wMp5SaSDul7O8NPBWj0Kojzlvloo3MfKZiYvPRudphqeL0Q8/9c5RMPYfBXfmhDn3lErVbvU4 q+c6V 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-arm-msm@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 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: 13688476 Received: from mail-oo1-f53.google.com (mail-oo1-f53.google.com [209.85.161.53]) (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 3E295195FDB for ; Thu, 6 Jun 2024 13:17:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717679854; cv=none; b=o0oMEfpcz06N7BgyvJLyyw+w0iYnLU+/5Tnod3eftQOdeQvdPCCUm+sFoPOzNTpifACM4KC905qxXiwczn4y1xW/FwwKNQbSkhwBinFpA3To3c0+bmX6jfOIYGoeSNMuTR7MzxSSHvTamyU0GVjGMbqZMpsf9B4ml/kWBdUwB08= 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.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="Q8dS9Jfh" Received: by mail-oo1-f53.google.com with SMTP id 006d021491bc7-5ba74c25fb3so469123eaf.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=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=jM9/+uMYTA3ycyY0nAx8M/ejH0FqoSVwlUqpsjn9bCxPDeox9qmCUqqvBYpaDFnXeo hkqdGlUYWGUXJtH3qamUCETqpyerHnY8fDpW8BDuc8rYuN+RLOEX4mZJJ7Qwv3MDvfaI jUEaJszJAH8Y746mAxxqL/WuONNptpgKo8RuolkH8uGP9T5HQbzanH08o82hAcCuIFsx R3IauIFJeKZpWRiXt8dxFGUrTfc9GtLdcKqyZweF/VbWmpDKPcz0GqPcnU9ttcNhRtTW SDH7N4ESsO0Mn3roh/F4P7ra2NYKJyKroqx/28AVQbDb/1hhMJhF4nRDZ9PHi8jltM16 ofcQ== X-Forwarded-Encrypted: i=1; AJvYcCXqDEY+j+ida9uE14VJnLLe0cg8lQbKZmyaKlrvAaiTc65znPyPNdowfSAtpMNoQJGFsE1rYWdkwbHR+W4NLr2fgj+v38/aA3N6djGhEg== X-Gm-Message-State: AOJu0YwCOH3j4y1GE+KisJTfuVMJC87ZJokIYbdreX1riZBD7AJ6wQ5U O+JMVENRMO8y2a9Ny0zrJNqrJ8UYxYEk9Odi7ZqTx2HGArEj5EbE4h7ceiHxDQ== 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-arm-msm@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 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: 13688478 Received: from mail-qk1-f180.google.com (mail-qk1-f180.google.com [209.85.222.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 DFBB4196451 for ; Thu, 6 Jun 2024 13:17:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.180 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717679856; cv=none; b=iA0D+S/dWq2xLO6R36DEaoHCO0v33O9k7XICIhK8nk7VCyMq6Ns0mJgE7mRzmWcmq7fy2TDACjV6OvN44LBf8FHLWUW9b9ImYeSNCWx5kq4TvcYojLEyVO4l4vFZAkT4OJJynxKUzp/j2cn8wkjOxLthSx9N3iTRqNUDAbYTIi0= 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.222.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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="k0x+fHDm" Received: by mail-qk1-f180.google.com with SMTP id af79cd13be357-7952b60b4d7so56560185a.1 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=p2Wky9xPDqL81eiceWsTNJYsq0MZ1Nf4hRswApNwQY4QCoCo2igIkAyyWKrAhwmjLx TQ6M5Q7AVQ6/lM0lnX9xgcM6JKCuyyV/Bvpv1oIggVYkanc8aevlzXQIvrtH/aLd/+Ka zbHGfVbCt1smnGRBYkp1bG4XQIQqRE1foOwHQOPtDFoPmjfdnoYDFULNvO6ZcosfzCR7 y2cNqE0dMYBzhLcZA8TXd2cDWeguSp+5OtHJIiVlsnbhr8Vm5/9FqfgJp7J5eMRVCo9A F3HVWrhdBtv1D/U0ZD0gYQfcbjSPqQZP4Aq3yOmmP14k9eMZtfiOuhmFlNHHCNue+6jg vBHA== X-Forwarded-Encrypted: i=1; AJvYcCWAbbGB+8qiyYIMBE4ZDPipJujLekbHSDLpntu3q804+IsRSsKdWIhzt93GfT9Pd1X+jP9pwFdmb3jEEM+ijF7omzQbLmnMHR1Zbcl3LQ== X-Gm-Message-State: AOJu0YxTP5Hhwdlb3S5h2Ll6OZH4cf/lO2gHTslU0ZSrT4fHzBU7i5kt qngZ0wbvlw0v+hYDLCBdTf43Qagq1FmOWYAe6EQwBsa9WbA2wnQ3rch5onvt9A== 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-arm-msm@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 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: 13688479 Received: from mail-qv1-f42.google.com (mail-qv1-f42.google.com [209.85.219.42]) (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 DF25F196C7D for ; Thu, 6 Jun 2024 13:17:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717679857; cv=none; b=O/H7QY/5uQ1gSuisUl3r0gafZAyBYYQxVvwOntNqtUPJA5KDSJgSoArKjsunsnK2qQQuDd8CTkZbmWWz0WOtsRO8jAO1K+T79Zi1s+aleTrurNuR786Vf6tuI+pAmvQ828TxhP/V7DHh7HLRKfOHO94to/1het0v2fi3Sr/2Im0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717679857; c=relaxed/simple; bh=q/yIjMSqnXj8v7L7GkQC3K27otk7HPW5heUqxBmLTVc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=isX+32bpoAs/KtLyeMv+GswDxC/Kn3tVhWhKsq3p5Xe4zKQZSE+DsitaNC/kRqCpi3s3WTsSW0ue6jEytsFCjH2FjTgQHCZ+WzHkkQ/MtjA1KxOSvUE6n1qQj02ENKdbl29oyBYOsqOaEroN35FKotAQQ+wlXaksh8b+UyYR/mY= 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.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="UkKa/XJl" Received: by mail-qv1-f42.google.com with SMTP id 6a1803df08f44-6af27d0c9f8so4471516d6.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=LCz0v0XjuDLFB0rpyEnX/ztGAdaW9Z5QUty1ick/SZAYVdX9w/30x7P/KiYJBm/4nY xO/UU6keQobNrP93/WydoogyvS/Ukko2l6fZPKSfZCrZBDphjLTkErUp06L2vGsiqwH8 AzOiqdmiTZxxW1bKtsDqZ4WQR18JkTjhumiXP49S4YhJcUe/fMCqb1xP1Gk/xIV2vhG0 WBsi7OnMNWJNL6vOzSwnMJbd0RQlo/BQN2EpKxb3ao6dEHhZ2+A/sM08+0sRzf2XbuW2 06foCTEl4pTABgQixI0a6hxnId7rEGRXI/nQqYADWCGyMT95rMFMkxaNQI4kA9oSQ79C YxnA== X-Forwarded-Encrypted: i=1; AJvYcCUYTKso8Wjkq9zNi7ZpyPvVLAP/cHwNeDAkUzjUYjZ9//RUFxzuXDL2EKDjWamU6PRqM3kCpCh/IHVWpt5GnI0aTOdda7qC/o5nRamHGQ== X-Gm-Message-State: AOJu0YzKj/kbeO6ZeeGL30iQ0u8nWdHVILrBBYfKYyhsOrqeBZqMa9Qk eyKgIu38p52q2TDSH3mGL1i74qoOlSgob3b4FTUajern3tlruNaPWv3JCz14lg== 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-arm-msm@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 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: 13688480 Received: from mail-qv1-f46.google.com (mail-qv1-f46.google.com [209.85.219.46]) (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 B20A2196DBD for ; Thu, 6 Jun 2024 13:17:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717679860; cv=none; b=jBMQQwfjHjnimSU+/9n0Nku7aQ7QAWn9fA0f27z8jFGtqokJKvUXEMNdDKViP/xAK1v4LAQAK6vpYix/2NJwG/5IZq2+/1X8qxqnGUSsGQWfTmjybvOLjYEd40z1DBB9bKs4IMkzUWiOsvqruOLmx3HwVXafzP5OT8nkS8qkrGQ= 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.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="Hz5QRfdb" Received: by mail-qv1-f46.google.com with SMTP id 6a1803df08f44-6ae0c4d23ddso5024646d6.0 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=X/FA95u2ibww1BekIDAOYMhn5HjJkPWkYcmgPpbvxhEfkya+g1bbU1x/CDhPdeB++C 5AA7oTXiMHfnBBJy+Ukp33XfGT0i7S2H8XfyTT3/k0RCi1Bl4r2XmiLk/6rKbWxQRrTn ylHo1ednlr+sCPO3XJjPEvbLw69HBX6Rd4tKdwuNPzOlMzMzqVIz6TjrGl8B9My/NJ0o bSz+gGydiCHswl0oBEftMw6P4PkCZW9bagMhLIvmsspulXGk1tDmUwpAHc8qJAr258Ff +QqxWRcsbh7Aq2RsrtAOXoW2jJWNfzIcoaeyVaAKDGuXDEBdOIOxQ0vcY5gLisA+7IM/ Tx4A== X-Forwarded-Encrypted: i=1; AJvYcCX6qnRr9ClFNDKcOruf8ATUlu0sKDr2Fsqh4bOo1CwNe8W63m7x34lTWEpxlpN+7GVEevq4n9GDQdhuaB2R2vCFukk4MODq8xJxPf+SLA== X-Gm-Message-State: AOJu0Yx3RNHOBVBT82MNwUYZ4EY9FpdbK1MS1UfcTcaFDTkM18xB3Qdi qtHXbkzKgL6lMvd+p0lW9MuOUMf9PJeJEP6PuNnoq3YFGMd2s5TaWyLdHxArwg== 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-arm-msm@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 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: 13688481 Received: from mail-qv1-f53.google.com (mail-qv1-f53.google.com [209.85.219.53]) (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 7FE1F197539 for ; Thu, 6 Jun 2024 13:17:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717679861; cv=none; b=QbI5tRXN4I1mragSFc//4cLFWIGlRlIkrreROODHDpK7fv3MsIkQkYUD8OqJ9Z8Mvi3g3Rkn+C7FitrTbGxfkOB7aLcopZ2VlitD+XWwD1SjwdWcouboo1sMip5nnsIUPCwpSxqqZoalGKEMfTFrzXZk3TcD0rWer4ApleCBkg4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717679861; 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=UdnE40hMRf+igAzT7W81Y+i9BEYmYdGj+nGe2R6+yCDxvbw8ZC/Ko5n6iwjxbPAQzA6T7c0hWgHSIOOneYp5dqUDOhwyNZ63YlZ1s//5Gq1l1WdzUZ1kJHUuYtL3aBuckwKdLcPwvY5JDQ7pO3njmJZzRXcJWCjTFvxDGacMQUk= 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.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="ntd/dDPP" Received: by mail-qv1-f53.google.com with SMTP id 6a1803df08f44-6ae1b32752fso5008596d6.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=penetugDUdaGn214haf95Y7FiUX7rl5hTJ+J9aLp5RMh0HWasW/VsJcmmF6zBE0+a9 Ohf2wf0D6jfJ/Fq3czPScr9r5wKqo1l3uqotF7aRyBIhxJIEhJ2lm1R0ZTmx98wD4t2p YttRvQgngDqR6ooe1jEUjxg/6i5ZJH6HnjXbdBlA/Kf2sTv+rXjXwfEScJpP2PDrurly ++nGU+f+SzY/tULJ19ggEwMmY5NZk8yVuhgVEg5NMdJvNu84xHz+Ga2aXX6Iam7FHZi+ SfVBMozpXL7MzKrcYuAME2GI4jWD+83ro+8/kMSkAhWZ6tEyaDhl3WMZuMPhoRSZPgJM YOhw== X-Forwarded-Encrypted: i=1; AJvYcCXrAuhGPyq+/xQsGTQVMq7usW7Qyo6+2+RuWFMzacYNFViCtEHIgcK44HkxJCJIQVwqhEcls3P6Z11RR77g/PpKOLNmfPpS98y2sKkRSQ== X-Gm-Message-State: AOJu0YxBnVeiqRIsM2/JXXqYnmYQ4qn6lxpNKO/kYg3BfHkgEa4wD7EK X1BjUDhfpIh87GiIXHgv/G+Fb/zKUHJGCT4aVM21wvlPm2JKB8QOVs5M2FpzUA== 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-arm-msm@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 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: 13688483 Received: from mail-ot1-f52.google.com (mail-ot1-f52.google.com [209.85.210.52]) (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 24EB5197A62 for ; Thu, 6 Jun 2024 13:17:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717679863; cv=none; b=Q7lyAR5fpz/Yn/gNYpzAw5hgMpRorcBg0kuNvbrPl9RAF0ev7cy69HsRssu96WINy7TQ9cSEWRjwMl61N4nYZ7FMHh5V9r253IqhJLIZAJCk73HXJ+U17zn5IHsAry20RO7C08QF2KubnbnKSXzzFm8sIDsvuLcsx2+costQ1DI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717679863; c=relaxed/simple; bh=uRrwC8FD53XE8snF88MCg3YmB4JlgvZCoOrRUf+Aarg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Oqh7CKB3zXQeT48yU7og1kuFYvQEdohkqBTRpF27dyZeUlPM8H9srxJ6Q0dHP3YEMEa+9uoY3hXYRfkoD4gHnzPzruJS06SXsEtQg3VdH9oe0VMmR3ZnyrgGh24zmmO0pnU7v6MekiHoRoAz9LIwZvPUzvWdXtycES/KnTj8kmk= 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.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="DjjfF8dT" Received: by mail-ot1-f52.google.com with SMTP id 46e09a7af769-6f72b8db7deso530401a34.2 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=eekov/VMX5+rRN+NUlqM8ss0se2wdDCC7+sVZapbfrBt15wrbyxWqXXf5MXWm1lq4z c7suWaR6fiUrEXW8WK5pFXRSyOn3FQb6GpUNwn3m/OlcM2+X4krQCCky0U3hM1xKbAUo dOT281EGvbrI2If7wsFECgsKgmR0bodKBmdU1VtfXWn4dMChiyQ9L3wjQnrSdxHscH3P 5tXUzf0LPZrLLTEiYu7kBfjTrCtFNvD00lZZAajiYujQN/jfgDoRadlcTebP492aQDFg 8qylN6OrBOucE555gZ53zmQic4mgzbsN0s41NfiI7ZaxysQRIiEZlsuPxJA1sT/VKYMJ s53g== X-Forwarded-Encrypted: i=1; AJvYcCWgoxJ6wTcNIVtogIzVntccc2BQq8sHzqvqj4vFQRlXoO+EGayjh32E38pDBwiIPbbkJy65jGGZfqB70kdv0yXVSIUB7RXGAuvhySoJCw== X-Gm-Message-State: AOJu0YxtHzOEZCZpWnVOI0/fo6s9aVCpPpAp4cyEkg6kA76Pgo7x/YEd hJEhLwiCok7bNf5UZMMV93Ug8x2lSxSUAF+oJv0fkaMf0XO2NgBt1mcg5c6vVWCF7jQaDXvvv8J a3tNv 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-arm-msm@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 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: 13688482 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 4CFB8197A89 for ; Thu, 6 Jun 2024 13:17:42 +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=1717679863; cv=none; b=ipv/ABlaCju+/Kob5WFPXjADE6HWAXEpFpoxXjFSflHHBh/FpXqbWtuEHDEFtczeRhkAkXKgZOFw1JmXkmCssc7sfaXKX00AQ1i25+41dMILKBSJsGB/0E5abN0zETjp3VlXZ1xA6STiUmP0dmOh7xKwKlm51lZYHVv897BmDUQ= 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.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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="hBvkXsXa" Received: by mail-qv1-f47.google.com with SMTP id 6a1803df08f44-6ae1b3274e5so4354206d6.3 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=kbbizaXLgpTYNJQ/gmq+MAWWmARk7UM/MUJkQhH8KeAMpVHikAM2yw2ZLzxTlrIeit Z0X4uS6ws/xBa4P7KvCv4cXE9bSiTdoWabiQkk6e57CJJVmqtiu54vBFzbaEhsUgoPSz 6rhsgrLcjBne63d8Giw0TwXJcIyjuA89kjS6oPXXf78iuX7iH33y7R8fNj0Sgj/48/RW 95yFTjPguW2fRgzN+p9bRfR3BfcFmqGKXicdyaa1QS+omiKpTFAsJMRHmPmBaPgcLvDw 8qkP1+E/Sukn2SvVEFWcgw1/y/qEVeemlfCwjrLpjxxKL/GS2NWZNLdwlh43x7BCwu4w rsSA== X-Forwarded-Encrypted: i=1; AJvYcCXTAMZPV60WfGZhIULFVLcz9bXYJR5+HHfVvCtLKDmF28wnX86Sm2ZocpVmDDHrtLsHo+F0iAFOvKIEsxi8RQxka049O9dq/zETzJzi4A== X-Gm-Message-State: AOJu0YxJEQFxubvbCKH0JhxJzoDUhhd+qVssZ/7GSZBevHsF0Z/ceeUF fwObhJPJGxNipX0z+b/ryZc4Wv7mYeD1SfBf30QznVSR5hYnssahwYD4f1aGrQ== 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-arm-msm@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 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: 13688484 Received: from mail-oo1-f44.google.com (mail-oo1-f44.google.com [209.85.161.44]) (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 05070197A97 for ; Thu, 6 Jun 2024 13:17:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717679864; cv=none; b=iM0mJP0o8zVCbHf9q2xUvPi2J6o7aklTUi0ioaYCzqSGcSl7/5AiLfsuomxogVnK7ADyxed+NgGY26s4ysAtRn2RSO0kFvcGR+oBAjORxonFQ2ubUJ7EqiZ4UT8q4mq0ZO7wmIq8pfXzILWQDUVsGQwYqdxW3T2UBCUFxlNd9lg= 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.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="B0m2W8Yc" Received: by mail-oo1-f44.google.com with SMTP id 006d021491bc7-5b5254f9c32so447603eaf.0 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=aBtNmqe6Tg7oWlQU1o0+zoFsw0p5rgD/uV7Any1RlwKpyldzmk4Wz+FCA53prZInZ3 ys46UVwFA8tc3U/2BvwntpZib1hYowtROIa576z34OYhoGg3aAqSOfAAJ9D6zdQEydif yCRHeqsczPJ3MXELheQPCWEd/go8E9UGV3cHf2Nrq/p9NElEMso12Fv+DhmKF5fokS2c 0MVVOiJoOXS4cHyHeTaFKWH+ezeNjUPABxP2F7feoZua42mQUqogc/W7grA6eHLreHTT Hfz23t8AyqMRM3TvWa41I4OJ/sEOE5N0swLbeib4u2lP9MDIc4VTZU6hn4+kswuIiYok M7zQ== X-Forwarded-Encrypted: i=1; AJvYcCWIJ4RqNiABYIfs6PY+zc7dLPkUiHM3Or8N9Djh80lgmzSXUrPlIP0HCNyUNQz7Var0MU54ZWzh3NS4InzkVJZYfXQgTHCYenD86CHjTA== X-Gm-Message-State: AOJu0YyMnwtQRb/nXV7jwi8vtZf3PHA4h3sAGmjHGwld/e0cG6MREQLs xKrNbE+xXn/HlWvKeKZ4QOYCtaORzeK2NfB+b3Uxa8Itncfy7GRvLpXOctuaLg== 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-arm-msm@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 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: 13688485 Received: from mail-qv1-f45.google.com (mail-qv1-f45.google.com [209.85.219.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 6A125198856 for ; Thu, 6 Jun 2024 13:17:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717679865; cv=none; b=kk7DNR2azNVrFNj/r92c7V+4riUjItuE5byC2x4ZTCnwLugQI0/fTO3tu54g2vxAOHTny/ElrLcH0rxKkJSG8ocx210NkaEc64Izs7XV6zkjqtjMGS7UeT3e8JZQ4hTYtt11+q4Y3SCmbnINwxolcj9mj7s/slCfznsmfLTb3xI= 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.219.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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="dr0D+icq" Received: by mail-qv1-f45.google.com with SMTP id 6a1803df08f44-6ad86f3cc34so5211906d6.1 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=c3GEO1pW08pMXq0bq/nzgyqT1fhqQYgF6MW2eR+AlgqEVC3AYUB57HXnKlZxpvopXt xwJEYMwIrDhD5QYizvhkVz6gjZ3wUhKe4pi+etksRLuxHeE6Yg5yJ6Rm8j8V5TEoSWGJ wJ77g+r71S/lFOb1ASfmOEViadVCGtkiZqpZ+Z/AFbK78buQYpxEDn36fZeUcvKhugir mX/4ZFhIvD69vzLbmZ7r6t7feF1idhqPdtFGSVyypDRC7gAVfTRqhnzh9II5jpyCuM2/ DXXKHwRWG7esZb9neOFT5vcwliysVfmLupnoYHoPITUDVUaE7dmcJCOtwdeLq3EAVJRl IuKA== X-Forwarded-Encrypted: i=1; AJvYcCWb+kjXY9JHCbXuN6Bm2El+aM+WcbgmUpLDCGNPaEe6rmwz/tyvEGnOySsNwIGk+R5bn7TS7LZdECvurCq8Vx9OBBH0g+ZQ84jyq9azGA== X-Gm-Message-State: AOJu0Yzna5ma5P4NpC1ESf7eNQqJCXUYx5XSL8asEocFtSW77cz2/Ff8 /FJI1eFIo6rB6xnie6/om3eR6bUWgvdTJFzyt7tlh5Ar3H74D1Q8mfU94jATdw== 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-arm-msm@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 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 {