On Mon, Mar 17, 2025 at 11:25:40AM +1030, Gustavo A. R. Silva wrote:
>  static int cros_ec_mkbp_proximity_query(struct cros_ec_device *ec_dev,
>                                       int *state)
>  {
> -     struct {
> -             struct cros_ec_command msg;
> -             union {
> -                     struct ec_params_mkbp_info params;
> -                     u32 switches;
> -             };
> -     } __packed buf = { };
> -     struct ec_params_mkbp_info *params = &buf.params;
> -     struct cros_ec_command *msg = &buf.msg;
> -     u32 *switches = &buf.switches;
> +     DEFINE_RAW_FLEX(struct cros_ec_command, buf, data, sizeof(u32));

max(sizeof(struct ec_params_mkbp_info), sizeof(u32))?

Reply via email to