path: root/kernel/printk/printk_safe.c
diff options
authorJohn Ogness <>2020-09-21 13:24:45 +0206
committerPetr Mladek <>2020-09-22 11:27:48 +0200
commit74caba7f2a0685575b3ee5330a118f5922485e02 (patch)
treeeb195b5d665b166c8158af3bcdc151d2b84b447f /kernel/printk/printk_safe.c
parentcfe2790b163acdc9c058a63bff310923e84a16b4 (diff)
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 <> Reviewed-by: Petr Mladek <> Signed-off-by: Petr Mladek <> Link:
Diffstat (limited to 'kernel/printk/printk_safe.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/printk/printk_safe.c b/kernel/printk/printk_safe.c
index 50aeae770434..5dbc40160990 100644
--- a/kernel/printk/printk_safe.c
+++ b/kernel/printk/printk_safe.c
@@ -375,7 +375,7 @@ __printf(1, 0) int vprintk_func(const char *fmt, va_list args)
raw_spin_trylock(&logbuf_lock)) {
int len;
- len = vprintk_store(0, LOGLEVEL_DEFAULT, NULL, 0, fmt, args);
+ len = vprintk_store(0, LOGLEVEL_DEFAULT, NULL, fmt, args);
return len;