<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/char/ttyprintk.c, branch linux-5.1.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2018-11-09T16:58:18Z</updated>
<entry>
<title>ttyprintk: make the printk log level configurable</title>
<updated>2018-11-09T16:58:18Z</updated>
<author>
<name>Peter Korsgaard</name>
<email>peter@korsgaard.com</email>
</author>
<published>2018-11-06T22:11:37Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=acef6660d3aaf18813143c8c5f5d4640ca53ef72'/>
<id>urn:sha1:acef6660d3aaf18813143c8c5f5d4640ca53ef72</id>
<content type='text'>
For some use cases it is handy to use a different printk log level than the
default (info) for the messages written to ttyprintk, so add a Kconfig
option similar to what we have for default console loglevel.

Signed-off-by: Peter Korsgaard &lt;peter@korsgaard.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ttyprintk: Neaten and simplify printing</title>
<updated>2016-09-13T15:30:17Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2016-09-06T16:49:04Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=0b3191d4ea6403f429beab5097428093e170fe44'/>
<id>urn:sha1:0b3191d4ea6403f429beab5097428093e170fe44</id>
<content type='text'>
The code is a bit obscure.

Simplify it by using a single routine to flush the tpk_buffer and
emit the buffer prefixed with "[U] ".

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>char: constify tty_port_operations structs</title>
<updated>2016-02-07T07:31:08Z</updated>
<author>
<name>Aya Mahfouz</name>
<email>mahfouz.saif.elyazal@gmail.com</email>
</author>
<published>2015-12-14T23:50:19Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=9b95d95d5eba5a077283423616b4ec3329d6ab00'/>
<id>urn:sha1:9b95d95d5eba5a077283423616b4ec3329d6ab00</id>
<content type='text'>
Constifies tty_port_operations structure in
the char driver since it is not modified
after its initialization.

Detected and found using Coccinelle.

Suggested-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Signed-off-by: Aya Mahfouz &lt;mahfouz.saif.elyazal@gmail.com&gt;
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ttyprintk: Allow built as a module</title>
<updated>2014-04-16T21:21:06Z</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2014-04-02T12:45:22Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b24313a82cf24e90170671ea74360b3e6ef3a91f'/>
<id>urn:sha1:b24313a82cf24e90170671ea74360b3e6ef3a91f</id>
<content type='text'>
The driver is well written to be used as a module, just the exit call
is missing.

Reviewed-by: Jean Delvare &lt;jdelvare@suse.de&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ttyprintk: Fix wrong tty_unregister_driver() call in the error path</title>
<updated>2014-04-16T21:21:06Z</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2014-04-02T12:45:21Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7d1c2858c49095ab748f55354b89dbd6b18d28b9'/>
<id>urn:sha1:7d1c2858c49095ab748f55354b89dbd6b18d28b9</id>
<content type='text'>
ttyprintk driver calls tty_unregister_driver() wrongly in the error
path of tty_register_driver().  Also, setting ttyprintk_driver to NULL
is utterly superfluous, so let's get rid of it, too.

Reported-by: Jean Delvare &lt;jdelvare@suse.de&gt;
Reviewed-by: Jean Delvare &lt;jdelvare@suse.de&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drivers/char: don't use module_init in non-modular ttyprintk.c</title>
<updated>2014-01-13T22:57:20Z</updated>
<author>
<name>Paul Gortmaker</name>
<email>paul.gortmaker@windriver.com</email>
</author>
<published>2014-01-12T17:37:56Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=db50d2f65b7c2bcdfb931dfa18cdcb4bb75dcfaa'/>
<id>urn:sha1:db50d2f65b7c2bcdfb931dfa18cdcb4bb75dcfaa</id>
<content type='text'>
The TTY_PRINTK option is bool, and hence this code is either
present or absent.  It will never be modular, so using
module_init as an alias for __initcall is rather misleading.

Fix this up now, so that we can relocate module_init from
init.h into module.h in the future.  If we don't do this, we'd
have to add module.h to obviously non-modular code, and that
would be a worse thing.

Note that direct use of __initcall is discouraged, vs. one
of the priority categorized subgroups.  As __initcall gets
mapped onto device_initcall, our use of device_initcall
directly in this change means that the runtime impact is
zero -- it will remain at level 6 in initcall ordering.

Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ttyprintk: Fix NULL pointer deref by setting tty_port ops after initializing port</title>
<updated>2013-05-21T17:13:23Z</updated>
<author>
<name>Darrick J. Wong</name>
<email>darrick.wong@oracle.com</email>
</author>
<published>2013-05-10T22:40:13Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b5325a02aa84c794cf520d6d68cae4b150988a32'/>
<id>urn:sha1:b5325a02aa84c794cf520d6d68cae4b150988a32</id>
<content type='text'>
tty_port_init() zeroes out the tty port, which means that we have to set the
ops pointer /after/, not before this call.  Otherwise, tty_port_open will crash
when it tries to deref ops, which is now a NULL pointer.

Signed-off-by: Darrick J. Wong &lt;darrick.wong@oracle.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>TTY: call tty_port_destroy in the rest of drivers</title>
<updated>2012-11-16T01:20:58Z</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2012-11-15T08:49:56Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=191c5f10275cfbb36802edadbdb10c73537327b4'/>
<id>urn:sha1:191c5f10275cfbb36802edadbdb10c73537327b4</id>
<content type='text'>
After commit "TTY: move tty buffers to tty_port", the tty buffers are
not freed in some drivers. This is because tty_port_destructor is not
called whenever a tty_port is freed. This was an assumption I counted
with but was unfortunately untrue. So fix the drivers to fulfil this
assumption.

To be sure, the TTY buffers (and later some stuff) are gone along with
the tty_port, we have to call tty_port_destroy at tear-down places.
This is mostly where the structure containing a tty_port is freed.
This patch does exactly that -- put tty_port_destroy at those places.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>TTY: tty_alloc_driver() returns error pointers</title>
<updated>2012-08-16T19:07:23Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2012-08-16T13:16:56Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c3a6344ae475763b6fb0fb2ec3639004f500d0f1'/>
<id>urn:sha1:c3a6344ae475763b6fb0fb2ec3639004f500d0f1</id>
<content type='text'>
We changed these from alloc_tty_driver() to tty_alloc_driver() so the
error handling needs to modified to check for IS_ERR() instead of NULL.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Acked-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>TTY: use tty_port_link_device</title>
<updated>2012-08-13T23:50:19Z</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2012-08-07T19:47:51Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b19e2ca77ee4becadc85341bb0c1cee454dd4fd5'/>
<id>urn:sha1:b19e2ca77ee4becadc85341bb0c1cee454dd4fd5</id>
<content type='text'>
So now for those drivers that can use neither tty_port_install nor
tty_port_register_driver but still have tty_port available before
tty_register_driver we use newly added tty_port_link_device.

The rest of the drivers that still do not provide tty_struct &lt;-&gt;
tty_port link will have to be converted to implement
tty-&gt;ops-&gt;install.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Acked-by: Alan Cox &lt;alan@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
