<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/media/rc/lirc_dev.c, branch v4.8.16</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.8.16</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.8.16'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2016-07-13T18:29:03+00:00</updated>
<entry>
<title>[media] lirc_dev: use LIRC_CAN_REC() define to check if the device can receive</title>
<updated>2016-07-13T18:29:03+00:00</updated>
<author>
<name>Andi Shyti</name>
<email>andi.shyti@samsung.com</email>
</author>
<published>2016-07-06T09:01:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=273b902a5b1bfd6977a73c4de3eb96db3cb103cb'/>
<id>urn:sha1:273b902a5b1bfd6977a73c4de3eb96db3cb103cb</id>
<content type='text'>
The LIRC_CAN_REC() returns a boolean "flag &amp; LIRC_CAN_REC_MASK"
to check whether the device can receive data.

Signed-off-by: Andi Shyti &lt;andi.shyti@samsung.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@s-opensource.com&gt;
</content>
</entry>
<entry>
<title>[media] lirc_dev: fix potential segfault</title>
<updated>2016-07-13T18:28:25+00:00</updated>
<author>
<name>Andi Shyti</name>
<email>andi.shyti@samsung.com</email>
</author>
<published>2016-07-06T09:01:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8e5fa4c67d6387d40e2ae350e96fca939ba5e681'/>
<id>urn:sha1:8e5fa4c67d6387d40e2ae350e96fca939ba5e681</id>
<content type='text'>
When opening or closing a lirc character device, the framework
provides to the user the possibility to keep track of opening or
closing of the device by calling two functions:

 - set_use_inc() when opening the device
 - set_use_dec() when closing the device

if those are not set by the lirc user, the system segfaults.
Check the pointer value before calling the above functions.

Signed-off-by: Andi Shyti &lt;andi.shyti@samsung.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@s-opensource.com&gt;
</content>
</entry>
<entry>
<title>[media] lirc_dev: extremely trivial comment style fix</title>
<updated>2016-07-13T18:27:16+00:00</updated>
<author>
<name>Andi Shyti</name>
<email>andi.shyti@samsung.com</email>
</author>
<published>2016-07-06T09:01:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=62e92682c08885e91113ba742573e736c85db0e4'/>
<id>urn:sha1:62e92682c08885e91113ba742573e736c85db0e4</id>
<content type='text'>
Signed-off-by: Andi Shyti &lt;andi.shyti@samsung.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@s-opensource.com&gt;
</content>
</entry>
<entry>
<title>[media] lirc_dev: fix error return value</title>
<updated>2016-07-13T18:26:52+00:00</updated>
<author>
<name>Andi Shyti</name>
<email>andi.shyti@samsung.com</email>
</author>
<published>2016-07-06T09:01:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b408809487e0b80fdd7869f92b5ca3be55923e9d'/>
<id>urn:sha1:b408809487e0b80fdd7869f92b5ca3be55923e9d</id>
<content type='text'>
If ioctl is called, it cannot be a case of invalid system call
number (ENOSYS), that is a ENOTTY case which means that the
device doesn't support that specific ioctl command.

So, replace ENOSYS with ENOTTY.

Signed-off-by: Andi Shyti &lt;andi.shyti@samsung.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@s-opensource.com&gt;
</content>
</entry>
<entry>
<title>[media] lirc_dev: fix variable constant comparisons</title>
<updated>2016-07-13T18:25:41+00:00</updated>
<author>
<name>Andi Shyti</name>
<email>andi.shyti@samsung.com</email>
</author>
<published>2016-07-06T09:01:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9675ee5a8e42807ebd33bf4934f235911b5647b0'/>
<id>urn:sha1:9675ee5a8e42807ebd33bf4934f235911b5647b0</id>
<content type='text'>
When comparing a variable with a constant, the comparison should
start from the variable and not from the constant. It's also
written in the human DNA.

Swap the terms of comparisons whenever the constant comes first
and fix the following checkpatch warning:

  WARNING: Comparisons should place the constant on the right side of the test

Signed-off-by: Andi Shyti &lt;andi.shyti@samsung.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@s-opensource.com&gt;
</content>
</entry>
<entry>
<title>[media] lirc_dev: merge three if statements in only one</title>
<updated>2016-07-13T18:24:28+00:00</updated>
<author>
<name>Andi Shyti</name>
<email>andi.shyti@samsung.com</email>
</author>
<published>2016-07-06T09:01:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=14db9fc2d4e50d95d7586bc6c54029afbcbdf4a1'/>
<id>urn:sha1:14db9fc2d4e50d95d7586bc6c54029afbcbdf4a1</id>
<content type='text'>
The three if statements check the same thing, merge them in only
one statement.

Signed-off-by: Andi Shyti &lt;andi.shyti@samsung.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@s-opensource.com&gt;
</content>
</entry>
<entry>
<title>[media] lirc_dev: remove double if ... else statement</title>
<updated>2016-07-13T18:09:05+00:00</updated>
<author>
<name>Andi Shyti</name>
<email>andi.shyti@samsung.com</email>
</author>
<published>2016-07-06T09:01:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6ab86d2aa04375167c0e168eecb672acaf3d991a'/>
<id>urn:sha1:6ab86d2aa04375167c0e168eecb672acaf3d991a</id>
<content type='text'>
There are two if ... else which check the same thing in different
part of the code, they can be merged in a single check.

Signed-off-by: Andi Shyti &lt;andi.shyti@samsung.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@s-opensource.com&gt;
</content>
</entry>
<entry>
<title>[media] lirc_dev: simplify if statement in lirc_add_to_buf</title>
<updated>2016-07-13T18:06:29+00:00</updated>
<author>
<name>Andi Shyti</name>
<email>andi.shyti@samsung.com</email>
</author>
<published>2016-07-06T09:01:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=19e565397cb92b0484c46c48498e0fe2d2491efa'/>
<id>urn:sha1:19e565397cb92b0484c46c48498e0fe2d2491efa</id>
<content type='text'>
The whole function is inside an 'if' statement
("if (ir-&gt;d.add_to_buf)").

Check the opposite of that statement at the beginning and exit,
this way we can have one level less of indentation.

Signed-off-by: Andi Shyti &lt;andi.shyti@samsung.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@s-opensource.com&gt;
</content>
</entry>
<entry>
<title>[media] lirc_dev: do not use goto to create loops</title>
<updated>2016-07-13T18:01:13+00:00</updated>
<author>
<name>Andi Shyti</name>
<email>andi.shyti@samsung.com</email>
</author>
<published>2016-07-06T09:01:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7fe579d29f66e7dee77c50f39947a70a74929f4f'/>
<id>urn:sha1:7fe579d29f66e7dee77c50f39947a70a74929f4f</id>
<content type='text'>
... use "do .. while" instead.

Signed-off-by: Andi Shyti &lt;andi.shyti@samsung.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@s-opensource.com&gt;
</content>
</entry>
<entry>
<title>[media] lirc_dev: simplify goto paths</title>
<updated>2016-07-13T17:59:19+00:00</updated>
<author>
<name>Andi Shyti</name>
<email>andi.shyti@samsung.com</email>
</author>
<published>2016-07-06T09:01:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=54fcecafe5737d6987c2e6e203598e4dfb5112b0'/>
<id>urn:sha1:54fcecafe5737d6987c2e6e203598e4dfb5112b0</id>
<content type='text'>
The code can be rearranged so that some goto paths can be removed

Signed-off-by: Andi Shyti &lt;andi.shyti@samsung.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@s-opensource.com&gt;
</content>
</entry>
</feed>
