search for: args_u

Displaying 2 results from an estimated 2 matches for "args_u".

Did you mean: args_r
2024 Aug 22
1
[PATCH][next] drm/nouveau: Avoid -Wflex-array-member-not-at-end warning
...ther be a define: nv50_hdmi_enable(...) { ... #define data_len 17 DEFINE_RAW_FLEX(struct nvif_outp_infoframe_v0, args, data, data_len); ...rest of function... #undef data_len } or an ungainly but compile-time calculated value that exposes some DEFINE_FLEX internals: const u8 data_len = (sizeof(args_u) - sizeof(*args)) / sizeof(*args->data); (Maybe a helper is needed for that?) #define STACK_FLEX_COUNT(name, member) \ ((sizeof(name##_u) = sizeof(*(name))) / sizeof(*(name)->member)) > @@ -815,29 +813,29 @@ nv50_hdmi_enable(struct drm_encoder *encoder, struct nouveau_crtc *nv_crtc, &g...
2024 Aug 21
2
[PATCH][next] drm/nouveau: Avoid -Wflex-array-member-not-at-end warning
Use the `DEFINE_RAW_FLEX()` helper for an on-stack definition of a flexible structure where the size of the flexible-array member is known at compile-time, and refactor the rest of the code, accordingly. So, with this, fix the following warning: drivers/gpu/drm/nouveau/dispnv50/disp.c:779:47: warning: structure containing a flexible array member is not at the end of another structure