From: Lars-Peter Clausen <lars@metafoo.de>
To: Irina Tirdea <irina.tirdea@intel.com>,
Jonathan Cameron <jic23@kernel.org>,
linux-iio@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Hartmut Knaack <knaack.h@gmx.de>,
Peter Meerwald <pmeerw@pmeerw.net>,
Octavian Purdila <octavian.purdila@intel.com>
Subject: Re: [PATCH 1/1] iio: fix config watermark initial value
Date: Thu, 24 Mar 2016 10:23:35 +0100 [thread overview]
Message-ID: <56F3B217.8040206@metafoo.de> (raw)
In-Reply-To: <1458810585-24555-1-git-send-email-irina.tirdea@intel.com>
On 03/24/2016 10:09 AM, Irina Tirdea wrote:
> config structure is set to 0 when updating the buffers, so by
> default config->watermark will be 0. When computing the minimum
> between config->watermark and the buffer->watermark or
> insert_buffer-watermark, this will always be 0 regardless of the
> value set by the user for the buffer.
>
> Set as initial value for config->watermark the maximum allowed
> value so that the minimum value will always be set from one of the
> buffers.
>
> Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Looks good. This bug was my fault, sorry.
Fixes: f0566c0c405d ("iio: Set device watermark based on watermark of all
attached buffers")
> ---
> drivers/iio/industrialio-buffer.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/iio/industrialio-buffer.c b/drivers/iio/industrialio-buffer.c
> index b976332..90462fc 100644
> --- a/drivers/iio/industrialio-buffer.c
> +++ b/drivers/iio/industrialio-buffer.c
> @@ -653,6 +653,7 @@ static int iio_verify_update(struct iio_dev *indio_dev,
> unsigned int modes;
>
> memset(config, 0, sizeof(*config));
> + config->watermark = ~0;
>
> /*
> * If there is just one buffer and we are removing it there is nothing
>
next prev parent reply other threads:[~2016-03-24 9:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-24 9:09 [PATCH 1/1] iio: fix config watermark initial value Irina Tirdea
2016-03-24 9:23 ` Lars-Peter Clausen [this message]
2016-03-28 10:02 ` Jonathan Cameron
2016-06-16 11:56 ` Daniel Baluta
2016-06-16 16:16 ` Jonathan Cameron
2016-06-16 16:19 ` Lars-Peter Clausen
2016-06-19 19:46 ` 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=56F3B217.8040206@metafoo.de \
--to=lars@metafoo.de \
--cc=irina.tirdea@intel.com \
--cc=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=octavian.purdila@intel.com \
--cc=pmeerw@pmeerw.net \
/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.