On 17/03/25 12:02, Tzung-Bi Shih wrote:
On Mon, Mar 17, 2025 at 11:24:59AM +1030, Gustavo A. R. Silva wrote:
  static int cros_ec_get_host_cmd_version_mask(struct cros_ec_device *ec_dev,
                                             u16 cmd_offset, u16 cmd, u32 *mask)
  {
+       DEFINE_RAW_FLEX(struct cros_ec_command, buf, data,
+                       sizeof(struct ec_response_get_cmd_versions));

max(sizeof(struct ec_params_get_cmd_versions),
     sizeof(struct ec_response_get_cmd_versions))?

I considered that, but DEFINE_RAW_FLEX() complains about it due to the

_Static_assert(__builtin_constant_p(count),                             \
                       "onstack flex array members require compile-time const 
count");

--
Gustavo


Reply via email to