<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/tools/iio, branch linux-4.3.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>iio: lsiio: fix error code handling error</title>
<updated>2015-08-12T18:26:22+00:00</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2015-08-04T14:21:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=af255cd562aaa72455f9022a26afacd68f3fbf73'/>
<id>af255cd562aaa72455f9022a26afacd68f3fbf73</id>
<content type='text'>
commit acf50b3586f8d8a7530b905e111dda41876d38f4
"tools:iio:lsiio: add error handling"
introduced error handling of errors returned from
read_sysfs_string(), but with a simple if (retval),
missing the fact that these functions return a positive
value if the read was successful.

As a result lsiio regresses and does not show any
devices on my filesystem. Fix this by checking for
only negative error codes.

Cc: Hartmut Knaack &lt;knaack.h@gmx.de&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Acked-by: Hartmut Knaack &lt;knaack.h@gmx.de&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit acf50b3586f8d8a7530b905e111dda41876d38f4
"tools:iio:lsiio: add error handling"
introduced error handling of errors returned from
read_sysfs_string(), but with a simple if (retval),
missing the fact that these functions return a positive
value if the read was successful.

As a result lsiio regresses and does not show any
devices on my filesystem. Fix this by checking for
only negative error codes.

Cc: Hartmut Knaack &lt;knaack.h@gmx.de&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Acked-by: Hartmut Knaack &lt;knaack.h@gmx.de&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tools: iio: remove unnecessary double pointer</title>
<updated>2015-08-08T18:54:00+00:00</updated>
<author>
<name>Joo Aun Saw</name>
<email>jasaw@dius.com.au</email>
</author>
<published>2015-07-24T15:23:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=95ddd3f4b17e1df20b5e23d7b81614e7c8a643da'/>
<id>95ddd3f4b17e1df20b5e23d7b81614e7c8a643da</id>
<content type='text'>
Remove unnecessary double pointer from channel sorting function.

Signed-off-by: Joo Aun Saw &lt;jasaw@dius.com.au&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove unnecessary double pointer from channel sorting function.

Signed-off-by: Joo Aun Saw &lt;jasaw@dius.com.au&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tools: iio: Set caller's ci_array pointer to NULL after free</title>
<updated>2015-08-08T18:51:39+00:00</updated>
<author>
<name>Joo Aun Saw</name>
<email>jasaw@dius.com.au</email>
</author>
<published>2015-07-24T15:23:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=6b20f40679108e3c04e9bdb3d719e364ec29289e'/>
<id>6b20f40679108e3c04e9bdb3d719e364ec29289e</id>
<content type='text'>
On error, caller's ci_array is freed and set to NULL to avoid
potential double free if some other user of this code is not
sufficiently careful. Counter is reset to zero for consistency.

Signed-off-by: Joo Aun Saw &lt;jasaw@dius.com.au&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On error, caller's ci_array is freed and set to NULL to avoid
potential double free if some other user of this code is not
sufficiently careful. Counter is reset to zero for consistency.

Signed-off-by: Joo Aun Saw &lt;jasaw@dius.com.au&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tools: iio: iio_utils: Make calc_digits static</title>
<updated>2015-08-02T17:46:26+00:00</updated>
<author>
<name>Joo Aun Saw</name>
<email>jasaw@dius.com.au</email>
</author>
<published>2015-07-28T01:46:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=5e37c523921480093323c06529ab854f0635c59d'/>
<id>5e37c523921480093323c06529ab854f0635c59d</id>
<content type='text'>
Signed-off-by: Joo Aun Saw &lt;jasaw@dius.com.au&gt;
Acked-by: Daniel Baluta &lt;daniel.baluta@intel.com&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Joo Aun Saw &lt;jasaw@dius.com.au&gt;
Acked-by: Daniel Baluta &lt;daniel.baluta@intel.com&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tools: iio: iio_utils: remove unnecessary define guard</title>
<updated>2015-08-02T17:45:12+00:00</updated>
<author>
<name>Joo Aun Saw</name>
<email>jasaw@dius.com.au</email>
</author>
<published>2015-07-28T15:12:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=280f09256ab6f6180132da193b9f2e0b2fa61c51'/>
<id>280f09256ab6f6180132da193b9f2e0b2fa61c51</id>
<content type='text'>
Signed-off-by: Joo Aun Saw &lt;jasaw@dius.com.au&gt;
Acked-by: Daniel Baluta &lt;daniel.baluta@intel.com&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Joo Aun Saw &lt;jasaw@dius.com.au&gt;
Acked-by: Daniel Baluta &lt;daniel.baluta@intel.com&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tools: iio: print error message when buffer enable fails</title>
<updated>2015-08-02T17:39:27+00:00</updated>
<author>
<name>Irina Tirdea</name>
<email>irina.tirdea@intel.com</email>
</author>
<published>2015-07-24T13:28:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=e7231491ce6ae2053569166f60835a5594b3c0af'/>
<id>e7231491ce6ae2053569166f60835a5594b3c0af</id>
<content type='text'>
Running generic_buffer without enabling any channel of the
sensor will fail without printing any error message.

Add an error message that indicates buffer enable failed.

Signed-off-by: Irina Tirdea &lt;irina.tirdea@intel.com&gt;
Acked-by: Hartmut Knaack &lt;knaack.h@gmx.de&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Running generic_buffer without enabling any channel of the
sensor will fail without printing any error message.

Add an error message that indicates buffer enable failed.

Signed-off-by: Irina Tirdea &lt;irina.tirdea@intel.com&gt;
Acked-by: Hartmut Knaack &lt;knaack.h@gmx.de&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tools: iio: fix mask for 32 bit sensor data</title>
<updated>2015-08-02T17:38:22+00:00</updated>
<author>
<name>Irina Tirdea</name>
<email>irina.tirdea@intel.com</email>
</author>
<published>2015-07-24T13:28:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=ae067cb68d2ef42d4a84eeaf07411fe2936f48c4'/>
<id>ae067cb68d2ef42d4a84eeaf07411fe2936f48c4</id>
<content type='text'>
When the the sensor data uses 32 bits out of 32, generic_buffer prints
the value 0 for all data read.

In this case, the mask is shifted 32 bits, which is beyond the size of
an integer. This will lead to the mask always being 0. Before printing,
the mask is applied to the raw value, thus generating a final value of 0.

Fix the mask by shifting a 64 bit value instead of an integer.

Signed-off-by: Irina Tirdea &lt;irina.tirdea@intel.com&gt;
Acked-by: Hartmut Knaack &lt;knaack.h@gmx.de&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When the the sensor data uses 32 bits out of 32, generic_buffer prints
the value 0 for all data read.

In this case, the mask is shifted 32 bits, which is beyond the size of
an integer. This will lead to the mask always being 0. Before printing,
the mask is applied to the raw value, thus generating a final value of 0.

Fix the mask by shifting a 64 bit value instead of an integer.

Signed-off-by: Irina Tirdea &lt;irina.tirdea@intel.com&gt;
Acked-by: Hartmut Knaack &lt;knaack.h@gmx.de&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tools: iio: make scale and offset files optional</title>
<updated>2015-07-23T19:45:50+00:00</updated>
<author>
<name>Joo Aun Saw</name>
<email>jasaw@dius.com.au</email>
</author>
<published>2015-07-23T02:53:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=7868dfd216074fc5f902e7befacda2a0ec76e403'/>
<id>7868dfd216074fc5f902e7befacda2a0ec76e403</id>
<content type='text'>
Make scale and offset optional by adding -ENOENT check as not all
drivers implement them.

Signed-off-by: Joo Aun Saw &lt;jasaw@dius.com.au&gt;
Acked-by: Hartmut Knaack &lt;knaack.h@gmx.de&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make scale and offset optional by adding -ENOENT check as not all
drivers implement them.

Signed-off-by: Joo Aun Saw &lt;jasaw@dius.com.au&gt;
Acked-by: Hartmut Knaack &lt;knaack.h@gmx.de&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tools: iio: Send error messages to stderr</title>
<updated>2015-07-20T17:41:24+00:00</updated>
<author>
<name>Cristina Opriceana</name>
<email>cristina.opriceana@gmail.com</email>
</author>
<published>2015-07-17T15:43:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=d9abc615ea1659b6967a00e95b1b3a7fd4079b80'/>
<id>d9abc615ea1659b6967a00e95b1b3a7fd4079b80</id>
<content type='text'>
This patch indends to make some cleanup and send printf
error messages to stderr. The changes were performed with coccinelle
for failure messages and manual for other cases, such as wrong usage
messages.

Signed-off-by: Cristina Opriceana &lt;cristina.opriceana@gmail.com&gt;
Reviewed-by: Hartmut Knaack &lt;knaack.h@gmx.de&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch indends to make some cleanup and send printf
error messages to stderr. The changes were performed with coccinelle
for failure messages and manual for other cases, such as wrong usage
messages.

Signed-off-by: Cristina Opriceana &lt;cristina.opriceana@gmail.com&gt;
Reviewed-by: Hartmut Knaack &lt;knaack.h@gmx.de&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tools: iio: Add ARRAY_SIZE macro</title>
<updated>2015-07-20T17:41:23+00:00</updated>
<author>
<name>Cristina Opriceana</name>
<email>cristina.opriceana@gmail.com</email>
</author>
<published>2015-07-13T13:20:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=34cbea1908fb686b037e01e5b1ab8e0e67b09ed3'/>
<id>34cbea1908fb686b037e01e5b1ab8e0e67b09ed3</id>
<content type='text'>
Calculation of the length of an array can be done with the ARRAY_SIZE
macro to make code more abstract and remove the associated
checkpatch.pl warning.

Signed-off-by: Cristina Opriceana &lt;cristina.opriceana@gmail.com&gt;
Acked-by: Hartmut Knaack &lt;knaack.h@gmx.de&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Calculation of the length of an array can be done with the ARRAY_SIZE
macro to make code more abstract and remove the associated
checkpatch.pl warning.

Signed-off-by: Cristina Opriceana &lt;cristina.opriceana@gmail.com&gt;
Acked-by: Hartmut Knaack &lt;knaack.h@gmx.de&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
