* [PATCH 1/1] iio: fix config watermark initial value @ 2016-03-24 9:09 Irina Tirdea 2016-03-24 9:23 ` Lars-Peter Clausen 0 siblings, 1 reply; 7+ messages in thread From: Irina Tirdea @ 2016-03-24 9:09 UTC (permalink / raw) To: Jonathan Cameron, linux-iio Cc: linux-kernel, Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald, Octavian Purdila, Irina Tirdea 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> --- 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 -- 1.9.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] iio: fix config watermark initial value 2016-03-24 9:09 [PATCH 1/1] iio: fix config watermark initial value Irina Tirdea @ 2016-03-24 9:23 ` Lars-Peter Clausen 2016-03-28 10:02 ` Jonathan Cameron 0 siblings, 1 reply; 7+ messages in thread From: Lars-Peter Clausen @ 2016-03-24 9:23 UTC (permalink / raw) To: Irina Tirdea, Jonathan Cameron, linux-iio Cc: linux-kernel, Hartmut Knaack, Peter Meerwald, Octavian Purdila 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 > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] iio: fix config watermark initial value 2016-03-24 9:23 ` Lars-Peter Clausen @ 2016-03-28 10:02 ` Jonathan Cameron 2016-06-16 11:56 ` Daniel Baluta 0 siblings, 1 reply; 7+ messages in thread From: Jonathan Cameron @ 2016-03-28 10:02 UTC (permalink / raw) To: Lars-Peter Clausen, Irina Tirdea, linux-iio Cc: linux-kernel, Hartmut Knaack, Peter Meerwald, Octavian Purdila On 24/03/16 09:23, Lars-Peter Clausen wrote: > 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") Applied to the fixes-togreg-post-rc1 branch of iio.git and marked for stable. Thanks, Jonathan > >> --- >> 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 >> > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] iio: fix config watermark initial value 2016-03-28 10:02 ` Jonathan Cameron @ 2016-06-16 11:56 ` Daniel Baluta 2016-06-16 16:16 ` Jonathan Cameron 0 siblings, 1 reply; 7+ messages in thread From: Daniel Baluta @ 2016-06-16 11:56 UTC (permalink / raw) To: Jonathan Cameron, laurentiu.palcu Cc: Lars-Peter Clausen, Irina Tirdea, linux-iio@vger.kernel.org, Linux Kernel Mailing List, Hartmut Knaack, Peter Meerwald, Octavian Purdila On Mon, Mar 28, 2016 at 1:02 PM, Jonathan Cameron <jic23@kernel.org> wrote: > On 24/03/16 09:23, Lars-Peter Clausen wrote: >> 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") > Applied to the fixes-togreg-post-rc1 branch of iio.git and marked for stable. > > Thanks, > > Jonathan >> >>> --- >>> 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 >>> >> > > -- Hi Jonathan, After a discussion with Laurentiu (Cc'ed), we noticed that this patch is not in the latest IIO (testing, togreg) tree. What is the path of an IIO fixes patch? thanks, Daniel. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] iio: fix config watermark initial value 2016-06-16 11:56 ` Daniel Baluta @ 2016-06-16 16:16 ` Jonathan Cameron 2016-06-16 16:19 ` Lars-Peter Clausen 0 siblings, 1 reply; 7+ messages in thread From: Jonathan Cameron @ 2016-06-16 16:16 UTC (permalink / raw) To: Daniel Baluta, Jonathan Cameron, laurentiu.palcu Cc: Lars-Peter Clausen, Irina Tirdea, linux-iio@vger.kernel.org, Linux Kernel Mailing List, Hartmut Knaack, Peter Meerwald, Octavian Purdila On 16 June 2016 12:56:11 BST, Daniel Baluta <daniel.baluta@gmail.com> wrote: >On Mon, Mar 28, 2016 at 1:02 PM, Jonathan Cameron <jic23@kernel.org> >wrote: >> On 24/03/16 09:23, Lars-Peter Clausen wrote: >>> 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") >> Applied to the fixes-togreg-post-rc1 branch of iio.git and marked for >stable. >> >> Thanks, >> >> Jonathan >>> >>>> --- >>>> 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 >>>> >>> >> >> -- > > >Hi Jonathan, > >After a discussion with Laurentiu (Cc'ed), we noticed that this patch >is not in the latest IIO (testing, togreg) tree. > >What is the path of an IIO fixes patch? > >thanks, >Daniel. Should be fixes-togreg then staging-linus then mainline. I probably messed up. Will check. Jonathan -- Sent from my Android device with K-9 Mail. Please excuse my brevity. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] iio: fix config watermark initial value 2016-06-16 16:16 ` Jonathan Cameron @ 2016-06-16 16:19 ` Lars-Peter Clausen 2016-06-19 19:46 ` Jonathan Cameron 0 siblings, 1 reply; 7+ messages in thread From: Lars-Peter Clausen @ 2016-06-16 16:19 UTC (permalink / raw) To: Jonathan Cameron, Daniel Baluta, Jonathan Cameron, laurentiu.palcu Cc: Irina Tirdea, linux-iio@vger.kernel.org, Linux Kernel Mailing List, Hartmut Knaack, Peter Meerwald, Octavian Purdila On 06/16/2016 06:16 PM, Jonathan Cameron wrote: > > > On 16 June 2016 12:56:11 BST, Daniel Baluta <daniel.baluta@gmail.com> wrote: >> On Mon, Mar 28, 2016 at 1:02 PM, Jonathan Cameron <jic23@kernel.org> >> wrote: >>> On 24/03/16 09:23, Lars-Peter Clausen wrote: >>>> 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") >>> Applied to the fixes-togreg-post-rc1 branch of iio.git and marked for >> stable. >>> >>> Thanks, >>> >>> Jonathan >>>> >>>>> --- >>>>> 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 >>>>> >>>> >>> >>> -- >> >> >> Hi Jonathan, >> >> After a discussion with Laurentiu (Cc'ed), we noticed that this patch >> is not in the latest IIO (testing, togreg) tree. >> >> What is the path of an IIO fixes patch? >> >> thanks, >> Daniel. > Should be fixes-togreg then staging-linus then mainline. To add to that once it is in mainline it will trickle down again through staging/next to iio/togreg. So there might be a fair amount of pipeline delay until it arrives in iio/{togreg,testing}. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] iio: fix config watermark initial value 2016-06-16 16:19 ` Lars-Peter Clausen @ 2016-06-19 19:46 ` Jonathan Cameron 0 siblings, 0 replies; 7+ messages in thread From: Jonathan Cameron @ 2016-06-19 19:46 UTC (permalink / raw) To: Lars-Peter Clausen, Jonathan Cameron, Daniel Baluta, laurentiu.palcu Cc: Irina Tirdea, linux-iio@vger.kernel.org, Linux Kernel Mailing List, Hartmut Knaack, Peter Meerwald, Octavian Purdila On 16/06/16 17:19, Lars-Peter Clausen wrote: > On 06/16/2016 06:16 PM, Jonathan Cameron wrote: >> >> >> On 16 June 2016 12:56:11 BST, Daniel Baluta <daniel.baluta@gmail.com> wrote: >>> On Mon, Mar 28, 2016 at 1:02 PM, Jonathan Cameron <jic23@kernel.org> >>> wrote: >>>> On 24/03/16 09:23, Lars-Peter Clausen wrote: >>>>> 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") >>>> Applied to the fixes-togreg-post-rc1 branch of iio.git and marked for >>> stable. >>>> >>>> Thanks, >>>> >>>> Jonathan >>>>> >>>>>> --- >>>>>> 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 >>>>>> >>>>> >>>> >>>> -- >>> >>> >>> Hi Jonathan, >>> >>> After a discussion with Laurentiu (Cc'ed), we noticed that this patch >>> is not in the latest IIO (testing, togreg) tree. >>> >>> What is the path of an IIO fixes patch? >>> >>> thanks, >>> Daniel. >> Should be fixes-togreg then staging-linus then mainline. > > To add to that once it is in mainline it will trickle down again through > staging/next to iio/togreg. So there might be a fair amount of pipeline > delay until it arrives in iio/{togreg,testing}. > It's now in staging-next which is the upstream for togreg. I've been a bit snowed under this week so it might be a little while yet before I get my next pull request out to Greg and then do a fast forward merge which will pull that change in. Thanks, Jonathan ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-06-19 19:46 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-03-24 9:09 [PATCH 1/1] iio: fix config watermark initial value Irina Tirdea 2016-03-24 9:23 ` Lars-Peter Clausen 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
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).