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:   Wed, 22 Jul 2020 00:38:44 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Nishant Malpani <nish.malpani25@...il.com>
Cc:     Jonathan Cameron <jic23@...nel.org>,
        "Bogdan, Dragos" <dragos.bogdan@...log.com>,
        darius.berghe@...log.com,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-iio <linux-iio@...r.kernel.org>
Subject: Re: [PATCH v2 1/2] iio: gyro: Add driver support for ADXRS290

On Tue, Jul 21, 2020 at 11:35 PM Nishant Malpani
<nish.malpani25@...il.com> wrote:
> On 22/07/20 1:16 am, Andy Shevchenko wrote:
> > On Tue, Jul 21, 2020 at 9:20 PM Nishant Malpani
> > <nish.malpani25@...il.com> wrote:

...

> >> +               *vals = (const int *)adxrs290_lpf_3db_freq_tbl;
> >
> > Why casting?
> >
> adxrs290_lpf_3db_freq_tbl is of type (int *)[2], right? Without the
> casting, an incompatible-pointer-type error is thrown.
>
> > ...
> >
> >> +               *vals = (const int *)adxrs290_hpf_3db_freq_tbl;
> >
> > Ditto.
> >
> See above comment.

Can't you declare table as const int?

...

> >> +       /* max transition time to measurement mode */
> >> +       msleep_interruptible(ADXRS290_MAX_TRANSITION_TIME_MS);
> >
> > I'm not sure what the point of interruptible variant here?
> >
> I referred Documentation/timers/timers-howto.rst for this.
> My reasoning was shaped to use the interruptible variant because the
> transition settles in a time *less than* 100ms and since 100ms is quite
> a huge time to sleep, it should be interrupted in case a signal arrives.

This is probe of the device,
What are the expectations here?

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ