Skip to content

Introduce and use DO_ONCE statement expression macro

Joe Perches lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 4 repliesIn review
  2. v13 patches 12 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3kernel.h: Add DO_ONCE statement expression macroinclude/linux/kernel.h+11 -00 replies
2/3arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c: Use DO_ONCE & spelling fixarch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c+2 -20 replies
3/3kernel.h: Remove unused printk_onceinclude/linux/kernel.h+0 -150 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH V2 0/3] Introduce and use DO_ONCE statement expression macro

The printk_once macro in kernel.h is limited to printk

This generalizes the functionality of printk_once and allows statements like DO_ONCE(pr_info("foo\n")) and DO_ONCE(initialize(foo));

Uses atomic test_and_set_bit

Joe Perches (3):
kernel.h: Add DO_ONCE statement expression macro arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c: Use DO_ONCE & spelling fix kernel.h: Remove unused printk_once

 arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c |    4 ++--
 include/linux/kernel.h                     |   26 +++++++++++---------------
 2 files changed, 13 insertions(+), 17 deletions(-)