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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAD=FV=VPK4fQeYGFh2wzxgwt5Wo7hK6JpQ9sN7QM9Q0_w7AALw@mail.gmail.com>
Date:   Thu, 20 Jun 2019 14:46:33 -0700
From:   Doug Anderson <dianders@...omium.org>
To:     Gwendal Grignou <gwendal@...omium.org>
Cc:     Jonathan Cameron <jic23@...nel.org>,
        Benson Leung <bleung@...omium.org>,
        Enric Balletbo i Serra <enric.balletbo@...labora.com>,
        Guenter Roeck <groeck@...omium.org>,
        linux-iio <linux-iio@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Fabien Lahoudere <fabien.lahoudere@...labora.com>
Subject: Re: [PATCH 1/2] iio: cros_ec: Add sign vector in core for backward compatibility

Hi,

On Thu, Jun 20, 2019 at 11:53 AM Gwendal Grignou <gwendal@...omium.org> wrote:
>
> To allow cros_ec iio core library to be used with legacy device, add a
> vector to rotate sensor data if necessary: legacy devices are not
> reporting data in HTML5/Android sensor referential.
>
> TEST=On veyron minnie, check chrome detect tablet mode and rotate
> screen in tablet mode.

TEST= doesn't belong in an upstream patch.


> Signed-off-by: Gwendal Grignou <gwendal@...omium.org>
> ---
>  drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c | 5 ++++-
>  include/linux/iio/common/cros_ec_sensors_core.h           | 1 +
>  2 files changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c b/drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c
> index 719a0df5aeeb..1b2e7a8242ad 100644
> --- a/drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c
> +++ b/drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c
> @@ -66,8 +66,10 @@ int cros_ec_sensors_core_init(struct platform_device *pdev,
>                 }
>                 state->type = state->resp->info.type;
>                 state->loc = state->resp->info.location;
> -       }
>
> +               /* Set sign vector, only used for backward compatibility. */
> +               memset(state->sign, 1, CROS_EC_SENSOR_MAX_AXIS);
> +       }
>         return 0;

Normally there's a blank line before the "return".  There was before
your patch.  Why did you remove it?  It'll make your diff cleaner if
you keep it.

Also, should you be basing your patch atop +Fabien's series?  I notice
you got a conflict when you picked this into the Chrome OS tree, but
maybe you wouldn't have if you had based atop
<https://lore.kernel.org/patchwork/patch/1090463/> AKA
<https://lkml.kernel.org/r/ac3cdc104e59565d178dfa86f2727045224dc4da.1560848479.git.fabien.lahoudere@collabora.com>


-Doug

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ