linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: "Stefan Brüns" <stefan.bruens@rwth-aachen.de>
Cc: <linux-iio@vger.kernel.org>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	Maciej Purski <m.purski@samsung.com>,
	<linux-kernel@vger.kernel.org>, "Andrew F . Davis" <afd@ti.com>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Hartmut Knaack <knaack.h@gmx.de>,
	"Javier Martinez Canillas" <javier@osg.samsung.com>
Subject: Re: [PATCH v1 2/7] iio: adc: ina2xx: Clarify size requirement for data buffer
Date: Sun, 17 Dec 2017 09:44:30 +0000	[thread overview]
Message-ID: <20171217094430.4e4908ca@archlinux> (raw)
In-Reply-To: <bbf3bcc5-a23c-4f2d-a6be-a349fea93252@rwthex-w2-a.rwth-ad.de>

On Fri, 8 Dec 2017 18:41:47 +0100
Stefan Brüns <stefan.bruens@rwth-aachen.de> wrote:

> The timestamp is inserted into the buffer after the sample data by
> iio_push_to_buffers_with_timestamp, document the space requirement for
> the timestamp.
> 
> Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Applied and pushed out as testing for the autobuilders to play with it.
Thanks,

Jonathan
> ---
> 
>  drivers/iio/adc/ina2xx-adc.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/adc/ina2xx-adc.c b/drivers/iio/adc/ina2xx-adc.c
> index 3195f8754c3b..8c8120406f52 100644
> --- a/drivers/iio/adc/ina2xx-adc.c
> +++ b/drivers/iio/adc/ina2xx-adc.c
> @@ -700,7 +700,8 @@ static const struct iio_chan_spec ina219_channels[] = {
>  static int ina2xx_work_buffer(struct iio_dev *indio_dev)
>  {
>  	struct ina2xx_chip_info *chip = iio_priv(indio_dev);
> -	unsigned short data[8];
> +	/* data buffer needs space for channel data and timestap */
> +	unsigned short data[4 + sizeof(s64)/sizeof(short)];
>  	int bit, ret, i = 0;
>  	s64 time_a, time_b;
>  	unsigned int alert;

  reply	other threads:[~2017-12-17  9:44 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20171208174152.30341-1-stefan.bruens@rwth-aachen.de>
2017-12-08 17:41 ` [PATCH v1 1/7] iio: adc: ina2xx: Remove bogus cast for data argument Stefan Brüns
2017-12-17  9:43   ` Jonathan Cameron
2017-12-08 17:41 ` [PATCH v1 2/7] iio: adc: ina2xx: Clarify size requirement for data buffer Stefan Brüns
2017-12-17  9:44   ` Jonathan Cameron [this message]
2017-12-08 17:41 ` [PATCH v1 3/7] iio: adc: ina2xx: Remove unneeded dummy read to clear CNVR flag Stefan Brüns
2017-12-10 17:27   ` Jonathan Cameron
2017-12-10 20:53     ` Stefan Brüns
2017-12-12 20:15       ` Jonathan Cameron
2017-12-12 23:48         ` Stefan Brüns
2017-12-17 10:09           ` Jonathan Cameron
2017-12-08 17:41 ` [PATCH v1 4/7] iio: adc: ina2xx: Do not udelay for several seconds Stefan Brüns
2017-12-17 11:53   ` Jonathan Cameron
2017-12-08 17:41 ` [PATCH v1 5/7] iio: adc: ina2xx: Use a monotonic clock for delay calculation Stefan Brüns
2017-12-10 17:31   ` Jonathan Cameron
2017-12-10 20:47     ` Stefan Brüns
2017-12-12 20:21       ` Jonathan Cameron
2017-12-17 11:56         ` Jonathan Cameron
2017-12-08 17:41 ` [PATCH v1 6/7] iio: adc: ina2xx: Align timestamp with conversion ready flag Stefan Brüns
2017-12-08 17:41 ` [PATCH v1 7/7] iio: adc: ina2xx: Actually align the loop with the " Stefan Brüns

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=20171217094430.4e4908ca@archlinux \
    --to=jic23@kernel.org \
    --cc=afd@ti.com \
    --cc=javier@osg.samsung.com \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.purski@samsung.com \
    --cc=pmeerw@pmeerw.net \
    --cc=stefan.bruens@rwth-aachen.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).