<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/auxdisplay, branch linux-5.17.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>auxdisplay: lcd2s: Use proper API to free the instance of charlcd object</title>
<updated>2022-03-02T23:30:31+00:00</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2022-02-23T15:47:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=9ed331f8a0fb674f4f06edf05a1687bf755af27b'/>
<id>9ed331f8a0fb674f4f06edf05a1687bf755af27b</id>
<content type='text'>
While it might work, the current approach is fragile in a few ways:
- whenever members in the structure are shuffled, the pointer will be wrong
- the resource freeing may include more than covered by kfree()

Fix this by using charlcd_free() call instead of kfree().

Fixes: 8c9108d014c5 ("auxdisplay: add a driver for lcd2s character display")
Cc: Lars Poeschel &lt;poeschel@lemonage.de&gt;
Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While it might work, the current approach is fragile in a few ways:
- whenever members in the structure are shuffled, the pointer will be wrong
- the resource freeing may include more than covered by kfree()

Fix this by using charlcd_free() call instead of kfree().

Fixes: 8c9108d014c5 ("auxdisplay: add a driver for lcd2s character display")
Cc: Lars Poeschel &lt;poeschel@lemonage.de&gt;
Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>auxdisplay: lcd2s: Fix memory leak in -&gt;remove()</title>
<updated>2022-03-02T23:30:14+00:00</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2022-02-23T15:47:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=898c0a15425a5bcaa8d44bd436eae5afd2483796'/>
<id>898c0a15425a5bcaa8d44bd436eae5afd2483796</id>
<content type='text'>
Once allocated the struct lcd2s_data is never freed.
Fix the memory leak by switching to devm_kzalloc().

Fixes: 8c9108d014c5 ("auxdisplay: add a driver for lcd2s character display")
Cc: Lars Poeschel &lt;poeschel@lemonage.de&gt;
Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Once allocated the struct lcd2s_data is never freed.
Fix the memory leak by switching to devm_kzalloc().

Fixes: 8c9108d014c5 ("auxdisplay: add a driver for lcd2s character display")
Cc: Lars Poeschel &lt;poeschel@lemonage.de&gt;
Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>auxdisplay: lcd2s: Fix lcd2s_redefine_char() feature</title>
<updated>2022-03-02T23:29:26+00:00</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2022-02-23T15:47:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=4424c35ead667ba2e8de7ab8206da66453e6f728'/>
<id>4424c35ead667ba2e8de7ab8206da66453e6f728</id>
<content type='text'>
It seems that the lcd2s_redefine_char() has never been properly
tested. The buffer is filled by DEF_CUSTOM_CHAR command followed
by the character number (from 0 to 7), but immediately after that
these bytes are rewritten by the decoded hex stream.

Fix the index to fill the buffer after the command and number.

Fixes: 8c9108d014c5 ("auxdisplay: add a driver for lcd2s character display")
Cc: Lars Poeschel &lt;poeschel@lemonage.de&gt;
Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Reviewed-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
[fixed typo in commit message]
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It seems that the lcd2s_redefine_char() has never been properly
tested. The buffer is filled by DEF_CUSTOM_CHAR command followed
by the character number (from 0 to 7), but immediately after that
these bytes are rewritten by the decoded hex stream.

Fix the index to fill the buffer after the command and number.

Fixes: 8c9108d014c5 ("auxdisplay: add a driver for lcd2s character display")
Cc: Lars Poeschel &lt;poeschel@lemonage.de&gt;
Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Reviewed-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
[fixed typo in commit message]
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>auxdisplay: charlcd: checking for pointer reference before dereferencing</title>
<updated>2021-11-24T10:46:52+00:00</updated>
<author>
<name>Luiz Sampaio</name>
<email>sampaio.ime@gmail.com</email>
</author>
<published>2021-11-09T22:07:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=4daa9ff89ef27be43c15995412d6aee393a78200'/>
<id>4daa9ff89ef27be43c15995412d6aee393a78200</id>
<content type='text'>
Check if the pointer lcd-&gt;ops-&gt;init_display exists before dereferencing it.
If a driver called charlcd_init() without defining the ops, this would
return segmentation fault, as happened to me when implementing a charlcd
driver.  Checking the pointer before dereferencing protects from
segmentation fault.

Signed-off-by: Luiz Sampaio &lt;sampaio.ime@gmail.com&gt;
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Check if the pointer lcd-&gt;ops-&gt;init_display exists before dereferencing it.
If a driver called charlcd_init() without defining the ops, this would
return segmentation fault, as happened to me when implementing a charlcd
driver.  Checking the pointer before dereferencing protects from
segmentation fault.

Signed-off-by: Luiz Sampaio &lt;sampaio.ime@gmail.com&gt;
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>auxdisplay: charlcd: fixing coding style issue</title>
<updated>2021-11-24T10:46:42+00:00</updated>
<author>
<name>Luiz Sampaio</name>
<email>sampaio.ime@gmail.com</email>
</author>
<published>2021-11-09T22:07:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=94047df12fec0e51e860b5317223f67a3ea4eb07'/>
<id>94047df12fec0e51e860b5317223f67a3ea4eb07</id>
<content type='text'>
Removing 'int' from 'unsigned long int' declaration, which is unnecessary.

Signed-off-by: Luiz Sampaio &lt;sampaio.ime@gmail.com&gt;
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Removing 'int' from 'unsigned long int' declaration, which is unnecessary.

Signed-off-by: Luiz Sampaio &lt;sampaio.ime@gmail.com&gt;
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>auxdisplay: cfag12864bfb: code indent should use tabs where possible</title>
<updated>2021-10-21T22:13:16+00:00</updated>
<author>
<name>Huiquan Deng</name>
<email>denghuiquan@cdjrlc.com</email>
</author>
<published>2021-07-29T06:39:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=4e5d74fc6b044c4b0fa5b661e0a8652f08743223'/>
<id>4e5d74fc6b044c4b0fa5b661e0a8652f08743223</id>
<content type='text'>
Resolves the checkpatch error.

Signed-off-by: Huiquan Deng &lt;denghuiquan@cdjrlc.com&gt;
[reworded and avoid moving the line]
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Resolves the checkpatch error.

Signed-off-by: Huiquan Deng &lt;denghuiquan@cdjrlc.com&gt;
[reworded and avoid moving the line]
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>auxdisplay: ht16k33: remove superfluous header files</title>
<updated>2021-10-21T22:07:29+00:00</updated>
<author>
<name>Mianhan Liu</name>
<email>liumh1@shanghaitech.edu.cn</email>
</author>
<published>2021-09-28T19:15:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=1515b849f726f60dfff5c0bde2b0713cac26dd6c'/>
<id>1515b849f726f60dfff5c0bde2b0713cac26dd6c</id>
<content type='text'>
ht16k33.c doesn't use any macro or function declared in
linux/slab.h. Thus, these files can be removed from ht16k33.c
safely without affecting the compilation.

Signed-off-by: Mianhan Liu &lt;liumh1@shanghaitech.edu.cn&gt;
Acked-by: Robin van der Gracht &lt;robin@protonic.nl&gt;
[reworded]
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ht16k33.c doesn't use any macro or function declared in
linux/slab.h. Thus, these files can be removed from ht16k33.c
safely without affecting the compilation.

Signed-off-by: Mianhan Liu &lt;liumh1@shanghaitech.edu.cn&gt;
Acked-by: Robin van der Gracht &lt;robin@protonic.nl&gt;
[reworded]
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>auxdisplay: ks0108: remove superfluous header files</title>
<updated>2021-10-21T22:04:43+00:00</updated>
<author>
<name>Mianhan Liu</name>
<email>liumh1@shanghaitech.edu.cn</email>
</author>
<published>2021-09-28T19:06:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=2b7ea42e7e29cc6c96f255a5c5289630ca612be0'/>
<id>2b7ea42e7e29cc6c96f255a5c5289630ca612be0</id>
<content type='text'>
ks0108.c doesn't use any macro or function declared in
linux/fs.h, linux/io.h and linux/uaccess.h. Thus,
these files can be removed from ks0108.c safely without
affecting the compilation.

Signed-off-by: Mianhan Liu &lt;liumh1@shanghaitech.edu.cn&gt;
[reworded]
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ks0108.c doesn't use any macro or function declared in
linux/fs.h, linux/io.h and linux/uaccess.h. Thus,
these files can be removed from ks0108.c safely without
affecting the compilation.

Signed-off-by: Mianhan Liu &lt;liumh1@shanghaitech.edu.cn&gt;
[reworded]
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>auxdisplay: cfag12864bfb: remove superfluous header files</title>
<updated>2021-10-21T22:03:49+00:00</updated>
<author>
<name>Mianhan Liu</name>
<email>liumh1@shanghaitech.edu.cn</email>
</author>
<published>2021-09-28T19:21:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=83bb3d512fc256cf3bbfb0aa961bc025a561d31e'/>
<id>83bb3d512fc256cf3bbfb0aa961bc025a561d31e</id>
<content type='text'>
cfag12864bfb.c doesn't use any macro or function declared in
linux/delay.h, linux/string.h and linux/uaccess.h. Thus,
these files can be removed from cfag12864bfb.c safely without
affecting the compilation.

Signed-off-by: Mianhan Liu &lt;liumh1@shanghaitech.edu.cn&gt;
[reworded]
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
cfag12864bfb.c doesn't use any macro or function declared in
linux/delay.h, linux/string.h and linux/uaccess.h. Thus,
these files can be removed from cfag12864bfb.c safely without
affecting the compilation.

Signed-off-by: Mianhan Liu &lt;liumh1@shanghaitech.edu.cn&gt;
[reworded]
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>auxdisplay: ht16k33: Make use of device properties</title>
<updated>2021-10-21T21:36:30+00:00</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert@linux-m68k.org</email>
</author>
<published>2021-10-19T14:45:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=5d343f7c458caf4d4ff050617f539ff4667c8253'/>
<id>5d343f7c458caf4d4ff050617f539ff4667c8253</id>
<content type='text'>
The device property API allows drivers to gather device resources from
different sources, such as ACPI, and lift the dependency on Device Tree.
Convert the driver to unleash the power of the device property API.

Suggested-by: Marek Behún &lt;kabel@kernel.org&gt;
Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Reviewed-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Acked-by: Robin van der Gracht &lt;robin@protonic.nl&gt;
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The device property API allows drivers to gather device resources from
different sources, such as ACPI, and lift the dependency on Device Tree.
Convert the driver to unleash the power of the device property API.

Suggested-by: Marek Behún &lt;kabel@kernel.org&gt;
Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Reviewed-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Acked-by: Robin van der Gracht &lt;robin@protonic.nl&gt;
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
