lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 16 Aug 2022 14:45:08 -0700
From:   Prashant Malani <pmalani@...omium.org>
To:     Tzung-Bi Shih <tzungbi@...nel.org>
Cc:     linux-kernel@...r.kernel.org, chrome-platform@...ts.linux.dev,
        bleung@...omium.org, Daisuke Nojiri <dnojiri@...omium.org>,
        "Dustin L. Howett" <dustin@...ett.net>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Guenter Roeck <groeck@...omium.org>,
        "Gustavo A. R. Silva" <gustavoars@...nel.org>,
        Tinghan Shen <tinghan.shen@...iatek.com>,
        Xiang wangx <wangxiang@...rlc.com>
Subject: Re: [PATCH v5 3/7] platform/chrome: cros_typec_switch: Set EC retimer

On Mon, Aug 15, 2022 at 10:11 PM Tzung-Bi Shih <tzungbi@...nel.org> wrote:
>
> 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 = {
>         ...
>     },
>     ...

Done.

>
> > +/*
> > + * 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?
Fixed in v6.

>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ