From: Jonathan Cameron <jic23@kernel.org>
To: Dan Murphy <dmurphy@ti.com>
Cc: <linux-iio@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<robh+dt@kernel.org>
Subject: Re: [PATCH v2 3/4] iio: ti-ads8688: Update buffer allocation for timestamps
Date: Sun, 16 Dec 2018 11:06:39 +0000 [thread overview]
Message-ID: <20181216110639.3eb2e7b9@archlinux> (raw)
In-Reply-To: <20181211191207.21900-3-dmurphy@ti.com>
On Tue, 11 Dec 2018 13:12:06 -0600
Dan Murphy <dmurphy@ti.com> wrote:
> Per Jonathan Cameron, the buffer needs to allocate room for a
> 64 bit timestamp as well as the channels. Change the buffer
> to allocate this additional space.
>
> Signed-off-by: Dan Murphy <dmurphy@ti.com>
Same question around data types as in the previous patch.
If you can track down the original patch that introduced the bug and add
add a fixes tag, that would be great as well. This one should go into
stable.
Thanks,
Jonathan
> ---
>
> v2 - New patch suggested change by maintainer - https://lore.kernel.org/patchwork/patch/1021048/
>
> drivers/iio/adc/ti-ads8688.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/adc/ti-ads8688.c b/drivers/iio/adc/ti-ads8688.c
> index 184d686ebd99..3597bc0697ee 100644
> --- a/drivers/iio/adc/ti-ads8688.c
> +++ b/drivers/iio/adc/ti-ads8688.c
> @@ -385,7 +385,7 @@ static irqreturn_t ads8688_trigger_handler(int irq, void *p)
> {
> struct iio_poll_func *pf = p;
> struct iio_dev *indio_dev = pf->indio_dev;
> - u16 buffer[8];
> + unsigned short buffer[8 + sizeof(s64)/sizeof(short)];
Why change from a well defined size of data to one that is only
defined by the c spec to be no more than the size of an int?
> int i, j = 0;
>
> for (i = 0; i < indio_dev->masklength; i++) {
next prev parent reply other threads:[~2018-12-16 11:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-11 19:12 [PATCH v2 1/4] iio: ti-ads124s08: Add DT binding documentation Dan Murphy
2018-12-11 19:12 ` [PATCH v2 2/4] iio: adc: Add the TI ads124s08 ADC code Dan Murphy
2018-12-16 11:04 ` Jonathan Cameron
2018-12-11 19:12 ` [PATCH v2 3/4] iio: ti-ads8688: Update buffer allocation for timestamps Dan Murphy
2018-12-16 11:06 ` Jonathan Cameron [this message]
2018-12-19 17:45 ` Dan Murphy
2018-12-11 19:12 ` [PATCH v2 4/4] iio: ti-ads8688: Migrate to device managed IIO calls Dan Murphy
2018-12-16 11:10 ` Jonathan Cameron
2018-12-16 10:52 ` [PATCH v2 1/4] iio: ti-ads124s08: Add DT binding documentation Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181216110639.3eb2e7b9@archlinux \
--to=jic23@kernel.org \
--cc=dmurphy@ti.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.