Skip to content

Commit 43d6ecd

Browse files
committed
Merge tag 'printk-for-5.10-rc6-fixup' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux
Pull printk fixes from Petr Mladek: - do not lose trailing newline in pr_cont() calls - two trivial fixes for a dead store and a config description * tag 'printk-for-5.10-rc6-fixup' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux: printk: finalize records with trailing newlines printk: remove unneeded dead-store assignment init/Kconfig: Fix CPU number in LOG_CPU_MAX_BUF_SHIFT description
2 parents 5b4049d + 739e711 commit 43d6ecd

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

init/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ config LOG_CPU_MAX_BUF_SHIFT
719719
with more CPUs. Therefore this value is used only when the sum of
720720
contributions is greater than the half of the default kernel ring
721721
buffer as defined by LOG_BUF_SHIFT. The default values are set
722-
so that more than 64 CPUs are needed to trigger the allocation.
722+
so that more than 16 CPUs are needed to trigger the allocation.
723723

724724
Also this option is ignored when "log_buf_len" kernel parameter is
725725
used as it forces an exact (power of two) size of the ring buffer.

kernel/printk/printk.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -528,8 +528,8 @@ static int log_store(u32 caller_id, int facility, int level,
528528
if (dev_info)
529529
memcpy(&r.info->dev_info, dev_info, sizeof(r.info->dev_info));
530530

531-
/* insert message */
532-
if ((flags & LOG_CONT) || !(flags & LOG_NEWLINE))
531+
/* A message without a trailing newline can be continued. */
532+
if (!(flags & LOG_NEWLINE))
533533
prb_commit(&e);
534534
else
535535
prb_final_commit(&e);

kernel/printk/printk_ringbuffer.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -882,8 +882,6 @@ static bool desc_reserve(struct printk_ringbuffer *rb, unsigned long *id_out)
882882
head_id = atomic_long_read(&desc_ring->head_id); /* LMM(desc_reserve:A) */
883883

884884
do {
885-
desc = to_desc(desc_ring, head_id);
886-
887885
id = DESC_ID(head_id + 1);
888886
id_prev_wrap = DESC_ID_PREV_WRAP(desc_ring, id);
889887

0 commit comments

Comments
 (0)