All of lore.kernel.org
 help / color / mirror / Atom feed
* generic_buffer.c bug
@ 2015-10-28  5:26 Matt Ranostay
  2015-10-31 10:43 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Matt Ranostay @ 2015-10-28  5:26 UTC (permalink / raw)
  To: Jonathan Cameron, linux-iio

Jonathan et all,

Well actually this issues is in the build_channel_array function
located in iio_utils.c, but when testing my LIDAR driver with the
generic_buffer tool I found the following corner case.

So in_distance_* has a scale entry but no offset so it in turn it
fails.. at line 495 in iio_utils.c

Thanks,

Matt

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: generic_buffer.c bug
  2015-10-28  5:26 generic_buffer.c bug Matt Ranostay
@ 2015-10-31 10:43 ` Jonathan Cameron
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2015-10-31 10:43 UTC (permalink / raw)
  To: Matt Ranostay, linux-iio

On 28/10/15 05:26, Matt Ranostay wrote:
> Jonathan et all,
> 
> Well actually this issues is in the build_channel_array function
> located in iio_utils.c, but when testing my LIDAR driver with the
> generic_buffer tool I found the following corner case.
> 
> So in_distance_* has a scale entry but no offset so it in turn it
> fails.. at line 495 in iio_utils.c
This is odd.  That line currently contains:
if ((ret < 0) && (ret != -ENOENT))

The -ENOENT bit is there to deal with the file not existing.
Any chance you are using a version prior to the fix that added the
ENOENT check?
7868dfd216074fc5f902e7befacda2a0ec76e403
 tools: iio: make scale and offset files optional
from back on July.

There was a window in which it was broken prior to that.

Jonathan

> 
> Thanks,
> 
> Matt
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-10-31 10:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-28  5:26 generic_buffer.c bug Matt Ranostay
2015-10-31 10:43 ` Jonathan Cameron

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.