Message ID | 20240618-cocci-flexarray-v5-0-6a8294942f48@chromium.org |
---|---|
Headers | show |
Series | media: Fix the last set of coccinelle warnings | expand |
On Tue, Jun 18, 2024 at 01:37:43PM GMT, Ricardo Ribalda wrote: > With this set we are done with all the cocci warning/errors. > > Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> > --- > Changes in v5: Thanks Vikash > - Remove patches already merged > - Fix typos and remove hfi_resource_ocmem_requirement > - Link to v4: https://lore.kernel.org/r/20240606-cocci-flexarray-v4-0-3379ee5eed28@chromium.org > Just for the clarfification: does the driver build without errors if only a part of the patchset is applied? I have the feeling that first patches introduce a build error which is fixed in a later patch. If that's the case, it's a no-go.
Hi On Wed, 19 Jun 2024 at 08:41, Dmitry Baryshkov <dmitry.baryshkov@linaro.org> wrote: > > On Tue, Jun 18, 2024 at 01:37:43PM GMT, Ricardo Ribalda wrote: > > With this set we are done with all the cocci warning/errors. > > > > Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> > > --- > > Changes in v5: Thanks Vikash > > - Remove patches already merged > > - Fix typos and remove hfi_resource_ocmem_requirement > > - Link to v4: https://lore.kernel.org/r/20240606-cocci-flexarray-v4-0-3379ee5eed28@chromium.org > > > > Just for the clarfification: does the driver build without errors > if only a part of the patchset is applied? I have the feeling that first > patches introduce a build error which is fixed in a later patch. If > that's the case, it's a no-go. I believe it should build without errors for every patch: It has passed the bisectability test https://gitlab.freedesktop.org/linux-media/users/ribalda/-/jobs/62071294 > > -- > With best wishes > Dmitry -- Ricardo Ribalda
On 18/06/2024 14:37, Ricardo Ribalda wrote: > 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 <ribalda@chromium.org> I realise I'm going against the grain saying this but, I believe these structures - which document host <-> firmware data packets - the ABI - should be retained in the header, even if they are unused, since they are documentary and potentially of future use. I'd rather fix the WARNING than zap the structure. --- bod
With this set we are done with all the cocci warning/errors. Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> --- Changes in v5: Thanks Vikash - Remove patches already merged - Fix typos and remove hfi_resource_ocmem_requirement - Link to v4: https://lore.kernel.org/r/20240606-cocci-flexarray-v4-0-3379ee5eed28@chromium.org Changes in v4: - Remove patches already merged - Combine dvb-frontend/mxl5xx patches and use flex on both (Thanks Hans) - Link to v3: https://lore.kernel.org/r/20240527-cocci-flexarray-v3-0-cda09c535816@chromium.org Changes in v3: - Do not rename structure fields. (Thanks Bryan) - Link to v2: https://lore.kernel.org/r/20240507-cocci-flexarray-v2-0-7aea262cf065@chromium.org Changes in v2: - allegro: Replace hard coded 1 with a define. (Thanks Michael) - Link to v1: https://lore.kernel.org/r/20240507-cocci-flexarray-v1-0-4a421c21fd06@chromium.org --- Ricardo Ribalda (10): media: venus: Remove unused structs media: venus: Use flex array for hfi_session_release_buffer_pkt media: venus: Refactor struct hfi_uncompressed_plane_info media: venus: Refactor struct hfi_session_get_property_pkt media: venus: Refactor struct hfi_uncompressed_format_supported media: venus: Refactor hfi_session_empty_buffer_uncompressed_plane0_pkt media: venus: Refactor hfi_session_empty_buffer_compressed_pkt media: venus: Refactor hfi_sys_get_property_pkt media: venus: Refactor hfi_session_fill_buffer_pkt media: venus: Refactor hfi_buffer_alloc_mode_supported drivers/media/platform/qcom/venus/hfi_cmds.c | 8 ++-- drivers/media/platform/qcom/venus/hfi_cmds.h | 38 +++---------------- drivers/media/platform/qcom/venus/hfi_helper.h | 52 ++------------------------ drivers/media/platform/qcom/venus/hfi_parser.c | 2 +- 4 files changed, 14 insertions(+), 86 deletions(-) --- base-commit: 24147897507cd3a7d63745d1518a638bf4132238 change-id: 20240507-cocci-flexarray-9a807a8e108e Best regards,