<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/tty/serial/icom.c, branch v6.6.131</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.131</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.131'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2022-08-30T12:22:35+00:00</updated>
<entry>
<title>serial: Make -&gt;set_termios() old ktermios const</title>
<updated>2022-08-30T12:22:35+00:00</updated>
<author>
<name>Ilpo Järvinen</name>
<email>ilpo.jarvinen@linux.intel.com</email>
</author>
<published>2022-08-16T11:57:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bec5b814d46c2a704c3c8148752e62a33e9fa6dc'/>
<id>urn:sha1:bec5b814d46c2a704c3c8148752e62a33e9fa6dc</id>
<content type='text'>
There should be no reason to adjust old ktermios which is going to get
discarded anyway.

Reviewed-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Signed-off-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20220816115739.10928-7-ilpo.jarvinen@linux.intel.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: icom: remove unused struct icom_port members</title>
<updated>2022-04-22T14:19:53+00:00</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2022-04-21T08:58:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f938948db9078c0a4f27013c9889239c8db62e37'/>
<id>urn:sha1:f938948db9078c0a4f27013c9889239c8db62e37</id>
<content type='text'>
Some members of struct icom_port are completely unused or only set and
never read. Remove all those.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Link: https://lore.kernel.org/r/20220421085808.24152-11-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: icom: delete empty serial hooks</title>
<updated>2022-04-22T14:19:52+00:00</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2022-04-21T08:58:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7664b7a16b16dba0eac077dfc15c5c983ceed2c6'/>
<id>urn:sha1:7664b7a16b16dba0eac077dfc15c5c983ceed2c6</id>
<content type='text'>
uart_ops::release_port() and uart_ops::request_port() are not required
by the serial layer. So no need to define empty ones.

Remove them.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Link: https://lore.kernel.org/r/20220421085808.24152-10-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: icom: use list_for_each_entry()</title>
<updated>2022-04-22T14:19:52+00:00</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2022-04-21T08:58:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e391e325478f9c4d4cae757ef528f21d605f450a'/>
<id>urn:sha1:e391e325478f9c4d4cae757ef528f21d605f450a</id>
<content type='text'>
Use list_for_each_entry() helper instead of explicit combo of
list_for_each() and list_entry().

Note that pos is used as a reference point in list_add_tail() in
icom_alloc_adapter(). This functionality remains as with an empty list,
cur_adapter_entry-&gt;icom_adapter_entry is still the list head.

This simplifies the code a bit.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Link: https://lore.kernel.org/r/20220421085808.24152-9-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: icom: make icom_acfg_baud const and unsigned</title>
<updated>2022-04-22T14:19:52+00:00</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2022-04-21T08:58:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8b026d636d4a4a92533b7f28a86e59ffd6d7acad'/>
<id>urn:sha1:8b026d636d4a4a92533b7f28a86e59ffd6d7acad</id>
<content type='text'>
The baud rates are unsigned constants. So mark them as such.

Not only it makes sense, but they are passed also to
uart_get_baud_rate() and that expects unsigned int as baud rates on
input.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Link: https://lore.kernel.org/r/20220421085808.24152-8-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: icom: use ARRAY_SIZE</title>
<updated>2022-04-22T14:19:52+00:00</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2022-04-21T08:58:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=05ef2f3dd0cb3dd0b92691312042234083eabd01'/>
<id>urn:sha1:05ef2f3dd0cb3dd0b92691312042234083eabd01</id>
<content type='text'>
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Link: https://lore.kernel.org/r/20220421085808.24152-7-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: icom: move header content to .c</title>
<updated>2022-04-22T14:19:52+00:00</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2022-04-21T08:58:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=59a1d562d35ea49b7d00d963b16b47b3ed0b3568'/>
<id>urn:sha1:59a1d562d35ea49b7d00d963b16b47b3ed0b3568</id>
<content type='text'>
There is no point keeping the header content separated. The header was
not even protected against double inclusion. So move the content to the
appropriate source file.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Link: https://lore.kernel.org/r/20220421085808.24152-6-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: icom: use proper __le types and functions</title>
<updated>2022-04-22T14:19:52+00:00</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2022-04-21T08:58:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7a5f86e86b7a2466c80c7d383efd66151d70c015'/>
<id>urn:sha1:7a5f86e86b7a2466c80c7d383efd66151d70c015</id>
<content type='text'>
There is a lot of sparse warnings:
  .../icom.c:228:30: warning: cast from restricted __le16
  .../icom.c:232:66: warning: incorrect type in assignment (different base types)
  .../icom.c:232:66:    expected unsigned int [usertype] leBuffer
  .../icom.c:232:66:    got restricted __le32 [usertype]
  .../icom.c:237:30: warning: cast from restricted __le16
  ...
  .../icom.c:1228:22: warning: cast from restricted __le16

And they are correct. So sort them all out by using proper __leXX and
uXX types and the right direction of conversion: le16_to_cpu() instead
of cpu_to_le16(), where appropriate.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Link: https://lore.kernel.org/r/20220421085808.24152-5-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: icom: remove to_icom_adapter() and icom_kref_release()</title>
<updated>2022-04-22T14:19:52+00:00</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2022-04-21T08:58:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2c334f12dc2523f28be5cda26d15b6fdeb70bddc'/>
<id>urn:sha1:2c334f12dc2523f28be5cda26d15b6fdeb70bddc</id>
<content type='text'>
Integrate both the to_icom_adapter() macro and icom_kref_release()
wrapper into icom_remove_adapter(). (And keep it icom_kref_release()
name.)

It makes the code easier to follow without complex indirections.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Link: https://lore.kernel.org/r/20220421085808.24152-4-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: icom: switch vague casts to container_of</title>
<updated>2022-04-22T14:19:52+00:00</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2022-04-21T08:58:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f73989f58d54b5b01363a2627dd9c99710770d62'/>
<id>urn:sha1:f73989f58d54b5b01363a2627dd9c99710770d62</id>
<content type='text'>
In icom, there is an ICOM_PORT macro to perform upcasts from struct
uart_port to struct icom_port. It's not completely safe and it works
only because the first member of icom_port is uart_port. Nowadays, we
use container_of for such an upcast instead.

So introduce a helper (to_icom_port()) with container_of in it and
convert all the ICOM_PORT users to the new helper. Apart from the code
and type safety, it's also clear what icom_port (the variable) is.
Unlike with the old ICOM_PORT (the macro with the cast).

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Link: https://lore.kernel.org/r/20220421085808.24152-3-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
