Merge tag 'printk-for-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/printk...
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 5 Aug 2020 05:22:25 +0000 (22:22 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 5 Aug 2020 05:22:25 +0000 (22:22 -0700)
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

1  2 
Documentation/ABI/testing/dev-kmsg
kernel/printk/printk.c

@@@ -56,6 -56,22 +56,17 @@@ Description:        The /dev/kmsg character de
                  seek after the last record available at the time
                  the last SYSLOG_ACTION_CLEAR was issued.
  
 -              Due to the record nature of this interface with a "read all"
 -              behavior and the specific positions each seek operation sets,
 -              SEEK_CUR is not supported, returning -ESPIPE (invalid seek) to
 -              errno whenever requested.
 -
+               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,
Simple merge