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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 27 Sep 2017 09:30:32 -0700
From:   Randy Dunlap <rdunlap@...radead.org>
To:     Thierry Escande <thierry.escande@...labora.com>,
        Benson Leung <bleung@...omium.org>,
        Jonathan Cameron <jic23@...nel.org>
Cc:     Enric Balletbo i Serra <enric.balletbo@...labora.com>,
        Gwendal Grignou <gwendal@...omium.org>,
        linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 3/4] platform/chrome: Add cros_ec_accel_legacy driver

On 09/27/17 09:22, Thierry Escande wrote:
> From: Gwendal Grignou <gwendal@...omium.org>
> 
> diff --git a/drivers/iio/accel/cros_ec_accel_legacy.c b/drivers/iio/accel/cros_ec_accel_legacy.c
> new file mode 100644
> index 0000000..3fc8185
> --- /dev/null
> +++ b/drivers/iio/accel/cros_ec_accel_legacy.c

Please use proper kernel-doc notation (or don't use /** to indicate kernel-doc).

> +/**
> + * read_ec_until_not_busy - read from EC status byte until it reads not busy.
> + *
> + * @st Pointer to state information for device.
> + * @return 8-bit status if ok, -ve on error
> + */
> +static int read_ec_until_not_busy(struct cros_ec_accel_legacy_state *st)
> +{
...
> +}

> +/**
> + * read_ec_accel_data_unsafe - read acceleration data from EC shared memory.
> + *
> + * @st Pointer to state information for device.
> + * @scan_mask Bitmap of the sensor indices to scan.
> + * @data Location to store data.
> + *
> + * Note this is the unsafe function for reading the EC data. It does not
> + * guarantee that the EC will not modify the data as it is being read in.
> + */
> +static void read_ec_accel_data_unsafe(struct cros_ec_accel_legacy_state *st,
> +				      unsigned long scan_mask, s16 *data)
> +{
...
> +}
> +

> +/**
> + * read_ec_accel_data - read acceleration data from EC shared memory.
> + *
> + * @st Pointer to state information for device.
> + * @scan_mask Bitmap of the sensor indices to scan.
> + * @data Location to store data.
> + * @return 0 if ok, -ve on error
> + *
> + * Note: this is the safe function for reading the EC data. It guarantees
> + * that the data sampled was not modified by the EC while being read.
> + */
> +static int read_ec_accel_data(struct cros_ec_accel_legacy_state *st,
> +			      unsigned long scan_mask, s16 *data)
> +{
...
> +}

> +
> +/**
> + * accel_capture - the trigger handler function
> + *

This one is closer, but the function name is shortened.

> + * @irq: the interrupt number
> + * @p: private data - always a pointer to the poll func.
> + *
> + * On a trigger event occurring, if the pollfunc is attached then this
> + * handler is called as a threaded interrupt (and hence may sleep). It
> + * is responsible for grabbing data from the device and pushing it into
> + * the associated buffer.
> + */
> +static irqreturn_t cros_ec_accel_legacy_capture(int irq, void *p)
> +{


Thanks.
-- 
~Randy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ