Discussion:
[PATCH 26/35] drivers/oprofile: Convert remaining uses of pr_warning to pr_warn
(too old to reply)
Joe Perches
2017-02-17 07:11:39 UTC
Permalink
Raw Message
To enable eventual removal of pr_warning

This makes pr_warn use consistent for drivers/oprofile

Prior to this patch, there were 2 uses of pr_warning and
0 uses of pr_warn in drivers/oprofile

Signed-off-by: Joe Perches <***@perches.com>
---
drivers/oprofile/oprofile_perf.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/oprofile/oprofile_perf.c b/drivers/oprofile/oprofile_perf.c
index d5b2732b1b81..6718440ab8da 100644
--- a/drivers/oprofile/oprofile_perf.c
+++ b/drivers/oprofile/oprofile_perf.c
@@ -45,8 +45,8 @@ static void op_overflow_handler(struct perf_event *event,
if (id != num_counters)
oprofile_add_sample(regs, id);
else
- pr_warning("oprofile: ignoring spurious overflow "
- "on cpu %u\n", cpu);
+ pr_warn("oprofile: ignoring spurious overflow on cpu %u\n",
+ cpu);
}

/*
@@ -87,8 +87,8 @@ static int op_create_counter(int cpu, int event)

if (pevent->state != PERF_EVENT_STATE_ACTIVE) {
perf_event_release_kernel(pevent);
- pr_warning("oprofile: failed to enable event %d "
- "on CPU %d\n", event, cpu);
+ pr_warn("oprofile: failed to enable event %d on CPU %d\n",
+ event, cpu);
return -EBUSY;
}
--
2.10.0.rc2.1.g053435c
Robert Richter
2017-02-17 14:07:51 UTC
Permalink
Raw Message
Post by Joe Perches
To enable eventual removal of pr_warning
This makes pr_warn use consistent for drivers/oprofile
Prior to this patch, there were 2 uses of pr_warning and
0 uses of pr_warn in drivers/oprofile
Acked-by: Robert Richter <***@kernel.org>
Juergen Gross
2017-02-17 08:06:19 UTC
Permalink
Raw Message
Post by Joe Perches
To enable eventual removal of pr_warning
This makes pr_warn use consistent for arch/x86
Prior to this patch, there were 46 uses of pr_warning and
122 uses of pr_warn in arch/x86
o Coalesce a few formats and realign arguments
o Convert a couple of multiple line printks to single line
---
arch/x86/kernel/amd_gart_64.c | 12 +++------
arch/x86/kernel/apic/apic.c | 46 ++++++++++++++++------------------
arch/x86/kernel/apic/apic_noop.c | 2 +-
arch/x86/kernel/setup_percpu.c | 4 +--
arch/x86/kernel/tboot.c | 15 ++++++-----
arch/x86/kernel/tsc_sync.c | 8 +++---
arch/x86/mm/kmmio.c | 8 +++---
arch/x86/mm/mmio-mod.c | 5 ++--
arch/x86/mm/numa.c | 12 ++++-----
arch/x86/mm/numa_emulation.c | 6 ++---
arch/x86/mm/testmmiotrace.c | 5 ++--
arch/x86/oprofile/op_x86_model.h | 6 ++---
arch/x86/platform/olpc/olpc-xo15-sci.c | 2 +-
arch/x86/platform/sfi/sfi.c | 3 +--
arch/x86/xen/debugfs.c | 2 +-
arch/x86/xen/setup.c | 2 +-
16 files changed, 63 insertions(+), 75 deletions(-)
Xen parts:

Reviewed-by: Juergen Gross <***@suse.com>


Juergen
Robert Richter
2017-02-17 14:07:23 UTC
Permalink
Raw Message
Post by Joe Perches
To enable eventual removal of pr_warning
This makes pr_warn use consistent for arch/x86
Prior to this patch, there were 46 uses of pr_warning and
122 uses of pr_warn in arch/x86
o Coalesce a few formats and realign arguments
o Convert a couple of multiple line printks to single line
---
arch/x86/kernel/amd_gart_64.c | 12 +++------
arch/x86/kernel/apic/apic.c | 46 ++++++++++++++++------------------
arch/x86/kernel/apic/apic_noop.c | 2 +-
arch/x86/kernel/setup_percpu.c | 4 +--
arch/x86/kernel/tboot.c | 15 ++++++-----
arch/x86/kernel/tsc_sync.c | 8 +++---
arch/x86/mm/kmmio.c | 8 +++---
arch/x86/mm/mmio-mod.c | 5 ++--
arch/x86/mm/numa.c | 12 ++++-----
arch/x86/mm/numa_emulation.c | 6 ++---
arch/x86/mm/testmmiotrace.c | 5 ++--
arch/x86/oprofile/op_x86_model.h | 6 ++---
arch/x86/platform/olpc/olpc-xo15-sci.c | 2 +-
arch/x86/platform/sfi/sfi.c | 3 +--
arch/x86/xen/debugfs.c | 2 +-
arch/x86/xen/setup.c | 2 +-
16 files changed, 63 insertions(+), 75 deletions(-)
Rafael J. Wysocki
2017-02-17 12:27:00 UTC
Permalink
Raw Message
There are ~4300 uses of pr_warn and ~250 uses of the older
pr_warning in the kernel source tree.
Make the use of pr_warn consistent across all kernel files.
This excludes all files in tools/ as there is a separate
define pr_warning for that directory tree and pr_warn is
not used in tools/.
Done with 'sed s/\bpr_warning\b/pr_warn/' and some emacsing.
Sorry about asking if that has been asked already.

Wouldn't it be slightly less intrusive to simply redefined
pr_warning() as a synonym for pr_warn()?

Thanks,
Rafael
Geert Uytterhoeven
2017-02-17 12:37:33 UTC
Permalink
Raw Message
Hi Rafael,
Post by Rafael J. Wysocki
There are ~4300 uses of pr_warn and ~250 uses of the older
pr_warning in the kernel source tree.
Make the use of pr_warn consistent across all kernel files.
This excludes all files in tools/ as there is a separate
define pr_warning for that directory tree and pr_warn is
not used in tools/.
Done with 'sed s/\bpr_warning\b/pr_warn/' and some emacsing.
Sorry about asking if that has been asked already.
Wouldn't it be slightly less intrusive to simply redefined
pr_warning() as a synonym for pr_warn()?
That's already the case.

This series cleans up the cruft, so we can catch all users with
"git grep -w pr_warn".

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ***@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Thomas Gleixner
2017-02-17 11:17:48 UTC
Permalink
Raw Message
Post by Joe Perches
To enable eventual removal of pr_warning
This makes pr_warn use consistent for arch/x86
Prior to this patch, there were 46 uses of pr_warning and
122 uses of pr_warn in arch/x86
o Coalesce a few formats and realign arguments
o Convert a couple of multiple line printks to single line
Acked-by: Thomas Gleixner <***@linutronix.de>
Pekka Paalanen
2017-02-17 07:46:27 UTC
Permalink
Raw Message
On Thu, 16 Feb 2017 23:11:22 -0800
Post by Joe Perches
To enable eventual removal of pr_warning
This makes pr_warn use consistent for arch/x86
Prior to this patch, there were 46 uses of pr_warning and
122 uses of pr_warn in arch/x86
o Coalesce a few formats and realign arguments
o Convert a couple of multiple line printks to single line
---
arch/x86/kernel/amd_gart_64.c | 12 +++------
arch/x86/kernel/apic/apic.c | 46 ++++++++++++++++------------------
arch/x86/kernel/apic/apic_noop.c | 2 +-
arch/x86/kernel/setup_percpu.c | 4 +--
arch/x86/kernel/tboot.c | 15 ++++++-----
arch/x86/kernel/tsc_sync.c | 8 +++---
arch/x86/mm/kmmio.c | 8 +++---
arch/x86/mm/mmio-mod.c | 5 ++--
arch/x86/mm/numa.c | 12 ++++-----
arch/x86/mm/numa_emulation.c | 6 ++---
arch/x86/mm/testmmiotrace.c | 5 ++--
arch/x86/oprofile/op_x86_model.h | 6 ++---
arch/x86/platform/olpc/olpc-xo15-sci.c | 2 +-
arch/x86/platform/sfi/sfi.c | 3 +--
arch/x86/xen/debugfs.c | 2 +-
arch/x86/xen/setup.c | 2 +-
16 files changed, 63 insertions(+), 75 deletions(-)
Hi,

seems fine to me, even though I haven't been involved in the kernel
side for years.
Post by Joe Perches
diff --git a/arch/x86/mm/kmmio.c b/arch/x86/mm/kmmio.c
index afc47f5c9531..ad70518cdcc7 100644
--- a/arch/x86/mm/kmmio.c
+++ b/arch/x86/mm/kmmio.c
@@ -187,8 +187,8 @@ static int arm_kmmio_fault_page(struct kmmio_fault_page *f)
int ret;
WARN_ONCE(f->armed, KERN_ERR pr_fmt("kmmio page already armed.\n"));
if (f->armed) {
- pr_warning("double-arm: addr 0x%08lx, ref %d, old %d\n",
- f->addr, f->count, !!f->old_presence);
+ pr_warn("double-arm: addr 0x%08lx, ref %d, old %d\n",
+ f->addr, f->count, !!f->old_presence);
}
ret = clear_page_presence(f, true);
WARN_ONCE(ret < 0, KERN_ERR pr_fmt("arming at 0x%08lx failed.\n"),
@@ -335,8 +335,8 @@ static int post_kmmio_handler(unsigned long condition, struct pt_regs *regs)
* something external causing them (f.e. using a debugger while
* mmio tracing enabled), or erroneous behaviour
*/
- pr_warning("unexpected debug trap on CPU %d.\n",
- smp_processor_id());
+ pr_warn("unexpected debug trap on CPU %d\n",
+ smp_processor_id());
goto out;
}
diff --git a/arch/x86/mm/mmio-mod.c b/arch/x86/mm/mmio-mod.c
index bef36622e408..706ae44d1af7 100644
--- a/arch/x86/mm/mmio-mod.c
+++ b/arch/x86/mm/mmio-mod.c
@@ -407,7 +407,7 @@ static void enter_uniprocessor(void)
}
if (num_online_cpus() > 1)
- pr_warning("multiple CPUs still online, may miss events.\n");
+ pr_warn("multiple CPUs still online, may miss events\n");
}
static void leave_uniprocessor(void)
@@ -431,8 +431,7 @@ static void leave_uniprocessor(void)
static void enter_uniprocessor(void)
{
if (num_online_cpus() > 1)
- pr_warning("multiple CPUs are online, may miss events. "
- "Suggest booting with maxcpus=1 kernel argument.\n");
+ pr_warn("multiple CPUs are online, may miss events. Suggest booting with maxcpus=1 kernel argument.\n");
}
static void leave_uniprocessor(void)
diff --git a/arch/x86/mm/testmmiotrace.c b/arch/x86/mm/testmmiotrace.c
index 38868adf07ea..4a55e453296d 100644
--- a/arch/x86/mm/testmmiotrace.c
+++ b/arch/x86/mm/testmmiotrace.c
@@ -121,9 +121,8 @@ static int __init init(void)
return -ENXIO;
}
- "and writing 16 kB of rubbish in there.\n",
- size >> 10, mmio_address);
+ size >> 10, mmio_address);
do_test(size);
do_test_bulk_ioremapping();
pr_info("All done.\n");
Thanks,
pq
Steven Rostedt
2017-02-17 15:01:13 UTC
Permalink
Raw Message
On Thu, 16 Feb 2017 23:11:22 -0800
Post by Joe Perches
diff --git a/arch/x86/mm/testmmiotrace.c b/arch/x86/mm/testmmiotrace.c
index 38868adf07ea..4a55e453296d 100644
--- a/arch/x86/mm/testmmiotrace.c
+++ b/arch/x86/mm/testmmiotrace.c
@@ -121,9 +121,8 @@ static int __init init(void)
return -ENXIO;
}
- "and writing 16 kB of rubbish in there.\n",
- size >> 10, mmio_address);
+ size >> 10, mmio_address);
do_test(size);
do_test_bulk_ioremapping();
pr_info("All done.\n");
Acked-by: Steven Rostedt (VMware) <***@goodmis.org>

-- Steve
Adan Hawthorn
2017-02-21 01:12:38 UTC
Permalink
Raw Message
Post by Joe Perches
To enable eventual removal of pr_warning
This makes pr_warn use consistent for arch/x86
Prior to this patch, there were 46 uses of pr_warning and
122 uses of pr_warn in arch/x86
o Coalesce a few formats and realign arguments
o Convert a couple of multiple line printks to single line
...
Post by Joe Perches
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index 4261b3282ad9..37e9129da8b3 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
...
Post by Joe Perches
@@ -1503,11 +1503,11 @@ static int __init setup_nox2apic(char *str)
int apicid = native_apic_msr_read(APIC_ID);
if (apicid >= 255) {
- pr_warning("Apicid: %08x, cannot enforce nox2apic\n",
- apicid);
+ pr_warn("Apicid: %08x, cannot enforce nox2apic\n",
+ apicid);
return 0;
}
- pr_warning("x2apic already enabled.\n");
+ pr_warn("x2apic already enabled\n");
__x2apic_disable();
}
setup_clear_cpu_cap(X86_FEATURE_X2APIC);
...
Post by Joe Perches
diff --git a/arch/x86/mm/kmmio.c b/arch/x86/mm/kmmio.c
index afc47f5c9531..ad70518cdcc7 100644
--- a/arch/x86/mm/kmmio.c
+++ b/arch/x86/mm/kmmio.c
WARN_ONCE(ret < 0, KERN_ERR pr_fmt("arming at 0x%08lx failed.\n"),
@@ -335,8 +335,8 @@ static int post_kmmio_handler(unsigned long condition, struct pt_regs *regs)
* something external causing them (f.e. using a debugger while
* mmio tracing enabled), or erroneous behaviour
*/
- pr_warning("unexpected debug trap on CPU %d.\n",
- smp_processor_id());
+ pr_warn("unexpected debug trap on CPU %d\n",
+ smp_processor_id());
goto out;
}
As just a few examples from the full diff: would not the double line
pr_warn's (above) read better if coalesced each on one line?
Rob Herring
2017-02-23 15:28:23 UTC
Permalink
Raw Message
There are ~4300 uses of pr_warn and ~250 uses of the older
pr_warning in the kernel source tree.
Make the use of pr_warn consistent across all kernel files.
This excludes all files in tools/ as there is a separate
define pr_warning for that directory tree and pr_warn is
not used in tools/.
Done with 'sed s/\bpr_warning\b/pr_warn/' and some emacsing.
o Coalesce formats and realign arguments
Some files not compiled - no cross-compilers
alpha: Convert remaining uses of pr_warning to pr_warn
ARM: ep93xx: Convert remaining uses of pr_warning to pr_warn
arm64: Convert remaining uses of pr_warning to pr_warn
arch/blackfin: Convert remaining uses of pr_warning to pr_warn
ia64: Convert remaining use of pr_warning to pr_warn
powerpc: Convert remaining uses of pr_warning to pr_warn
sh: Convert remaining uses of pr_warning to pr_warn
sparc: Convert remaining use of pr_warning to pr_warn
x86: Convert remaining uses of pr_warning to pr_warn
drivers/acpi: Convert remaining uses of pr_warning to pr_warn
block/drbd: Convert remaining uses of pr_warning to pr_warn
gdrom: Convert remaining uses of pr_warning to pr_warn
drivers/char: Convert remaining use of pr_warning to pr_warn
clocksource: Convert remaining use of pr_warning to pr_warn
drivers/crypto: Convert remaining uses of pr_warning to pr_warn
fmc: Convert remaining use of pr_warning to pr_warn
drivers/gpu: Convert remaining uses of pr_warning to pr_warn
drivers/ide: Convert remaining uses of pr_warning to pr_warn
drivers/input: Convert remaining uses of pr_warning to pr_warn
drivers/isdn: Convert remaining uses of pr_warning to pr_warn
drivers/macintosh: Convert remaining uses of pr_warning to pr_warn
drivers/media: Convert remaining use of pr_warning to pr_warn
drivers/mfd: Convert remaining uses of pr_warning to pr_warn
drivers/mtd: Convert remaining uses of pr_warning to pr_warn
drivers/of: Convert remaining uses of pr_warning to pr_warn
drivers/oprofile: Convert remaining uses of pr_warning to pr_warn
drivers/platform: Convert remaining uses of pr_warning to pr_warn
drivers/rapidio: Convert remaining use of pr_warning to pr_warn
drivers/scsi: Convert remaining use of pr_warning to pr_warn
drivers/sh: Convert remaining use of pr_warning to pr_warn
drivers/tty: Convert remaining uses of pr_warning to pr_warn
drivers/video: Convert remaining uses of pr_warning to pr_warn
kernel/trace: Convert remaining uses of pr_warning to pr_warn
lib: Convert remaining uses of pr_warning to pr_warn
sound/soc: Convert remaining uses of pr_warning to pr_warn
Where's the removal of pr_warning so we don't have more sneak in?

Rob
Joe Perches
2017-02-23 17:53:41 UTC
Permalink
Raw Message
Post by Rob Herring
There are ~4300 uses of pr_warn and ~250 uses of the older
pr_warning in the kernel source tree.
Make the use of pr_warn consistent across all kernel files.
This excludes all files in tools/ as there is a separate
define pr_warning for that directory tree and pr_warn is
not used in tools/.
Done with 'sed s/\bpr_warning\b/pr_warn/' and some emacsing.
[]
Post by Rob Herring
Where's the removal of pr_warning so we don't have more sneak in?
After all of these actually get applied,
and maybe a cycle or two later, one would
get sent.
By which point you'll get a few reincarnation of it. So you'll have to
do the same exercise again :-(
Maybe to one or two files. Not a big deal.
I guess the question is - are you expecting to get the series merged
all together/via one tree ?
No. The only person that could do that effectively is Linus.
If not, your plan is perfectly reasonable.
Loading...