Commit a7542923 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull printk updates from Petr Mladek:

 - Herbert Xu made printk header file self-contained.

 - Andy Shevchenko and Sergey Senozhatsky cleaned up console->setup()
   error handling.

 - Andy Shevchenko did some cleanups (e.g. sparse warning) in vsprintf
   code.

 - Minor documentation updates.

* tag 'printk-for-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux:
  lib/vsprintf: Force type of flags value for gfp_t
  lib/vsprintf: Replace custom spec to print decimals with generic one
  lib/vsprintf: Replace hidden BUILD_BUG_ON() with static_assert()
  printk: Make linux/printk.h self-contained
  doc:kmsg: explicitly state the return value in case of SEEK_CUR
  Replace HTTP links with HTTPS ones: vsprintf
  hvc: unify console setup naming
  console: Fix trivia typo 'change' -> 'chance'
  console: Propagate error code from console ->setup()
  tty: hvc: Return proper error code from console ->setup() hook
  serial: sunzilog: Return proper error code from console ->setup() hook
  serial: sunsab: Return proper error code from console ->setup() hook
  mips: Return proper error code from console ->setup() hook
parents 95ffa676 57e60db3
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -56,6 +56,17 @@ Description: The /dev/kmsg character device node provides userspace access
		  seek after the last record available at the time
		  the last SYSLOG_ACTION_CLEAR was issued.

		Other seek operations or offsets are not supported because of
		the special behavior this device has. The device allows to read
		or write only whole variable length messages (records) that are
		stored in a ring buffer.

		Because of the non-standard behavior also the error values are
		non-standard. -ESPIPE is returned for non-zero offset. -EINVAL
		is returned for other operations, e.g. SEEK_CUR. This behavior
		and values are historical and could not be modified without the
		risk of breaking userspace.

		The output format consists of a prefix carrying the syslog
		prefix including priority and facility, the 64 bit message
		sequence number and the monotonic timestamp in microseconds,
+2 −2
Original line number Diff line number Diff line
@@ -317,7 +317,7 @@ colon-separators. Leading zeros are always used.

The additional ``c`` specifier can be used with the ``I`` specifier to
print a compressed IPv6 address as described by
http://tools.ietf.org/html/rfc5952
https://tools.ietf.org/html/rfc5952

Passed by reference.

@@ -341,7 +341,7 @@ The additional ``p``, ``f``, and ``s`` specifiers are used to specify port
flowinfo a ``/`` and scope a ``%``, each followed by the actual value.

In case of an IPv6 address the compressed IPv6 address as described by
http://tools.ietf.org/html/rfc5952 is being used if the additional
https://tools.ietf.org/html/rfc5952 is being used if the additional
specifier ``c`` is given. The IPv6 address is surrounded by ``[``, ``]`` in
case of additional specifiers ``p``, ``f`` or ``s`` as suggested by
https://tools.ietf.org/html/draft-ietf-6man-text-addr-representation-07
+3 −1
Original line number Diff line number Diff line
@@ -28,7 +28,9 @@ static void prom_console_write(struct console *co, const char *s,

static int prom_console_setup(struct console *co, char *options)
{
	return !(prom_flags & PROM_FLAG_USE_AS_CONSOLE);
	if (prom_flags & PROM_FLAG_USE_AS_CONSOLE)
		return 0;
	return -ENODEV;
}

static struct console arc_cons = {
+1 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
#ifndef _ASM_S390_BUG_H
#define _ASM_S390_BUG_H

#include <linux/kernel.h>
#include <linux/compiler.h>

#ifdef CONFIG_BUG

+2 −2
Original line number Diff line number Diff line
@@ -603,7 +603,7 @@ static void xen_hvm_early_write(uint32_t vtermno, const char *str, int len) { }
#endif

#ifdef CONFIG_EARLY_PRINTK
static int __init xenboot_setup_console(struct console *console, char *string)
static int __init xenboot_console_setup(struct console *console, char *string)
{
	static struct xencons_info xenboot;

@@ -647,7 +647,7 @@ static void xenboot_write_console(struct console *console, const char *string,
struct console xenboot_console = {
	.name		= "xenboot",
	.write		= xenboot_write_console,
	.setup		= xenboot_setup_console,
	.setup		= xenboot_console_setup,
	.flags		= CON_PRINTBUFFER | CON_BOOT | CON_ANYTIME,
	.index		= -1,
};
Loading