Messages in this thread | | | Date | Tue, 16 Aug 2022 05:11:33 +0000 | From | Tzung-Bi Shih <> | Subject | Re: [PATCH v5 3/7] platform/chrome: cros_typec_switch: Set EC retimer |
| |
On Mon, Aug 15, 2022 at 06:34:21AM +0000, Prashant Malani wrote: > +static int cros_typec_cmd_mux_set(struct cros_typec_switch_data *sdata, int port_num, u8 index, > + u8 state) > +{ > + struct typec_usb_mux_set params = { > + .mux_index = index, > + .mux_flags = state, > + }; > + > + struct ec_params_typec_control req = { > + .port = port_num, > + .command = TYPEC_CONTROL_COMMAND_USB_MUX_SET, > + .mux_params = params, > + };
Would it be better to avoid the memory copy by making `params` inline?
E.g.: struct ec_params_typec_control req = { ... .mux_params = { ... }, ...
> +/* > + * The Chrome EC treats both mode-switches and retimers as "muxes" for the purposes of the
To be consistent to the series, I guess you would like to use ChromeOS instead of Chrome?
| |