diff options
author | John Ogness <john.ogness@linutronix.de> | 2020-09-21 14:18:45 +0300 |
---|---|---|
committer | Petr Mladek <pmladek@suse.com> | 2020-09-22 12:27:48 +0300 |
commit | 74caba7f2a0685575b3ee5330a118f5922485e02 (patch) | |
tree | eb195b5d665b166c8158af3bcdc151d2b84b447f /kernel/printk/internal.h | |
parent | cfe2790b163acdc9c058a63bff310923e84a16b4 (diff) | |
download | linux-74caba7f2a0685575b3ee5330a118f5922485e02.tar.xz |
printk: move dictionary keys to dev_printk_info
Dictionaries are only used for SUBSYSTEM and DEVICE properties. The
current implementation stores the property names each time they are
used. This requires more space than otherwise necessary. Also,
because the dictionary entries are currently considered optional,
it cannot be relied upon that they are always available, even if the
writer wanted to store them. These issues will increase should new
dictionary properties be introduced.
Rather than storing the subsystem and device properties in the
dict ring, introduce a struct dev_printk_info with separate fields
to store only the property values. Embed this struct within the
struct printk_info to provide guaranteed availability.
Signed-off-by: John Ogness <john.ogness@linutronix.de>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/87mu1jl6ne.fsf@jogness.linutronix.de
Diffstat (limited to 'kernel/printk/internal.h')
-rw-r--r-- | kernel/printk/internal.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/printk/internal.h b/kernel/printk/internal.h index 660f9a6bf73a..3a8fd491758c 100644 --- a/kernel/printk/internal.h +++ b/kernel/printk/internal.h @@ -14,9 +14,9 @@ extern raw_spinlock_t logbuf_lock; -__printf(5, 0) +__printf(4, 0) int vprintk_store(int facility, int level, - const char *dict, size_t dictlen, + const struct dev_printk_info *dev_info, const char *fmt, va_list args); __printf(1, 0) int vprintk_default(const char *fmt, va_list args); |