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]
Date:   Mon, 21 Mar 2022 10:39:22 +0200
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Jagath Jog J <jagathjog1996@...il.com>
Cc:     Dan Robertson <dan@...obertson.com>,
        Jonathan Cameron <jic23@...nel.org>,
        linux-iio <linux-iio@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v1 3/5] iio: accel: bma400: Add triggered buffer support

On Sat, Mar 19, 2022 at 8:10 PM Jagath Jog J <jagathjog1996@...il.com> wrote:
>
> Added trigger buffer support to read continuous acceleration
> data from device with data ready interrupt which is mapped
> to INT1 pin.

...

>  #include <linux/mutex.h>
>  #include <linux/regmap.h>
>  #include <linux/regulator/consumer.h>
> +#include <linux/bits.h>
> +#include <linux/bitfield.h>

It would be nice to keep the above in order.

> +#include <linux/iio/buffer.h>
> +#include <linux/iio/trigger.h>
> +#include <linux/iio/triggered_buffer.h>
> +#include <linux/iio/trigger_consumer.h>

These ones, possibly including iio headers from the above piece, are
good to be grouped together here with a blank line in between the
above part and iio/*.

...

> +static const unsigned long bma400_avail_scan_masks[] = {
> +       GENMASK(3, 0),

> +       0,

No need to have a comma in terminator entry.

> +};

...

> +       ret = regmap_bulk_read(data->regmap, BMA400_X_AXIS_LSB_REG,
> +                              &data->buffer.buff, 3 * sizeof(__be16));

sizeof(buff)

...

> +out:

A useless label. Moreover this raises a question: why is it okay to
always mark IRQ as handled?

> +       return IRQ_HANDLED;

...

> +                       dev_err(dev, "iio trigger register failed\n");
> +                       return ret;

return dev_err_probe();

...

> +                       dev_err(dev, "request irq %d failed\n", irq);
> +                       return ret;

Ditto.

...

> +               dev_err(dev, "iio triggered buffer setup failed\n");
> +               return ret;

Ditto.

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ