2010-12-06 22:05:22

by Joe Perches

[permalink] [raw]
Subject: [PATCH 00/29] trivial: WARN cleanups

Hi Jiri.

Resubmitting unapplied WARN cleanups originally sent October 30.
https://lkml.org/lkml/2010/10/30/176

All previously submitted to appropriate MAINTAINERS and mailing lists.
Not resending to those MAINTAINERS and mailing lists, just trivial.

Joe Perches (29):
include/asm-generic/bug.h: Update WARN macros
arch/alpha: Update WARN uses
arch/arm: Update WARN uses
arch/powerpc: Update WARN uses
arch/x86: Update WARN uses
drivers/acpi: Update WARN uses
drivers/base: Update WARN uses
drivers/block: Update WARN uses
drivers/cpuidle: Update WARN uses
drivers/firmware: Update WARN uses
drivers/gpio: Update WARN uses
drivers/net/wireless/iwlwifi: Update WARN uses
drivers/scsi/fcoe: Update WARN uses
drivers/usb/musb: Update WARN uses
drivers/video/omap2/dss: Update WARN uses
fs/nfsd: Update WARN uses
fs/notify/inotify: Update WARN uses
fs/sysfs: Update WARN uses
fs/proc: Update WARN uses
fs: Update WARN uses
include/linux/device.h: Update WARN uses
kernel/irq: Update WARN uses
kernel/panic.c: Update warn_slowpath to use %pV
kernel: Update WARN uses
lib: Update WARN uses
mm: Update WARN uses
net/mac80211: Update WARN uses
net/rfkill/input.c: Update WARN uses
drivers/regulator: Update WARN uses

arch/alpha/kernel/pci-sysfs.c | 14 ++--
arch/arm/mach-davinci/clock.c | 4 +-
arch/arm/mach-davinci/da830.c | 2 +-
arch/arm/mach-davinci/da850.c | 12 ++--
arch/arm/mach-omap2/clkt_clksel.c | 12 ++--
arch/arm/mach-omap2/clock.c | 16 ++--
arch/arm/mach-omap2/devices.c | 4 +-
arch/arm/mach-omap2/omap_hwmod.c | 47 ++++++++-----
arch/arm/mach-omap2/pm34xx.c | 7 +-
arch/arm/mach-omap2/serial.c | 2 +-
arch/arm/mach-omap2/timer-gp.c | 3 +-
arch/arm/mach-tegra/clock.c | 3 +-
arch/arm/mach-tegra/timer.c | 2 +-
arch/arm/mach-u300/padmux.c | 14 +---
arch/arm/plat-omap/omap-pm-noop.c | 10 ++--
arch/powerpc/kernel/hw_breakpoint.c | 4 +-
arch/x86/kernel/acpi/boot.c | 2 +-
arch/x86/kernel/apic/apic.c | 2 +-
arch/x86/kernel/apic/es7000_32.c | 2 +-
arch/x86/kernel/cpu/perf_event.c | 4 +-
arch/x86/kernel/pci-calgary_64.c | 4 +-
arch/x86/kernel/tsc_sync.c | 4 +-
arch/x86/kernel/xsave.c | 2 +-
arch/x86/mm/ioremap.c | 5 +-
arch/x86/mm/pageattr-test.c | 2 +-
arch/x86/mm/pageattr.c | 5 +-
arch/x86/platform/sfi/sfi.c | 4 +-
drivers/acpi/ec.c | 4 +-
drivers/base/class.c | 4 +-
drivers/base/core.c | 5 +-
drivers/base/memory.c | 4 +-
drivers/base/sys.c | 10 +--
drivers/block/floppy.c | 2 +-
drivers/cpuidle/driver.c | 2 +-
drivers/firmware/dmi_scan.c | 2 +-
drivers/gpio/gpiolib.c | 4 +-
drivers/gpio/it8761e_gpio.c | 2 +-
drivers/net/wireless/iwlwifi/iwl-agn-lib.c | 3 +-
drivers/net/wireless/iwlwifi/iwl-agn-sta.c | 6 +-
drivers/net/wireless/iwlwifi/iwl-tx.c | 6 +-
drivers/net/wireless/iwlwifi/iwl3945-base.c | 2 +-
drivers/regulator/core.c | 3 +-
drivers/scsi/fcoe/libfcoe.c | 2 +-
drivers/usb/musb/musb_host.c | 6 +-
drivers/video/omap2/dss/core.c | 3 +-
fs/bio.c | 2 +-
fs/buffer.c | 2 +-
fs/nfsd/nfs4state.c | 3 +-
fs/notify/inotify/inotify_fsnotify.c | 4 +-
fs/proc/generic.c | 9 +--
fs/super.c | 5 +-
fs/sysfs/dir.c | 3 +-
fs/sysfs/file.c | 4 +-
fs/sysfs/group.c | 4 +-
fs/sysfs/symlink.c | 10 +--
include/asm-generic/bug.h | 101 ++++++++++++++++-----------
include/linux/device.h | 2 +-
kernel/irq/chip.c | 2 +-
kernel/irq/manage.c | 2 +-
kernel/notifier.c | 2 +-
kernel/panic.c | 40 +++++------
kernel/pm_qos_params.c | 6 +-
lib/debugobjects.c | 21 +++---
lib/iomap.c | 2 +-
lib/kobject.c | 9 +--
lib/kobject_uevent.c | 4 +-
lib/list_debug.c | 24 +++----
lib/plist.c | 12 ++--
mm/percpu.c | 4 +-
mm/vmalloc.c | 5 +-
net/mac80211/agg-tx.c | 5 +-
net/mac80211/iface.c | 4 +-
net/mac80211/mlme.c | 2 +-
net/mac80211/rx.c | 4 +-
net/mac80211/tx.c | 4 +-
net/mac80211/util.c | 4 +-
net/mac80211/work.c | 4 +-
net/rfkill/input.c | 5 +-
78 files changed, 284 insertions(+), 292 deletions(-)

--
1.7.3.2.245.g03276.dirty


2010-12-06 22:05:28

by Joe Perches

[permalink] [raw]
Subject: [PATCH 13/29] drivers/scsi/fcoe: Update WARN uses

Add missing newlines.

Signed-off-by: Joe Perches <[email protected]>
---
drivers/scsi/fcoe/libfcoe.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/fcoe/libfcoe.c b/drivers/scsi/fcoe/libfcoe.c
index bc17c71..58ad3c7 100644
--- a/drivers/scsi/fcoe/libfcoe.c
+++ b/drivers/scsi/fcoe/libfcoe.c
@@ -2475,7 +2475,7 @@ static void fcoe_ctlr_vn_timeout(struct fcoe_ctlr *fip)
case FIP_ST_LINK_WAIT:
goto unlock;
default:
- WARN(1, "unexpected state %d", fip->state);
+ WARN(1, "unexpected state %d\n", fip->state);
goto unlock;
}
mod_timer(&fip->timer, next_time);
--
1.7.3.2.245.g03276.dirty

2010-12-06 22:05:25

by Joe Perches

[permalink] [raw]
Subject: [PATCH 01/29] include/asm-generic/bug.h: Update WARN macros

Add KERN_EMERG to BUG printk
Add KERN_WARNING to WARN printk
Change macros to use (fmt, arg...) style
Whitespace/checkpatch neatening

Signed-off-by: Joe Perches <[email protected]>
---
include/asm-generic/bug.h | 101 +++++++++++++++++++++++++++------------------
1 files changed, 61 insertions(+), 40 deletions(-)

diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h
index c2c9ba0..f006309 100644
--- a/include/asm-generic/bug.h
+++ b/include/asm-generic/bug.h
@@ -43,9 +43,11 @@ struct bug_entry {
* users don't need to reboot ASAP and can mostly shut down cleanly.
*/
#ifndef HAVE_ARCH_BUG
-#define BUG() do { \
- printk("BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __func__); \
- panic("BUG!"); \
+#define BUG() \
+do { \
+ printk(KERN_EMERG "BUG: failure at %s:%d/%s()!\n", \
+ __FILE__, __LINE__, __func__); \
+ panic("BUG!"); \
} while (0)
#endif

@@ -69,40 +71,53 @@ extern void warn_slowpath_fmt_taint(const char *file, const int line,
extern void warn_slowpath_null(const char *file, const int line);
#define WANT_WARN_ON_SLOWPATH
#endif
-#define __WARN() warn_slowpath_null(__FILE__, __LINE__)
-#define __WARN_printf(arg...) warn_slowpath_fmt(__FILE__, __LINE__, arg)
-#define __WARN_printf_taint(taint, arg...) \
- warn_slowpath_fmt_taint(__FILE__, __LINE__, taint, arg)
+#define __WARN() \
+ warn_slowpath_null(__FILE__, __LINE__)
+#define __WARN_printf(fmt, args...) \
+ warn_slowpath_fmt(__FILE__, __LINE__, fmt, ##args)
+#define __WARN_printf_taint(taint, fmt, args...) \
+ warn_slowpath_fmt_taint(__FILE__, __LINE__, taint, fmt, ##args)
#else
-#define __WARN() __WARN_TAINT(TAINT_WARN)
-#define __WARN_printf(arg...) do { printk(arg); __WARN(); } while (0)
-#define __WARN_printf_taint(taint, arg...) \
- do { printk(arg); __WARN_TAINT(taint); } while (0)
+#define __WARN() \
+ __WARN_TAINT(TAINT_WARN)
+#define __WARN_printf(fmt, args...) \
+do { \
+ printk(KERN_WARNING fmt, ##args); \
+ __WARN(); \
+} while (0)
+#define __WARN_printf_taint(taint, fmt, args...) \
+do { \
+ printk(KERN_WARNING fmt, ##args); \
+ __WARN_TAINT(taint); \
+} while (0)
#endif

#ifndef WARN_ON
-#define WARN_ON(condition) ({ \
- int __ret_warn_on = !!(condition); \
- if (unlikely(__ret_warn_on)) \
- __WARN(); \
- unlikely(__ret_warn_on); \
+#define WARN_ON(condition) \
+({ \
+ int __ret_warn_on = !!(condition); \
+ if (unlikely(__ret_warn_on)) \
+ __WARN(); \
+ unlikely(__ret_warn_on); \
})
#endif

#ifndef WARN
-#define WARN(condition, format...) ({ \
- int __ret_warn_on = !!(condition); \
- if (unlikely(__ret_warn_on)) \
- __WARN_printf(format); \
- unlikely(__ret_warn_on); \
+#define WARN(condition, fmt, args...) \
+({ \
+ int __ret_warn_on = !!(condition); \
+ if (unlikely(__ret_warn_on)) \
+ __WARN_printf(fmt, ##args); \
+ unlikely(__ret_warn_on); \
})
#endif

-#define WARN_TAINT(condition, taint, format...) ({ \
- int __ret_warn_on = !!(condition); \
- if (unlikely(__ret_warn_on)) \
- __WARN_printf_taint(taint, format); \
- unlikely(__ret_warn_on); \
+#define WARN_TAINT(condition, taint, fmt, args...) \
+({ \
+ int __ret_warn_on = !!(condition); \
+ if (unlikely(__ret_warn_on)) \
+ __WARN_printf_taint(taint, fmt, ##args); \
+ unlikely(__ret_warn_on); \
})

#else /* !CONFIG_BUG */
@@ -115,55 +130,61 @@ extern void warn_slowpath_null(const char *file, const int line);
#endif

#ifndef HAVE_ARCH_WARN_ON
-#define WARN_ON(condition) ({ \
- int __ret_warn_on = !!(condition); \
- unlikely(__ret_warn_on); \
+#define WARN_ON(condition) \
+({ \
+ int __ret_warn_on = !!(condition); \
+ unlikely(__ret_warn_on); \
})
#endif

#ifndef WARN
-#define WARN(condition, format...) ({ \
- int __ret_warn_on = !!(condition); \
- unlikely(__ret_warn_on); \
+#define WARN(condition, fmt, args...) \
+({ \
+ int __ret_warn_on = !!(condition); \
+ unlikely(__ret_warn_on); \
})
#endif

-#define WARN_TAINT(condition, taint, format...) WARN_ON(condition)
+#define WARN_TAINT(condition, taint, fmt, args...) \
+ WARN_ON(condition)

#endif

-#define WARN_ON_ONCE(condition) ({ \
+#define WARN_ON_ONCE(condition) \
+({ \
static bool __warned; \
int __ret_warn_once = !!(condition); \
\
if (unlikely(__ret_warn_once)) \
- if (WARN_ON(!__warned)) \
+ if (WARN_ON(!__warned)) \
__warned = true; \
unlikely(__ret_warn_once); \
})

-#define WARN_ONCE(condition, format...) ({ \
+#define WARN_ONCE(condition, fmt, args...) \
+({ \
static bool __warned; \
int __ret_warn_once = !!(condition); \
\
if (unlikely(__ret_warn_once)) \
- if (WARN(!__warned, format)) \
+ if (WARN(!__warned, fmt, ##args)) \
__warned = true; \
unlikely(__ret_warn_once); \
})

-#define WARN_TAINT_ONCE(condition, taint, format...) ({ \
+#define WARN_TAINT_ONCE(condition, taint, fmt, args...) \
+({ \
static bool __warned; \
int __ret_warn_once = !!(condition); \
\
if (unlikely(__ret_warn_once)) \
- if (WARN_TAINT(!__warned, taint, format)) \
+ if (WARN_TAINT(!__warned, taint, fmt, ##args)) \
__warned = true; \
unlikely(__ret_warn_once); \
})

#define WARN_ON_RATELIMIT(condition, state) \
- WARN_ON((condition) && __ratelimit(state))
+ WARN_ON((condition) && __ratelimit(state))

#ifdef CONFIG_SMP
# define WARN_ON_SMP(x) WARN_ON(x)
--
1.7.3.2.245.g03276.dirty

2010-12-06 22:05:58

by Joe Perches

[permalink] [raw]
Subject: [PATCH 25/29] lib: Update WARN uses

Coalesce long formats.
Align arguments.
Remove KERN_<level>.
Use %s, __func__

Signed-off-by: Joe Perches <[email protected]>
---
lib/debugobjects.c | 21 ++++++++++-----------
lib/iomap.c | 2 +-
lib/kobject.c | 9 ++++-----
lib/kobject_uevent.c | 4 ++--
lib/list_debug.c | 24 ++++++++++--------------
lib/plist.c | 12 ++++++------
6 files changed, 33 insertions(+), 39 deletions(-)

diff --git a/lib/debugobjects.c b/lib/debugobjects.c
index deebcc5..f9f33fe 100644
--- a/lib/debugobjects.c
+++ b/lib/debugobjects.c
@@ -253,10 +253,9 @@ static void debug_print_object(struct debug_obj *obj, char *msg)

if (limit < 5 && obj->descr != descr_test) {
limit++;
- WARN(1, KERN_ERR "ODEBUG: %s %s (active state %u) "
- "object type: %s\n",
- msg, obj_states[obj->state], obj->astate,
- obj->descr->name);
+ WARN(1, "ODEBUG: %s %s (active state %u) object type: %s\n",
+ msg, obj_states[obj->state], obj->astate,
+ obj->descr->name);
}
debug_objects_warnings++;
}
@@ -841,22 +840,22 @@ check_results(void *addr, enum debug_obj_state state, int fixups, int warnings)

obj = lookup_object(addr, db);
if (!obj && state != ODEBUG_STATE_NONE) {
- WARN(1, KERN_ERR "ODEBUG: selftest object not found\n");
+ WARN(1, "ODEBUG: selftest object not found\n");
goto out;
}
if (obj && obj->state != state) {
- WARN(1, KERN_ERR "ODEBUG: selftest wrong state: %d != %d\n",
- obj->state, state);
+ WARN(1, "ODEBUG: selftest wrong state: %d != %d\n",
+ obj->state, state);
goto out;
}
if (fixups != debug_objects_fixups) {
- WARN(1, KERN_ERR "ODEBUG: selftest fixups failed %d != %d\n",
- fixups, debug_objects_fixups);
+ WARN(1, "ODEBUG: selftest fixups failed %d != %d\n",
+ fixups, debug_objects_fixups);
goto out;
}
if (warnings != debug_objects_warnings) {
- WARN(1, KERN_ERR "ODEBUG: selftest warnings failed %d != %d\n",
- warnings, debug_objects_warnings);
+ WARN(1, "ODEBUG: selftest warnings failed %d != %d\n",
+ warnings, debug_objects_warnings);
goto out;
}
res = 0;
diff --git a/lib/iomap.c b/lib/iomap.c
index d322293..08b4c8d 100644
--- a/lib/iomap.c
+++ b/lib/iomap.c
@@ -40,7 +40,7 @@ static void bad_io_access(unsigned long port, const char *access)
static int count = 10;
if (count) {
count--;
- WARN(1, KERN_ERR "Bad IO access at port %#lx (%s)\n", port, access);
+ WARN(1, "Bad IO access at port %#lx (%s)\n", port, access);
}
}

diff --git a/lib/kobject.c b/lib/kobject.c
index 82dc34c..26b808e 100644
--- a/lib/kobject.c
+++ b/lib/kobject.c
@@ -164,8 +164,8 @@ static int kobject_add_internal(struct kobject *kobj)
return -ENOENT;

if (!kobj->name || !kobj->name[0]) {
- WARN(1, "kobject: (%p): attempted to be registered with empty "
- "name!\n", kobj);
+ WARN(1, "kobject: (%p): attempted to be registered with empty name!\n",
+ kobj);
return -EINVAL;
}

@@ -590,9 +590,8 @@ void kobject_put(struct kobject *kobj)
{
if (kobj) {
if (!kobj->state_initialized)
- WARN(1, KERN_WARNING "kobject: '%s' (%p): is not "
- "initialized, yet kobject_put() is being "
- "called.\n", kobject_name(kobj), kobj);
+ WARN(1, "kobject: '%s' (%p): is not initialized, yet kobject_put() is being called\n",
+ kobject_name(kobj), kobj);
kref_put(&kobj->kref, kobject_release);
}
}
diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c
index 70af0a7..78f0a74 100644
--- a/lib/kobject_uevent.c
+++ b/lib/kobject_uevent.c
@@ -345,7 +345,7 @@ int add_uevent_var(struct kobj_uevent_env *env, const char *format, ...)
int len;

if (env->envp_idx >= ARRAY_SIZE(env->envp)) {
- WARN(1, KERN_ERR "add_uevent_var: too many keys\n");
+ WARN(1, "%s(): too many keys\n", __func__);
return -ENOMEM;
}

@@ -356,7 +356,7 @@ int add_uevent_var(struct kobj_uevent_env *env, const char *format, ...)
va_end(args);

if (len >= (sizeof(env->buf) - env->buflen)) {
- WARN(1, KERN_ERR "add_uevent_var: buffer size too small\n");
+ WARN(1, "%s(): buffer size too small\n", __func__);
return -ENOMEM;
}

diff --git a/lib/list_debug.c b/lib/list_debug.c
index 344c710..b574054 100644
--- a/lib/list_debug.c
+++ b/lib/list_debug.c
@@ -21,13 +21,11 @@ void __list_add(struct list_head *new,
struct list_head *next)
{
WARN(next->prev != prev,
- "list_add corruption. next->prev should be "
- "prev (%p), but was %p. (next=%p).\n",
- prev, next->prev, next);
+ "list_add corruption. next->prev should be prev (%p), but was %p. (next=%p)\n",
+ prev, next->prev, next);
WARN(prev->next != next,
- "list_add corruption. prev->next should be "
- "next (%p), but was %p. (prev=%p).\n",
- next, prev->next, prev);
+ "list_add corruption. prev->next should be next (%p), but was %p. (prev=%p)\n",
+ next, prev->next, prev);
next->prev = new;
new->next = next;
new->prev = prev;
@@ -44,17 +42,15 @@ EXPORT_SYMBOL(__list_add);
void list_del(struct list_head *entry)
{
WARN(entry->next == LIST_POISON1,
- "list_del corruption, next is LIST_POISON1 (%p)\n",
- LIST_POISON1);
+ "list_del corruption, next is LIST_POISON1 (%p)\n", LIST_POISON1);
WARN(entry->next != LIST_POISON1 && entry->prev == LIST_POISON2,
- "list_del corruption, prev is LIST_POISON2 (%p)\n",
- LIST_POISON2);
+ "list_del corruption, prev is LIST_POISON2 (%p)\n", LIST_POISON2);
WARN(entry->prev->next != entry,
- "list_del corruption. prev->next should be %p, "
- "but was %p\n", entry, entry->prev->next);
+ "list_del corruption. prev->next should be %p, but was %p\n",
+ entry, entry->prev->next);
WARN(entry->next->prev != entry,
- "list_del corruption. next->prev should be %p, "
- "but was %p\n", entry, entry->next->prev);
+ "list_del corruption. next->prev should be %p, but was %p\n",
+ entry, entry->next->prev);
__list_del(entry->prev, entry->next);
entry->next = LIST_POISON1;
entry->prev = LIST_POISON2;
diff --git a/lib/plist.c b/lib/plist.c
index 1471988..8923f3a 100644
--- a/lib/plist.c
+++ b/lib/plist.c
@@ -32,12 +32,12 @@ static void plist_check_prev_next(struct list_head *t, struct list_head *p,
struct list_head *n)
{
WARN(n->prev != p || p->next != n,
- "top: %p, n: %p, p: %p\n"
- "prev: %p, n: %p, p: %p\n"
- "next: %p, n: %p, p: %p\n",
- t, t->next, t->prev,
- p, p->next, p->prev,
- n, n->next, n->prev);
+ "top: %p, n: %p, p: %p\n"
+ "prev: %p, n: %p, p: %p\n"
+ "next: %p, n: %p, p: %p\n",
+ t, t->next, t->prev,
+ p, p->next, p->prev,
+ n, n->next, n->prev);
}

static void plist_check_list(struct list_head *top)
--
1.7.3.2.245.g03276.dirty

2010-12-06 22:05:27

by Joe Perches

[permalink] [raw]
Subject: [PATCH 02/29] arch/alpha: Update WARN uses

Coalesce long formats.
Align arguments.

Signed-off-by: Joe Perches <[email protected]>
---
arch/alpha/kernel/pci-sysfs.c | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/arch/alpha/kernel/pci-sysfs.c b/arch/alpha/kernel/pci-sysfs.c
index b899e95..6f30ac3 100644
--- a/arch/alpha/kernel/pci-sysfs.c
+++ b/arch/alpha/kernel/pci-sysfs.c
@@ -44,10 +44,9 @@ static int __pci_mmap_fits(struct pci_dev *pdev, int num,

if (start < size && size - start >= nr)
return 1;
- WARN(1, "process \"%s\" tried to map%s 0x%08lx-0x%08lx on %s BAR %d "
- "(size 0x%08lx)\n",
- current->comm, sparse ? " sparse" : "", start, start + nr,
- pci_name(pdev), num, size);
+ WARN(1, "process \"%s\" tried to map%s 0x%08lx-0x%08lx on %s BAR %d (size 0x%08lx)\n",
+ current->comm, sparse ? " sparse" : "", start, start + nr,
+ pci_name(pdev), num, size);
return 0;
}

@@ -261,10 +260,9 @@ static int __legacy_mmap_fits(struct pci_controller *hose,

if (start < size && size - start >= nr)
return 1;
- WARN(1, "process \"%s\" tried to map%s 0x%08lx-0x%08lx on hose %d "
- "(size 0x%08lx)\n",
- current->comm, sparse ? " sparse" : "", start, start + nr,
- hose->index, size);
+ WARN(1, "process \"%s\" tried to map%s 0x%08lx-0x%08lx on hose %d (size 0x%08lx)\n",
+ current->comm, sparse ? " sparse" : "", start, start + nr,
+ hose->index, size);
return 0;
}

--
1.7.3.2.245.g03276.dirty

2010-12-06 22:05:56

by Joe Perches

[permalink] [raw]
Subject: [PATCH 27/29] net/mac80211: Update WARN uses

Coalesce long formats.
Add missing newlines.

Signed-off-by: Joe Perches <[email protected]>
---
net/mac80211/agg-tx.c | 5 +++--
net/mac80211/iface.c | 4 ++--
net/mac80211/mlme.c | 2 +-
net/mac80211/rx.c | 4 +---
net/mac80211/tx.c | 4 +---
net/mac80211/util.c | 4 +---
net/mac80211/work.c | 4 ++--
7 files changed, 11 insertions(+), 16 deletions(-)

diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c
index d4679b2..9f2c3f6 100644
--- a/net/mac80211/agg-tx.c
+++ b/net/mac80211/agg-tx.c
@@ -454,8 +454,9 @@ ieee80211_agg_splice_packets(struct ieee80211_local *local,

ieee80211_stop_queue_agg(local, tid);

- if (WARN(!tid_tx, "TID %d gone but expected when splicing aggregates"
- " from the pending queue\n", tid))
+ if (WARN(!tid_tx,
+ "TID %d gone but expected when splicing aggregates from the pending queue\n",
+ tid))
return;

if (!skb_queue_empty(&tid_tx->pending)) {
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 7aa8559..795dbf4 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -820,7 +820,7 @@ static void ieee80211_iface_work(struct work_struct *work)
ieee80211_mesh_rx_queued_mgmt(sdata, skb);
break;
default:
- WARN(1, "frame for unexpected interface type");
+ WARN(1, "frame for unexpected interface type\n");
break;
}

@@ -979,7 +979,7 @@ static int ieee80211_runtime_change_iftype(struct ieee80211_sub_if_data *sdata,
ieee80211_setup_sdata(sdata, type);

err = ieee80211_do_open(sdata->dev, false);
- WARN(err, "type change: do_open returned %d", err);
+ WARN(err, "type change: do_open returned %d\n", err);

return ret;
}
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 7948079..62cc3c5 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1848,7 +1848,7 @@ void ieee80211_sta_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,
cfg80211_send_disassoc(sdata->dev, (u8 *)mgmt, skb->len);
break;
default:
- WARN(1, "unexpected: %d", rma);
+ WARN(1, "unexpected: %d\n", rma);
}
return;
}
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 6289525..e801a06 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -2852,9 +2852,7 @@ void ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb)
*/
if (WARN((status->rate_idx < 0 ||
status->rate_idx > 76),
- "Rate marked as an HT rate but passed "
- "status->rate_idx is not "
- "an MCS index [0-76]: %d (0x%02x)\n",
+ "Rate marked as an HT rate but passed status->rate_idx is not an MCS index [0-76]: %d (0x%02x)\n",
status->rate_idx,
status->rate_idx))
goto drop;
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 2ba7426..aed6cac 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -650,9 +650,7 @@ ieee80211_tx_h_rate_ctrl(struct ieee80211_tx_data *tx)
if (WARN(test_bit(SCAN_SW_SCANNING, &tx->local->scanning) &&
(sta_flags & WLAN_STA_ASSOC) &&
!rate_usable_index_exists(sband, &tx->sta->sta),
- "%s: Dropped data frame as no usable bitrate found while "
- "scanning and associated. Target station: "
- "%pM on %d GHz band\n",
+ "%s: Dropped data frame as no usable bitrate found while scanning and associated. Target station: %pM on %d GHz band\n",
tx->sdata->name, hdr->addr1,
tx->channel->band ? 5 : 2))
return TX_DROP;
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index e497476..93b0f78 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -1143,9 +1143,7 @@ int ieee80211_reconfig(struct ieee80211_local *local)
*/
res = drv_start(local);
if (res) {
- WARN(local->suspended, "Hardware became unavailable "
- "upon resume. This could be a software issue "
- "prior to suspend or a hardware issue.\n");
+ WARN(local->suspended, "Hardware became unavailable upon resume. This could be a software issue prior to suspend or a hardware issue.\n");
return res;
}

diff --git a/net/mac80211/work.c b/net/mac80211/work.c
index 2b5c3f2..c1d774a 100644
--- a/net/mac80211/work.c
+++ b/net/mac80211/work.c
@@ -849,7 +849,7 @@ static void ieee80211_work_rx_queued_mgmt(struct ieee80211_local *local,
list_del_rcu(&wk->list);
break;
default:
- WARN(1, "unexpected: %d", rma);
+ WARN(1, "unexpected: %d\n", rma);
}

mutex_unlock(&local->mtx);
@@ -995,7 +995,7 @@ static void ieee80211_work_work(struct work_struct *work)
list_add(&wk->list, &free_work);
break;
default:
- WARN(1, "unexpected: %d", rma);
+ WARN(1, "unexpected: %d\n", rma);
}
}

--
1.7.3.2.245.g03276.dirty

2010-12-06 22:05:57

by Joe Perches

[permalink] [raw]
Subject: [PATCH 26/29] mm: Update WARN uses

Coalesce long formats.
Align arguments.
Remove KERN_<level>.

Signed-off-by: Joe Perches <[email protected]>
---
mm/percpu.c | 4 ++--
mm/vmalloc.c | 5 ++---
2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/mm/percpu.c b/mm/percpu.c
index 0962e47..855c21c 100644
--- a/mm/percpu.c
+++ b/mm/percpu.c
@@ -711,8 +711,8 @@ static void __percpu *pcpu_alloc(size_t size, size_t align, bool reserved)
unsigned long flags;

if (unlikely(!size || size > PCPU_MIN_UNIT_SIZE || align > PAGE_SIZE)) {
- WARN(true, "illegal size (%zu) or align (%zu) for "
- "percpu allocation\n", size, align);
+ WARN(true, "illegal size (%zu) or align (%zu) for percpu allocation\n",
+ size, align);
return NULL;
}

diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index eb5cc7d..eb58343 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -1377,14 +1377,13 @@ static void __vunmap(const void *addr, int deallocate_pages)
return;

if ((PAGE_SIZE-1) & (unsigned long)addr) {
- WARN(1, KERN_ERR "Trying to vfree() bad address (%p)\n", addr);
+ WARN(1, "Trying to vfree() bad address (%p)\n", addr);
return;
}

area = remove_vm_area(addr);
if (unlikely(!area)) {
- WARN(1, KERN_ERR "Trying to vfree() nonexistent vm area (%p)\n",
- addr);
+ WARN(1, "Trying to vfree() nonexistent vm area (%p)\n", addr);
return;
}

--
1.7.3.2.245.g03276.dirty

2010-12-06 22:05:55

by Joe Perches

[permalink] [raw]
Subject: [PATCH 28/29] net/rfkill/input.c: Update WARN uses

Coalesce long formats.
Align arguments.

Signed-off-by: Joe Perches <[email protected]>
---
net/rfkill/input.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/net/rfkill/input.c b/net/rfkill/input.c
index 1bca6d4..4343f59 100644
--- a/net/rfkill/input.c
+++ b/net/rfkill/input.c
@@ -75,9 +75,8 @@ static void __rfkill_handle_global_op(enum rfkill_sched_op op)
default:
/* memory corruption or bug, fail safely */
rfkill_epo();
- WARN(1, "Unknown requested operation %d! "
- "rfkill Emergency Power Off activated\n",
- op);
+ WARN(1, "Unknown requested operation %d! rfkill Emergency Power Off activated\n",
+ op);
}
}

--
1.7.3.2.245.g03276.dirty

2010-12-06 22:05:53

by Joe Perches

[permalink] [raw]
Subject: [PATCH 29/29] drivers/regulator: Update WARN uses

Align arguments.

Signed-off-by: Joe Perches <[email protected]>
---
drivers/regulator/core.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index a1b1237..5d07e5d 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -1379,8 +1379,7 @@ static int _regulator_disable(struct regulator_dev *rdev,
*supply_rdev_ptr = NULL;

if (WARN(rdev->use_count <= 0,
- "unbalanced disables for %s\n",
- rdev_get_name(rdev)))
+ "unbalanced disables for %s\n", rdev_get_name(rdev)))
return -EIO;

/* are we the last user and permitted to disable ? */
--
1.7.3.2.245.g03276.dirty

2010-12-06 22:06:52

by Joe Perches

[permalink] [raw]
Subject: [PATCH 22/29] kernel/irq: Update WARN uses

Remove KERN_<level>.

Signed-off-by: Joe Perches <[email protected]>
---
kernel/irq/chip.c | 2 +-
kernel/irq/manage.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index baa5c4a..1418f0a 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -29,7 +29,7 @@ int set_irq_chip(unsigned int irq, struct irq_chip *chip)
unsigned long flags;

if (!desc) {
- WARN(1, KERN_ERR "Trying to install chip for IRQ%d\n", irq);
+ WARN(1, "Trying to install chip for IRQ%d\n", irq);
return -EINVAL;
}

diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 91a5fa2..be8e055 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -288,7 +288,7 @@ void __enable_irq(struct irq_desc *desc, unsigned int irq, bool resume)
switch (desc->depth) {
case 0:
err_out:
- WARN(1, KERN_WARNING "Unbalanced enable for IRQ %d\n", irq);
+ WARN(1, "Unbalanced enable for IRQ %d\n", irq);
break;
case 1: {
unsigned int status = desc->status & ~IRQ_DISABLED;
--
1.7.3.2.245.g03276.dirty

2010-12-06 22:06:52

by Joe Perches

[permalink] [raw]
Subject: [PATCH 23/29] kernel/panic.c: Update warn_slowpath to use %pV

Replace struct slowpath_args with struct va_format.
Add KERN_WARNING to output.
Remove space after pointer in panic declaration.

Signed-off-by: Joe Perches <[email protected]>
---
kernel/panic.c | 40 ++++++++++++++++++----------------------
1 files changed, 18 insertions(+), 22 deletions(-)

diff --git a/kernel/panic.c b/kernel/panic.c
index 4c13b1a..8943c8f 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -56,7 +56,7 @@ EXPORT_SYMBOL(panic_blink);
*
* This function never returns.
*/
-NORET_TYPE void panic(const char * fmt, ...)
+NORET_TYPE void panic(const char *fmt, ...)
{
static char buf[1024];
va_list args;
@@ -357,13 +357,9 @@ void oops_exit(void)
}

#ifdef WANT_WARN_ON_SLOWPATH
-struct slowpath_args {
- const char *fmt;
- va_list args;
-};

static void warn_slowpath_common(const char *file, int line, void *caller,
- unsigned taint, struct slowpath_args *args)
+ unsigned taint, struct va_format *vaf)
{
const char *board;

@@ -372,10 +368,8 @@ static void warn_slowpath_common(const char *file, int line, void *caller,
board = dmi_get_system_info(DMI_PRODUCT_NAME);
if (board)
printk(KERN_WARNING "Hardware name: %s\n", board);
-
- if (args)
- vprintk(args->fmt, args->args);
-
+ if (vaf)
+ printk(KERN_WARNING "%pV", vaf);
print_modules();
dump_stack();
print_oops_end_marker();
@@ -384,26 +378,28 @@ static void warn_slowpath_common(const char *file, int line, void *caller,

void warn_slowpath_fmt(const char *file, int line, const char *fmt, ...)
{
- struct slowpath_args args;
-
- args.fmt = fmt;
- va_start(args.args, fmt);
+ struct va_format vaf;
+ va_list va;
+ va_start(va, fmt);
+ vaf.fmt = fmt;
+ vaf.va = &va;
warn_slowpath_common(file, line, __builtin_return_address(0),
- TAINT_WARN, &args);
- va_end(args.args);
+ TAINT_WARN, &vaf);
+ va_end(va);
}
EXPORT_SYMBOL(warn_slowpath_fmt);

void warn_slowpath_fmt_taint(const char *file, int line,
unsigned taint, const char *fmt, ...)
{
- struct slowpath_args args;
-
- args.fmt = fmt;
- va_start(args.args, fmt);
+ struct va_format vaf;
+ va_list va;
+ va_start(va, fmt);
+ vaf.fmt = fmt;
+ vaf.va = &va;
warn_slowpath_common(file, line, __builtin_return_address(0),
- taint, &args);
- va_end(args.args);
+ taint, &vaf);
+ va_end(va);
}
EXPORT_SYMBOL(warn_slowpath_fmt_taint);

--
1.7.3.2.245.g03276.dirty

2010-12-06 22:06:50

by Joe Perches

[permalink] [raw]
Subject: [PATCH 24/29] kernel: Update WARN uses

Align arguments.
Add missing newlines.
Remove KERN_<level>.

Signed-off-by: Joe Perches <[email protected]>
---
kernel/notifier.c | 2 +-
kernel/pm_qos_params.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/kernel/notifier.c b/kernel/notifier.c
index 2488ba7..ff6a774 100644
--- a/kernel/notifier.c
+++ b/kernel/notifier.c
@@ -85,7 +85,7 @@ static int __kprobes notifier_call_chain(struct notifier_block **nl,

#ifdef CONFIG_DEBUG_NOTIFIERS
if (unlikely(!func_ptr_is_kernel_text(nb->notifier_call))) {
- WARN(1, "Invalid notifier called!");
+ WARN(1, "Invalid notifier called!\n");
nb = next_nb;
continue;
}
diff --git a/kernel/pm_qos_params.c b/kernel/pm_qos_params.c
index aeaa7f8..a7abb8b 100644
--- a/kernel/pm_qos_params.c
+++ b/kernel/pm_qos_params.c
@@ -231,7 +231,7 @@ void pm_qos_add_request(struct pm_qos_request_list *dep,
int new_value;

if (pm_qos_request_active(dep)) {
- WARN(1, KERN_ERR "pm_qos_add_request() called for already added request\n");
+ WARN(1, "%s() called for already added request\n", __func__);
return;
}
if (value == PM_QOS_DEFAULT_VALUE)
@@ -264,7 +264,7 @@ void pm_qos_update_request(struct pm_qos_request_list *pm_qos_req,
return;

if (!pm_qos_request_active(pm_qos_req)) {
- WARN(1, KERN_ERR "pm_qos_update_request() called for unknown object\n");
+ WARN(1, "%s() called for unknown object\n", __func__);
return;
}

@@ -297,7 +297,7 @@ void pm_qos_remove_request(struct pm_qos_request_list *pm_qos_req)
/* silent return to keep pcm code cleaner */

if (!pm_qos_request_active(pm_qos_req)) {
- WARN(1, KERN_ERR "pm_qos_remove_request() called for unknown object\n");
+ WARN(1, "%s() called for unknown object\n", __func__);
return;
}

--
1.7.3.2.245.g03276.dirty

2010-12-06 22:07:48

by Joe Perches

[permalink] [raw]
Subject: [PATCH 16/29] fs/nfsd: Update WARN uses

Add missing 1 as first argument.
Align arguments.

Signed-off-by: Joe Perches <[email protected]>
---
fs/nfsd/nfs4state.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 4d542cf..7abd980 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -1241,7 +1241,8 @@ nfsd4_store_cache_entry(struct nfsd4_compoundres *resp)
(char *)resp->xbuf->head[0].iov_base;
if (read_bytes_from_xdr_buf(resp->xbuf, base, slot->sl_data,
slot->sl_datalen))
- WARN("%s: sessions DRC could not cache compound\n", __func__);
+ WARN(1, "%s: sessions DRC could not cache compound\n",
+ __func__);
return;
}

--
1.7.3.2.245.g03276.dirty

2010-12-06 22:07:49

by Joe Perches

[permalink] [raw]
Subject: [PATCH 15/29] drivers/video/omap2/dss: Update WARN uses

Add missing initial argument.
Coalesce long formats.

Signed-off-by: Joe Perches <[email protected]>
---
drivers/video/omap2/dss/core.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/video/omap2/dss/core.c b/drivers/video/omap2/dss/core.c
index 8e89f60..2a98237 100644
--- a/drivers/video/omap2/dss/core.c
+++ b/drivers/video/omap2/dss/core.c
@@ -867,8 +867,7 @@ static void reset_device(struct device *dev, int check)
dev->platform_data = NULL;
while (dev_p < dev_end) {
if (*dev_p) {
- WARN("%s: struct device fields will be "
- "discarded\n",
+ WARN(1, "%s: struct device fields will be discarded\n",
__func__);
break;
}
--
1.7.3.2.245.g03276.dirty

2010-12-06 22:07:50

by Joe Perches

[permalink] [raw]
Subject: [PATCH 12/29] drivers/net/wireless/iwlwifi: Update WARN uses

Align arguments.
Add missing newlines.

Signed-off-by: Joe Perches <[email protected]>
---
drivers/net/wireless/iwlwifi/iwl-agn-lib.c | 3 +--
drivers/net/wireless/iwlwifi/iwl-agn-sta.c | 6 +++---
drivers/net/wireless/iwlwifi/iwl-tx.c | 6 +++---
drivers/net/wireless/iwlwifi/iwl3945-base.c | 2 +-
4 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
index 407f0bb..31544bc 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
@@ -2153,8 +2153,7 @@ static int iwl_get_idle_rx_chain_count(struct iwl_priv *priv, int active_cnt)
case IEEE80211_SMPS_OFF:
return active_cnt;
default:
- WARN(1, "invalid SMPS mode %d",
- priv->current_ht_config.smps);
+ WARN(1, "invalid SMPS mode %d\n", priv->current_ht_config.smps);
return active_cnt;
}
}
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-sta.c b/drivers/net/wireless/iwlwifi/iwl-agn-sta.c
index 35f085a..4c0cd09 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-sta.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-sta.c
@@ -284,7 +284,7 @@ static int iwl_set_wep_dynamic_key_info(struct iwl_priv *priv,
* in uCode. */

WARN(priv->stations[sta_id].sta.key.key_offset == WEP_INVALID_OFFSET,
- "no space for a new key");
+ "no space for a new key\n");

priv->stations[sta_id].sta.key.key_flags = key_flags;
priv->stations[sta_id].sta.sta.modify_mask = STA_MODIFY_KEY_MASK;
@@ -334,7 +334,7 @@ static int iwl_set_ccmp_dynamic_key_info(struct iwl_priv *priv,
* in uCode. */

WARN(priv->stations[sta_id].sta.key.key_offset == WEP_INVALID_OFFSET,
- "no space for a new key");
+ "no space for a new key\n");

priv->stations[sta_id].sta.key.key_flags = key_flags;
priv->stations[sta_id].sta.sta.modify_mask = STA_MODIFY_KEY_MASK;
@@ -378,7 +378,7 @@ static int iwl_set_tkip_dynamic_key_info(struct iwl_priv *priv,
* in uCode. */

WARN(priv->stations[sta_id].sta.key.key_offset == WEP_INVALID_OFFSET,
- "no space for a new key");
+ "no space for a new key\n");

priv->stations[sta_id].sta.key.key_flags = key_flags;

diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c
index 90659bc..5e82466 100644
--- a/drivers/net/wireless/iwlwifi/iwl-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-tx.c
@@ -602,9 +602,9 @@ void iwl_tx_cmd_complete(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb)
* in the queue management code. */
if (WARN(txq_id != priv->cmd_queue,
"wrong command queue %d (should be %d), sequence 0x%X readp=%d writep=%d\n",
- txq_id, priv->cmd_queue, sequence,
- priv->txq[priv->cmd_queue].q.read_ptr,
- priv->txq[priv->cmd_queue].q.write_ptr)) {
+ txq_id, priv->cmd_queue, sequence,
+ priv->txq[priv->cmd_queue].q.read_ptr,
+ priv->txq[priv->cmd_queue].q.write_ptr)) {
iwl_print_hex_error(priv, pkt, 32);
return;
}
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 8eb1393..1dbf87b 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -169,7 +169,7 @@ static int iwl3945_set_ccmp_dynamic_key_info(struct iwl_priv *priv,
* in uCode. */

WARN(priv->stations[sta_id].sta.key.key_offset == WEP_INVALID_OFFSET,
- "no space for a new key");
+ "no space for a new key\n");

priv->stations[sta_id].sta.key.key_flags = key_flags;
priv->stations[sta_id].sta.sta.modify_mask = STA_MODIFY_KEY_MASK;
--
1.7.3.2.245.g03276.dirty

2010-12-06 22:07:44

by Joe Perches

[permalink] [raw]
Subject: [PATCH 20/29] fs: Update WARN uses

Coalesce long formats.
Align arguments.
Remove KERN_<level>.

Signed-off-by: Joe Perches <[email protected]>
---
fs/bio.c | 2 +-
fs/buffer.c | 2 +-
fs/super.c | 5 +++--
3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/fs/bio.c b/fs/bio.c
index 4bd454f..d366f05 100644
--- a/fs/bio.c
+++ b/fs/bio.c
@@ -134,7 +134,7 @@ static void bio_put_slab(struct bio_set *bs)
}
}

- if (WARN(!bslab, KERN_ERR "bio: unable to find slab!\n"))
+ if (WARN(!bslab, "bio: unable to find slab!\n"))
goto out;

WARN_ON(!bslab->slab_ref);
diff --git a/fs/buffer.c b/fs/buffer.c
index 3a70821..7e060fd 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -1191,7 +1191,7 @@ void __brelse(struct buffer_head * buf)
put_bh(buf);
return;
}
- WARN(1, KERN_ERR "VFS: brelse: Trying to free free buffer\n");
+ WARN(1, "VFS: brelse: Trying to free free buffer\n");
}
EXPORT_SYMBOL(__brelse);

diff --git a/fs/super.c b/fs/super.c
index ca51b70..7920ab9 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -1012,8 +1012,9 @@ vfs_kern_mount(struct file_system_type *type, int flags, const char *name, void
* violate this rule. This warning should be either removed or
* converted to a BUG() in 2.6.34.
*/
- WARN((mnt->mnt_sb->s_maxbytes < 0), "%s set sb->s_maxbytes to "
- "negative value (%lld)\n", type->name, mnt->mnt_sb->s_maxbytes);
+ WARN((mnt->mnt_sb->s_maxbytes < 0),
+ "%s set sb->s_maxbytes to negative value (%lld)\n",
+ type->name, mnt->mnt_sb->s_maxbytes);

mnt->mnt_mountpoint = mnt->mnt_root;
mnt->mnt_parent = mnt;
--
1.7.3.2.245.g03276.dirty

2010-12-06 22:07:45

by Joe Perches

[permalink] [raw]
Subject: [PATCH 18/29] fs/sysfs: Update WARN uses

Coalesce long formats.
Align arguments.
Remove KERN_<level>.

Signed-off-by: Joe Perches <[email protected]>
---
fs/sysfs/dir.c | 3 +--
fs/sysfs/file.c | 4 ++--
fs/sysfs/group.c | 4 ++--
fs/sysfs/symlink.c | 10 ++++------
4 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c
index 7e54bac..387cf47 100644
--- a/fs/sysfs/dir.c
+++ b/fs/sysfs/dir.c
@@ -444,8 +444,7 @@ int sysfs_add_one(struct sysfs_addrm_cxt *acxt, struct sysfs_dirent *sd)
ret = __sysfs_add_one(acxt, sd);
if (ret == -EEXIST) {
char *path = kzalloc(PATH_MAX, GFP_KERNEL);
- WARN(1, KERN_WARNING
- "sysfs: cannot create duplicate filename '%s'\n",
+ WARN(1, "sysfs: cannot create duplicate filename '%s'\n",
(path == NULL) ? sd->s_name :
strcat(strcat(sysfs_pathname(acxt->parent_sd, path), "/"),
sd->s_name));
diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
index da3fefe..c061516 100644
--- a/fs/sysfs/file.c
+++ b/fs/sysfs/file.c
@@ -351,8 +351,8 @@ static int sysfs_open_file(struct inode *inode, struct file *file)
if (kobj->ktype && kobj->ktype->sysfs_ops)
ops = kobj->ktype->sysfs_ops;
else {
- WARN(1, KERN_ERR "missing sysfs attribute operations for "
- "kobject: %s\n", kobject_name(kobj));
+ WARN(1, "missing sysfs attribute operations for kobject: %s\n",
+ kobject_name(kobj));
goto err_out;
}

diff --git a/fs/sysfs/group.c b/fs/sysfs/group.c
index c8769dc..fa82099 100644
--- a/fs/sysfs/group.c
+++ b/fs/sysfs/group.c
@@ -134,8 +134,8 @@ void sysfs_remove_group(struct kobject * kobj,
if (grp->name) {
sd = sysfs_get_dirent(dir_sd, NULL, grp->name);
if (!sd) {
- WARN(!sd, KERN_WARNING "sysfs group %p not found for "
- "kobject '%s'\n", grp, kobject_name(kobj));
+ WARN(!sd, "sysfs group %p not found for kobject '%s'\n",
+ grp, kobject_name(kobj));
return;
}
} else
diff --git a/fs/sysfs/symlink.c b/fs/sysfs/symlink.c
index a7ac78f..3169da8 100644
--- a/fs/sysfs/symlink.c
+++ b/fs/sysfs/symlink.c
@@ -75,12 +75,10 @@ static int sysfs_do_create_link(struct kobject *kobj, struct kobject *target,
error = __sysfs_add_one(&acxt, sd);
} else {
error = -EINVAL;
- WARN(1, KERN_WARNING
- "sysfs: symlink across ns_types %s/%s -> %s/%s\n",
- parent_sd->s_name,
- sd->s_name,
- sd->s_symlink.target_sd->s_parent->s_name,
- sd->s_symlink.target_sd->s_name);
+ WARN(1, "sysfs: symlink across ns_types %s/%s -> %s/%s\n",
+ parent_sd->s_name, sd->s_name,
+ sd->s_symlink.target_sd->s_parent->s_name,
+ sd->s_symlink.target_sd->s_name);
}
sysfs_addrm_finish(&acxt);

--
1.7.3.2.245.g03276.dirty

2010-12-06 22:07:47

by Joe Perches

[permalink] [raw]
Subject: [PATCH 17/29] fs/notify/inotify: Update WARN uses

Coalesce long formats.
Align arguments.

Signed-off-by: Joe Perches <[email protected]>
---
fs/notify/inotify/inotify_fsnotify.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/notify/inotify/inotify_fsnotify.c b/fs/notify/inotify/inotify_fsnotify.c
index a91b69a..aa283e4 100644
--- a/fs/notify/inotify/inotify_fsnotify.c
+++ b/fs/notify/inotify/inotify_fsnotify.c
@@ -177,8 +177,8 @@ static int idr_callback(int id, void *p, void *data)
fsn_mark = p;
i_mark = container_of(fsn_mark, struct inotify_inode_mark, fsn_mark);

- WARN(1, "inotify closing but id=%d for fsn_mark=%p in group=%p still in "
- "idr. Probably leaking memory\n", id, p, data);
+ WARN(1, "inotify closing but id=%d for fsn_mark=%p in group=%p still in idr. Probably leaking memory\n",
+ id, p, data);

/*
* I'm taking the liberty of assuming that the mark in question is a
--
1.7.3.2.245.g03276.dirty

2010-12-06 22:07:42

by Joe Perches

[permalink] [raw]
Subject: [PATCH 21/29] include/linux/device.h: Update WARN uses

Macro argument neatening.

Signed-off-by: Joe Perches <[email protected]>
---
include/linux/device.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/linux/device.h b/include/linux/device.h
index 1e2d335..129cc25 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -743,7 +743,7 @@ do { \
* file/line information and a backtrace.
*/
#define dev_WARN(dev, format, arg...) \
- WARN(1, "Device: %s\n" format, dev_driver_string(dev), ## arg);
+ WARN(1, "Device: %s\n" format, dev_driver_string(dev), ##arg);

/* Create alias, so I can be autoloaded. */
#define MODULE_ALIAS_CHARDEV(major,minor) \
--
1.7.3.2.245.g03276.dirty

2010-12-06 22:07:43

by Joe Perches

[permalink] [raw]
Subject: [PATCH 19/29] fs/proc: Update WARN uses

Coalesce long formats.
Align arguments.
Remove KERN_<level>.

Signed-off-by: Joe Perches <[email protected]>
---
fs/proc/generic.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/fs/proc/generic.c b/fs/proc/generic.c
index dd29f03..eedc3fe 100644
--- a/fs/proc/generic.c
+++ b/fs/proc/generic.c
@@ -585,8 +585,8 @@ static int proc_register(struct proc_dir_entry * dir, struct proc_dir_entry * dp

for (tmp = dir->subdir; tmp; tmp = tmp->next)
if (strcmp(tmp->name, dp->name) == 0) {
- WARN(1, KERN_WARNING "proc_dir_entry '%s/%s' already registered\n",
- dir->name, dp->name);
+ WARN(1, "proc_dir_entry '%s/%s' already registered\n",
+ dir->name, dp->name);
break;
}

@@ -855,9 +855,8 @@ continue_removing:
if (S_ISDIR(de->mode))
parent->nlink--;
de->nlink = 0;
- WARN(de->subdir, KERN_WARNING "%s: removing non-empty directory "
- "'%s/%s', leaking at least '%s'\n", __func__,
- de->parent->name, de->name, de->subdir->name);
+ WARN(de->subdir, "%s: removing non-empty directory '%s/%s', leaking at least '%s'\n",
+ __func__, de->parent->name, de->name, de->subdir->name);
pde_put(de);
}
EXPORT_SYMBOL(remove_proc_entry);
--
1.7.3.2.245.g03276.dirty

2010-12-06 22:09:17

by Joe Perches

[permalink] [raw]
Subject: [PATCH 04/29] arch/powerpc: Update WARN uses

Coalesce long formats.
Align arguments.
Add missing newlines.

Signed-off-by: Joe Perches <[email protected]>
---
arch/powerpc/kernel/hw_breakpoint.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/kernel/hw_breakpoint.c b/arch/powerpc/kernel/hw_breakpoint.c
index 5ecd040..d7343a7 100644
--- a/arch/powerpc/kernel/hw_breakpoint.c
+++ b/arch/powerpc/kernel/hw_breakpoint.c
@@ -270,8 +270,8 @@ int __kprobes hw_breakpoint_handler(struct die_args *args)
* message to let the user know about it.
*/
if (!stepped) {
- WARN(1, "Unable to handle hardware breakpoint. Breakpoint at "
- "0x%lx will be disabled.", info->address);
+ WARN(1, "Unable to handle hardware breakpoint. Breakpoint at 0x%lx will be disabled.\n",
+ info->address);
perf_event_disable(bp);
goto out;
}
--
1.7.3.2.245.g03276.dirty

2010-12-06 22:09:13

by Joe Perches

[permalink] [raw]
Subject: [PATCH 10/29] drivers/firmware: Update WARN uses

Remove KERN_<level>.

Signed-off-by: Joe Perches <[email protected]>
---
drivers/firmware/dmi_scan.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/firmware/dmi_scan.c b/drivers/firmware/dmi_scan.c
index e28e41668..5f427d4 100644
--- a/drivers/firmware/dmi_scan.c
+++ b/drivers/firmware/dmi_scan.c
@@ -475,7 +475,7 @@ static bool dmi_matches(const struct dmi_system_id *dmi)
{
int i;

- WARN(!dmi_initialized, KERN_ERR "dmi check: not initialized yet.\n");
+ WARN(!dmi_initialized, "dmi check: not initialized yet\n");

for (i = 0; i < ARRAY_SIZE(dmi->matches); i++) {
int s = dmi->matches[i].slot;
--
1.7.3.2.245.g03276.dirty

2010-12-06 22:09:14

by Joe Perches

[permalink] [raw]
Subject: [PATCH 09/29] drivers/cpuidle: Update WARN uses

Align arguments.

Signed-off-by: Joe Perches <[email protected]>
---
drivers/cpuidle/driver.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/cpuidle/driver.c b/drivers/cpuidle/driver.c
index fd1601e..7c9e507 100644
--- a/drivers/cpuidle/driver.c
+++ b/drivers/cpuidle/driver.c
@@ -56,7 +56,7 @@ void cpuidle_unregister_driver(struct cpuidle_driver *drv)
{
if (drv != cpuidle_curr_driver) {
WARN(1, "invalid cpuidle_unregister_driver(%s)\n",
- drv->name);
+ drv->name);
return;
}

--
1.7.3.2.245.g03276.dirty

2010-12-06 22:09:15

by Joe Perches

[permalink] [raw]
Subject: [PATCH 07/29] drivers/base: Update WARN uses

Coalesce long formats.
Align arguments.
Add missing newlines.
Remove KERN_<level>.

Signed-off-by: Joe Perches <[email protected]>
---
drivers/base/class.c | 4 ++--
drivers/base/core.c | 5 ++---
drivers/base/memory.c | 4 ++--
drivers/base/sys.c | 10 ++++------
4 files changed, 10 insertions(+), 13 deletions(-)

diff --git a/drivers/base/class.c b/drivers/base/class.c
index 4f1df2e..ac3a2a6 100644
--- a/drivers/base/class.c
+++ b/drivers/base/class.c
@@ -369,7 +369,7 @@ int class_for_each_device(struct class *class, struct device *start,
if (!class)
return -EINVAL;
if (!class->p) {
- WARN(1, "%s called for class '%s' before it was initialized",
+ WARN(1, "%s called for class '%s' before it was initialized\n",
__func__, class->name);
return -EINVAL;
}
@@ -416,7 +416,7 @@ struct device *class_find_device(struct class *class, struct device *start,
if (!class)
return NULL;
if (!class->p) {
- WARN(1, "%s called for class '%s' before it was initialized",
+ WARN(1, "%s called for class '%s' before it was initialized\n",
__func__, class->name);
return NULL;
}
diff --git a/drivers/base/core.c b/drivers/base/core.c
index 610d967..4ae8630 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -138,9 +138,8 @@ static void device_release(struct kobject *kobj)
else if (dev->class && dev->class->dev_release)
dev->class->dev_release(dev);
else
- WARN(1, KERN_ERR "Device '%s' does not have a release() "
- "function, it is broken and must be fixed.\n",
- dev_name(dev));
+ WARN(1, "Device '%s' does not have a release() function, it is broken and must be fixed\n",
+ dev_name(dev));
kfree(p);
}

diff --git a/drivers/base/memory.c b/drivers/base/memory.c
index cafeaaf..9acb048 100644
--- a/drivers/base/memory.c
+++ b/drivers/base/memory.c
@@ -229,8 +229,8 @@ memory_block_action(struct memory_block *mem, unsigned long action)
}
break;
default:
- WARN(1, KERN_WARNING "%s(%p, %ld) unknown action: %ld\n",
- __func__, mem, action, action);
+ WARN(1, "%s(%p, %ld) unknown action: %ld\n",
+ __func__, mem, action, action);
ret = -EINVAL;
}

diff --git a/drivers/base/sys.c b/drivers/base/sys.c
index 1667aaf..5552d63 100644
--- a/drivers/base/sys.c
+++ b/drivers/base/sys.c
@@ -181,16 +181,14 @@ int sysdev_driver_register(struct sysdev_class *cls, struct sysdev_driver *drv)
int err = 0;

if (!cls) {
- WARN(1, KERN_WARNING "sysdev: invalid class passed to "
- "sysdev_driver_register!\n");
+ WARN(1, "sysdev: invalid class passed to sysdev_driver_register!\n");
return -EINVAL;
}

/* Check whether this driver has already been added to a class. */
if (drv->entry.next && !list_empty(&drv->entry))
- WARN(1, KERN_WARNING "sysdev: class %s: driver (%p) has already"
- " been registered to a class, something is wrong, but "
- "will forge on!\n", cls->name, drv);
+ WARN(1, "sysdev: class %s: driver (%p) has already been registered to a class, something is wrong, but will forge on!\n",
+ cls->name, drv);

mutex_lock(&sysdev_drivers_lock);
if (cls && kset_get(&cls->kset)) {
@@ -204,7 +202,7 @@ int sysdev_driver_register(struct sysdev_class *cls, struct sysdev_driver *drv)
}
} else {
err = -EINVAL;
- WARN(1, KERN_ERR "%s: invalid device class\n", __func__);
+ WARN(1, "%s: invalid device class\n", __func__);
}
mutex_unlock(&sysdev_drivers_lock);
return err;
--
1.7.3.2.245.g03276.dirty

2010-12-06 22:09:10

by Joe Perches

[permalink] [raw]
Subject: [PATCH 14/29] drivers/usb/musb: Update WARN uses

Align arguments.

Signed-off-by: Joe Perches <[email protected]>
---
drivers/usb/musb/musb_host.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
index 4d5bcb4..bcabdb3 100644
--- a/drivers/usb/musb/musb_host.c
+++ b/drivers/usb/musb/musb_host.c
@@ -120,8 +120,8 @@ static void musb_h_tx_flush_fifo(struct musb_hw_ep *ep)
musb_writew(epio, MUSB_TXCSR, csr);
csr = musb_readw(epio, MUSB_TXCSR);
if (WARN(retries-- < 1,
- "Could not flush host TX%d fifo: csr: %04x\n",
- ep->epnum, csr))
+ "Could not flush host TX%d fifo: csr: %04x\n",
+ ep->epnum, csr))
return;
mdelay(1);
}
@@ -144,7 +144,7 @@ static void musb_h_ep0_flush_fifo(struct musb_hw_ep *ep)
} while (--retries);

WARN(!retries, "Could not flush host TX%d fifo: csr: %04x\n",
- ep->epnum, csr);
+ ep->epnum, csr);

/* and reset for the next transfer */
musb_writew(epio, MUSB_TXCSR, 0);
--
1.7.3.2.245.g03276.dirty

2010-12-06 22:09:11

by Joe Perches

[permalink] [raw]
Subject: [PATCH 11/29] drivers/gpio: Update WARN uses

Align arguments.
Remove a trailing space before a newline from pr_err

Signed-off-by: Joe Perches <[email protected]>
---
drivers/gpio/gpiolib.c | 4 ++--
drivers/gpio/it8761e_gpio.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 21da9c1..cef8b3a 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -96,9 +96,9 @@ static int gpio_ensure_requested(struct gpio_desc *desc, unsigned offset)
const int gpio = chip->base + offset;

if (WARN(test_and_set_bit(FLAG_REQUESTED, &desc->flags) == 0,
- "autorequest GPIO-%d\n", gpio)) {
+ "autorequest GPIO-%d\n", gpio)) {
if (!try_module_get(chip->owner)) {
- pr_err("GPIO-%d: module can't be gotten \n", gpio);
+ pr_err("GPIO-%d: module can't be gotten\n", gpio);
clear_bit(FLAG_REQUESTED, &desc->flags);
/* lose */
return -EIO;
diff --git a/drivers/gpio/it8761e_gpio.c b/drivers/gpio/it8761e_gpio.c
index 48fc43c..9109074 100644
--- a/drivers/gpio/it8761e_gpio.c
+++ b/drivers/gpio/it8761e_gpio.c
@@ -220,7 +220,7 @@ static void __exit it8761e_gpio_exit(void)
int ret = gpiochip_remove(&it8761e_gpio_chip);

WARN(ret, "%s(): gpiochip_remove() failed, ret=%d\n",
- __func__, ret);
+ __func__, ret);

release_region(gpio_ba, GPIO_IOSIZE);
gpio_ba = 0;
--
1.7.3.2.245.g03276.dirty

2010-12-06 22:10:42

by Joe Perches

[permalink] [raw]
Subject: [PATCH 05/29] arch/x86: Update WARN uses

Coalesce long formats.
Align arguments.
Add missing newlines.
Remove KERN_<level>.

Signed-off-by: Joe Perches <[email protected]>
---
arch/x86/kernel/acpi/boot.c | 2 +-
arch/x86/kernel/apic/apic.c | 2 +-
arch/x86/kernel/apic/es7000_32.c | 2 +-
arch/x86/kernel/cpu/perf_event.c | 4 ++--
arch/x86/kernel/pci-calgary_64.c | 4 ++--
arch/x86/kernel/tsc_sync.c | 4 ++--
arch/x86/kernel/xsave.c | 2 +-
arch/x86/mm/ioremap.c | 5 ++---
arch/x86/mm/pageattr-test.c | 2 +-
arch/x86/mm/pageattr.c | 5 ++---
arch/x86/platform/sfi/sfi.c | 4 ++--
11 files changed, 17 insertions(+), 19 deletions(-)

diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index 71232b9..e005970 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -1368,7 +1368,7 @@ static int __init dmi_ignore_irq0_timer_override(const struct dmi_system_id *d)
* the acpi_skip_timer_override flag already:
*/
if (!acpi_skip_timer_override) {
- WARN(1, KERN_ERR "ati_ixp4x0 quirk not complete.\n");
+ WARN(1, "ati_ixp4x0 quirk not complete\n");
pr_notice("%s detected: Ignoring BIOS IRQ0 pin2 override\n",
d->ident);
acpi_skip_timer_override = 1;
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index 360b37d..e686b7c 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -2100,7 +2100,7 @@ static int lapic_resume(struct sys_device *dev)
if (intr_remapping_enabled) {
ioapic_entries = alloc_ioapic_entries();
if (!ioapic_entries) {
- WARN(1, "Alloc ioapic_entries in lapic resume failed.");
+ WARN(1, "Alloc ioapic_entries in lapic resume failed\n");
ret = -ENOMEM;
goto restore;
}
diff --git a/arch/x86/kernel/apic/es7000_32.c b/arch/x86/kernel/apic/es7000_32.c
index 8593582..a30bc9b 100644
--- a/arch/x86/kernel/apic/es7000_32.c
+++ b/arch/x86/kernel/apic/es7000_32.c
@@ -564,7 +564,7 @@ static unsigned int es7000_cpu_mask_to_apicid(const struct cpumask *cpumask)
int new_apicid = es7000_cpu_to_logical_apicid(cpu);

if (round && APIC_CLUSTER(apicid) != APIC_CLUSTER(new_apicid)) {
- WARN(1, "Not a valid mask!");
+ WARN(1, "Not a valid mask!\n");

return BAD_APICID;
}
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
index 15ce524..cdebb90 100644
--- a/arch/x86/kernel/cpu/perf_event.c
+++ b/arch/x86/kernel/cpu/perf_event.c
@@ -1398,14 +1398,14 @@ void __init init_hw_perf_events(void)
x86_pmu.quirks();

if (x86_pmu.num_counters > X86_PMC_MAX_GENERIC) {
- WARN(1, KERN_ERR "hw perf events %d > max(%d), clipping!",
+ WARN(1, "hw perf events %d > max(%d), clipping!\n",
x86_pmu.num_counters, X86_PMC_MAX_GENERIC);
x86_pmu.num_counters = X86_PMC_MAX_GENERIC;
}
x86_pmu.intel_ctrl = (1 << x86_pmu.num_counters) - 1;

if (x86_pmu.num_counters_fixed > X86_PMC_MAX_FIXED) {
- WARN(1, KERN_ERR "hw perf events fixed %d > max(%d), clipping!",
+ WARN(1, "hw perf events fixed %d > max(%d), clipping!\n",
x86_pmu.num_counters_fixed, X86_PMC_MAX_FIXED);
x86_pmu.num_counters_fixed = X86_PMC_MAX_FIXED;
}
diff --git a/arch/x86/kernel/pci-calgary_64.c b/arch/x86/kernel/pci-calgary_64.c
index f56a117..f179747 100644
--- a/arch/x86/kernel/pci-calgary_64.c
+++ b/arch/x86/kernel/pci-calgary_64.c
@@ -296,8 +296,8 @@ static void iommu_free(struct iommu_table *tbl, dma_addr_t dma_addr,
/* were we called with bad_dma_address? */
badend = DMA_ERROR_CODE + (EMERGENCY_PAGES * PAGE_SIZE);
if (unlikely((dma_addr >= DMA_ERROR_CODE) && (dma_addr < badend))) {
- WARN(1, KERN_ERR "Calgary: driver tried unmapping bad DMA "
- "address 0x%Lx\n", dma_addr);
+ WARN(1, "Calgary: driver tried unmapping bad DMA address 0x%llx\n",
+ dma_addr);
return;
}

diff --git a/arch/x86/kernel/tsc_sync.c b/arch/x86/kernel/tsc_sync.c
index 0aa5fed8..cf11d51 100644
--- a/arch/x86/kernel/tsc_sync.c
+++ b/arch/x86/kernel/tsc_sync.c
@@ -94,8 +94,8 @@ static __cpuinit void check_tsc_warp(void)
}
}
WARN(!(now-start),
- "Warning: zero tsc calibration delta: %Ld [max: %Ld]\n",
- now-start, end-start);
+ "Warning: zero tsc calibration delta: %lld [max: %lld]\n",
+ now-start, end-start);
}

/*
diff --git a/arch/x86/kernel/xsave.c b/arch/x86/kernel/xsave.c
index 9c253bd..b499aa8 100644
--- a/arch/x86/kernel/xsave.c
+++ b/arch/x86/kernel/xsave.c
@@ -418,7 +418,7 @@ static void __init xstate_enable_boot_cpu(void)
unsigned int eax, ebx, ecx, edx;

if (boot_cpu_data.cpuid_level < XSTATE_CPUID) {
- WARN(1, KERN_ERR "XSTATE_CPUID missing\n");
+ WARN(1, "XSTATE_CPUID missing\n");
return;
}

diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c
index 0369843..841ae72 100644
--- a/arch/x86/mm/ioremap.c
+++ b/arch/x86/mm/ioremap.c
@@ -476,9 +476,8 @@ static int __init check_early_ioremap_leak(void)

if (!count)
return 0;
- WARN(1, KERN_WARNING
- "Debug warning: early ioremap leak of %d areas detected.\n",
- count);
+ WARN(1, "Debug warning: early ioremap leak of %d areas detected\n",
+ count);
printk(KERN_WARNING
"please boot with early_ioremap_debug and report the dmesg.\n");

diff --git a/arch/x86/mm/pageattr-test.c b/arch/x86/mm/pageattr-test.c
index e1d1069..15d3536 100644
--- a/arch/x86/mm/pageattr-test.c
+++ b/arch/x86/mm/pageattr-test.c
@@ -224,7 +224,7 @@ static int pageattr_test(void)
failed += print_split(&sc);

if (failed) {
- WARN(1, KERN_ERR "NOT PASSED. Please report.\n");
+ WARN(1, "NOT PASSED. Please report.\n");
return -EINVAL;
} else {
if (print)
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c
index 8b830ca..142a922 100644
--- a/arch/x86/mm/pageattr.c
+++ b/arch/x86/mm/pageattr.c
@@ -626,9 +626,8 @@ static int __cpa_process_fault(struct cpa_data *cpa, unsigned long vaddr,
cpa->pfn = __pa(vaddr) >> PAGE_SHIFT;
return 0;
} else {
- WARN(1, KERN_WARNING "CPA: called for zero pte. "
- "vaddr = %lx cpa->vaddr = %lx\n", vaddr,
- *cpa->vaddr);
+ WARN(1, "CPA: called for zero pte. vaddr = %lx cpa->vaddr = %lx\n",
+ vaddr, *cpa->vaddr);

return -EFAULT;
}
diff --git a/arch/x86/platform/sfi/sfi.c b/arch/x86/platform/sfi/sfi.c
index dd4c281..f66fabc 100644
--- a/arch/x86/platform/sfi/sfi.c
+++ b/arch/x86/platform/sfi/sfi.c
@@ -97,8 +97,8 @@ static int __init sfi_parse_ioapic(struct sfi_table_header *table)
pentry++;
}

- WARN(pic_mode, KERN_WARNING
- "SFI: pic_mod shouldn't be 1 when IOAPIC table is present\n");
+ WARN(pic_mode,
+ "SFI: pic_mod shouldn't be 1 when IOAPIC table is present\n");
pic_mode = 0;
return 0;
}
--
1.7.3.2.245.g03276.dirty

2010-12-06 22:10:39

by Joe Perches

[permalink] [raw]
Subject: [PATCH 08/29] drivers/block: Update WARN uses

Format neatening.

Signed-off-by: Joe Perches <[email protected]>
---
drivers/block/floppy.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
index 3951020..311454f 100644
--- a/drivers/block/floppy.c
+++ b/drivers/block/floppy.c
@@ -3856,7 +3856,7 @@ static int floppy_revalidate(struct gendisk *disk)
test_bit(FD_VERIFY_BIT, &UDRS->flags) ||
test_bit(drive, &fake_change) || NO_GEOM) {
if (WARN(atomic_read(&usage_count) == 0,
- "VFS: revalidate called on non-open device.\n"))
+ "VFS: revalidate called on non-open device\n"))
return -EFAULT;

lock_fdc(drive, false);
--
1.7.3.2.245.g03276.dirty

2010-12-06 22:10:41

by Joe Perches

[permalink] [raw]
Subject: [PATCH 06/29] drivers/acpi: Update WARN uses

Add missing newlines.

Signed-off-by: Joe Perches <[email protected]>
---
drivers/acpi/ec.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 372ff80..d41d68e 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -818,9 +818,9 @@ static int acpi_ec_add(struct acpi_device *device)
device->driver_data = ec;

WARN(!request_region(ec->data_addr, 1, "EC data"),
- "Could not request EC data io port 0x%lx", ec->data_addr);
+ "Could not request EC data io port 0x%lx\n", ec->data_addr);
WARN(!request_region(ec->command_addr, 1, "EC cmd"),
- "Could not request EC cmd io port 0x%lx", ec->command_addr);
+ "Could not request EC cmd io port 0x%lx\n", ec->command_addr);

pr_info(PREFIX "GPE = 0x%lx, I/O: command/status = 0x%lx, data = 0x%lx\n",
ec->gpe, ec->command_addr, ec->data_addr);
--
1.7.3.2.245.g03276.dirty

2010-12-06 22:11:20

by Joe Perches

[permalink] [raw]
Subject: [PATCH 03/29] arch/arm: Update WARN uses

Coalesce long formats.
Align arguments.
Add missing newlines.

Signed-off-by: Joe Perches <[email protected]>
---
arch/arm/mach-davinci/clock.c | 4 +-
arch/arm/mach-davinci/da830.c | 2 +-
arch/arm/mach-davinci/da850.c | 12 ++++-----
arch/arm/mach-omap2/clkt_clksel.c | 12 ++++----
arch/arm/mach-omap2/clock.c | 16 ++++++------
arch/arm/mach-omap2/devices.c | 4 +-
arch/arm/mach-omap2/omap_hwmod.c | 47 ++++++++++++++++++++++---------------
arch/arm/mach-omap2/pm34xx.c | 7 ++---
arch/arm/mach-omap2/serial.c | 2 +-
arch/arm/mach-omap2/timer-gp.c | 3 +-
arch/arm/mach-tegra/clock.c | 3 +-
arch/arm/mach-tegra/timer.c | 2 +-
arch/arm/mach-u300/padmux.c | 14 +++--------
arch/arm/plat-omap/omap-pm-noop.c | 10 ++++----
14 files changed, 69 insertions(+), 69 deletions(-)

diff --git a/arch/arm/mach-davinci/clock.c b/arch/arm/mach-davinci/clock.c
index e4e3af1..dc479fe 100644
--- a/arch/arm/mach-davinci/clock.c
+++ b/arch/arm/mach-davinci/clock.c
@@ -177,8 +177,8 @@ int clk_register(struct clk *clk)
return -EINVAL;

if (WARN(clk->parent && !clk->parent->rate,
- "CLK: %s parent %s has no rate!\n",
- clk->name, clk->parent->name))
+ "CLK: %s parent %s has no rate!\n",
+ clk->name, clk->parent->name))
return -EINVAL;

INIT_LIST_HEAD(&clk->children);
diff --git a/arch/arm/mach-davinci/da830.c b/arch/arm/mach-davinci/da830.c
index ec23ab4..1ae9ea9 100644
--- a/arch/arm/mach-davinci/da830.c
+++ b/arch/arm/mach-davinci/da830.c
@@ -1208,5 +1208,5 @@ void __init da830_init(void)
davinci_common_init(&davinci_soc_info_da830);

da8xx_syscfg0_base = ioremap(DA8XX_SYSCFG0_BASE, SZ_4K);
- WARN(!da8xx_syscfg0_base, "Unable to map syscfg0 module");
+ WARN(!da8xx_syscfg0_base, "Unable to map syscfg0 module\n");
}
diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c
index 63916b9..b83a273 100644
--- a/arch/arm/mach-davinci/da850.c
+++ b/arch/arm/mach-davinci/da850.c
@@ -811,8 +811,8 @@ static void da850_set_async3_src(int pllnum)
clk = c->clk;
if (clk->flags & DA850_CLK_ASYNC3) {
ret = clk_set_parent(clk, newparent);
- WARN(ret, "DA850: unable to re-parent clock %s",
- clk->name);
+ WARN(ret, "DA850: unable to re-parent clock %s\n",
+ clk->name);
}
}

@@ -903,10 +903,8 @@ static int da850_set_voltage(unsigned int index)
static int da850_regulator_init(void)
{
cvdd = regulator_get(NULL, "cvdd");
- if (WARN(IS_ERR(cvdd), "Unable to obtain voltage regulator for CVDD;"
- " voltage scaling unsupported\n")) {
+ if (WARN(IS_ERR(cvdd), "Unable to obtain voltage regulator for CVDD; voltage scaling unsupported\n"))
return PTR_ERR(cvdd);
- }

return 0;
}
@@ -1079,11 +1077,11 @@ void __init da850_init(void)
davinci_common_init(&davinci_soc_info_da850);

da8xx_syscfg0_base = ioremap(DA8XX_SYSCFG0_BASE, SZ_4K);
- if (WARN(!da8xx_syscfg0_base, "Unable to map syscfg0 module"))
+ if (WARN(!da8xx_syscfg0_base, "Unable to map syscfg0 module\n"))
return;

da8xx_syscfg1_base = ioremap(DA8XX_SYSCFG1_BASE, SZ_4K);
- if (WARN(!da8xx_syscfg1_base, "Unable to map syscfg1 module"))
+ if (WARN(!da8xx_syscfg1_base, "Unable to map syscfg1 module\n"))
return;

/*
diff --git a/arch/arm/mach-omap2/clkt_clksel.c b/arch/arm/mach-omap2/clkt_clksel.c
index a781cd6..f0f7c0b 100644
--- a/arch/arm/mach-omap2/clkt_clksel.c
+++ b/arch/arm/mach-omap2/clkt_clksel.c
@@ -70,8 +70,8 @@ static const struct clksel *_get_clksel_by_parent(struct clk *clk,

if (!clks->parent) {
/* This indicates a data problem */
- WARN(1, "clock: Could not find parent clock %s in clksel array "
- "of clock %s\n", src_clk->name, clk->name);
+ WARN(1, "clock: Could not find parent clock %s in clksel array of clock %s\n",
+ src_clk->name, clk->name);
return NULL;
}

@@ -125,8 +125,8 @@ static u8 _get_div_and_fieldval(struct clk *src_clk, struct clk *clk,

if (max_div == 0) {
/* This indicates an error in the clksel data */
- WARN(1, "clock: Could not find divisor for clock %s parent %s"
- "\n", clk->name, src_clk->parent->name);
+ WARN(1, "clock: Could not find divisor for clock %s parent %s\n",
+ clk->name, src_clk->parent->name);
return 0;
}

@@ -190,8 +190,8 @@ static u32 _clksel_to_divisor(struct clk *clk, u32 field_val)

if (!clkr->div) {
/* This indicates a data error */
- WARN(1, "clock: Could not find fieldval %d for clock %s parent "
- "%s\n", field_val, clk->name, clk->parent->name);
+ WARN(1, "clock: Could not find fieldval %d for clock %s parent %s\n",
+ field_val, clk->name, clk->parent->name);
return 0;
}

diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c
index b5babf5..0336813 100644
--- a/arch/arm/mach-omap2/clock.c
+++ b/arch/arm/mach-omap2/clock.c
@@ -249,8 +249,8 @@ const struct clkops clkops_omap2_dflt = {
void omap2_clk_disable(struct clk *clk)
{
if (clk->usecount == 0) {
- WARN(1, "clock: %s: omap2_clk_disable() called, but usecount "
- "already 0?", clk->name);
+ WARN(1, "clock: %s: omap2_clk_disable() called, but usecount already 0?\n",
+ clk->name);
return;
}

@@ -308,8 +308,8 @@ int omap2_clk_enable(struct clk *clk)
if (clk->clkdm) {
ret = omap2_clkdm_clk_enable(clk->clkdm, clk);
if (ret) {
- WARN(1, "clock: %s: could not enable clockdomain %s: "
- "%d\n", clk->name, clk->clkdm->name, ret);
+ WARN(1, "clock: %s: could not enable clockdomain %s: %d\n",
+ clk->name, clk->clkdm->name, ret);
goto oce_err2;
}
}
@@ -431,7 +431,7 @@ int __init omap2_clk_switch_mpurate_at_boot(const char *mpurate_ck_name)
return -EINVAL;

mpurate_ck = clk_get(NULL, mpurate_ck_name);
- if (WARN(IS_ERR(mpurate_ck), "Failed to get %s.\n", mpurate_ck_name))
+ if (WARN(IS_ERR(mpurate_ck), "Failed to get %s\n", mpurate_ck_name))
return -ENOENT;

r = clk_set_rate(mpurate_ck, mpurate);
@@ -469,15 +469,15 @@ void __init omap2_clk_print_new_rates(const char *hfclkin_ck_name,
unsigned long hfclkin_rate;

mpu_ck = clk_get(NULL, mpu_ck_name);
- if (WARN(IS_ERR(mpu_ck), "clock: failed to get %s.\n", mpu_ck_name))
+ if (WARN(IS_ERR(mpu_ck), "clock: failed to get %s\n", mpu_ck_name))
return;

core_ck = clk_get(NULL, core_ck_name);
- if (WARN(IS_ERR(core_ck), "clock: failed to get %s.\n", core_ck_name))
+ if (WARN(IS_ERR(core_ck), "clock: failed to get %s\n", core_ck_name))
return;

hfclkin_ck = clk_get(NULL, hfclkin_ck_name);
- if (WARN(IS_ERR(hfclkin_ck), "Failed to get %s.\n", hfclkin_ck_name))
+ if (WARN(IS_ERR(hfclkin_ck), "Failed to get %s\n", hfclkin_ck_name))
return;

hfclkin_rate = clk_get_rate(hfclkin_ck);
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 5a0c148..b6ab066 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -1062,8 +1062,8 @@ static int __init omap_init_wdt(void)
od = omap_device_build(dev_name, id, oh, NULL, 0,
omap_wdt_latency,
ARRAY_SIZE(omap_wdt_latency), 0);
- WARN(IS_ERR(od), "Cant build omap_device for %s:%s.\n",
- dev_name, oh->name);
+ WARN(IS_ERR(od), "Cant build omap_device for %s:%s\n",
+ dev_name, oh->name);
return 0;
}
subsys_initcall(omap_init_wdt);
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 5a30658..a8ef5c1 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -178,7 +178,8 @@ static u8 inited;
static int _update_sysc_cache(struct omap_hwmod *oh)
{
if (!oh->class->sysc) {
- WARN(1, "omap_hwmod: %s: cannot read OCP_SYSCONFIG: not defined on hwmod's class\n", oh->name);
+ WARN(1, "omap_hwmod: %s: cannot read OCP_SYSCONFIG: not defined on hwmod's class\n",
+ oh->name);
return -EINVAL;
}

@@ -203,7 +204,8 @@ static int _update_sysc_cache(struct omap_hwmod *oh)
static void _write_sysconfig(u32 v, struct omap_hwmod *oh)
{
if (!oh->class->sysc) {
- WARN(1, "omap_hwmod: %s: cannot write OCP_SYSCONFIG: not defined on hwmod's class\n", oh->name);
+ WARN(1, "omap_hwmod: %s: cannot write OCP_SYSCONFIG: not defined on hwmod's class\n",
+ oh->name);
return;
}

@@ -236,7 +238,8 @@ static int _set_master_standbymode(struct omap_hwmod *oh, u8 standbymode,
return -EINVAL;

if (!oh->class->sysc->sysc_fields) {
- WARN(1, "omap_hwmod: %s: offset struct for sysconfig not provided in class\n", oh->name);
+ WARN(1, "omap_hwmod: %s: offset struct for sysconfig not provided in class\n",
+ oh->name);
return -EINVAL;
}

@@ -269,7 +272,8 @@ static int _set_slave_idlemode(struct omap_hwmod *oh, u8 idlemode, u32 *v)
return -EINVAL;

if (!oh->class->sysc->sysc_fields) {
- WARN(1, "omap_hwmod: %s: offset struct for sysconfig not provided in class\n", oh->name);
+ WARN(1, "omap_hwmod: %s: offset struct for sysconfig not provided in class\n",
+ oh->name);
return -EINVAL;
}

@@ -303,7 +307,8 @@ static int _set_clockactivity(struct omap_hwmod *oh, u8 clockact, u32 *v)
return -EINVAL;

if (!oh->class->sysc->sysc_fields) {
- WARN(1, "omap_hwmod: %s: offset struct for sysconfig not provided in class\n", oh->name);
+ WARN(1, "omap_hwmod: %s: offset struct for sysconfig not provided in class\n",
+ oh->name);
return -EINVAL;
}

@@ -333,7 +338,8 @@ static int _set_softreset(struct omap_hwmod *oh, u32 *v)
return -EINVAL;

if (!oh->class->sysc->sysc_fields) {
- WARN(1, "omap_hwmod: %s: offset struct for sysconfig not provided in class\n", oh->name);
+ WARN(1, "omap_hwmod: %s: offset struct for sysconfig not provided in class\n",
+ oh->name);
return -EINVAL;
}

@@ -368,7 +374,8 @@ static int _set_module_autoidle(struct omap_hwmod *oh, u8 autoidle,
return -EINVAL;

if (!oh->class->sysc->sysc_fields) {
- WARN(1, "omap_hwmod: %s: offset struct for sysconfig not provided in class\n", oh->name);
+ WARN(1, "omap_hwmod: %s: offset struct for sysconfig not provided in class\n",
+ oh->name);
return -EINVAL;
}

@@ -397,7 +404,8 @@ static int _enable_wakeup(struct omap_hwmod *oh)
return -EINVAL;

if (!oh->class->sysc->sysc_fields) {
- WARN(1, "omap_hwmod: %s: offset struct for sysconfig not provided in class\n", oh->name);
+ WARN(1, "omap_hwmod: %s: offset struct for sysconfig not provided in class\n",
+ oh->name);
return -EINVAL;
}

@@ -430,7 +438,8 @@ static int _disable_wakeup(struct omap_hwmod *oh)
return -EINVAL;

if (!oh->class->sysc->sysc_fields) {
- WARN(1, "omap_hwmod: %s: offset struct for sysconfig not provided in class\n", oh->name);
+ WARN(1, "omap_hwmod: %s: offset struct for sysconfig not provided in class\n",
+ oh->name);
return -EINVAL;
}

@@ -1181,8 +1190,8 @@ int _omap_hwmod_enable(struct omap_hwmod *oh)
if (oh->_state != _HWMOD_STATE_INITIALIZED &&
oh->_state != _HWMOD_STATE_IDLE &&
oh->_state != _HWMOD_STATE_DISABLED) {
- WARN(1, "omap_hwmod: %s: enabled state can only be entered "
- "from initialized, idle, or disabled state\n", oh->name);
+ WARN(1, "omap_hwmod: %s: enabled state can only be entered from initialized, idle, or disabled state\n",
+ oh->name);
return -EINVAL;
}

@@ -1233,8 +1242,8 @@ int _omap_hwmod_enable(struct omap_hwmod *oh)
int _omap_hwmod_idle(struct omap_hwmod *oh)
{
if (oh->_state != _HWMOD_STATE_ENABLED) {
- WARN(1, "omap_hwmod: %s: idle state can only be entered from "
- "enabled state\n", oh->name);
+ WARN(1, "omap_hwmod: %s: idle state can only be entered from enabled state\n",
+ oh->name);
return -EINVAL;
}

@@ -1263,8 +1272,8 @@ static int _shutdown(struct omap_hwmod *oh)
{
if (oh->_state != _HWMOD_STATE_IDLE &&
oh->_state != _HWMOD_STATE_ENABLED) {
- WARN(1, "omap_hwmod: %s: disabled state can only be entered "
- "from idle, or enabled state\n", oh->name);
+ WARN(1, "omap_hwmod: %s: disabled state can only be entered from idle, or enabled state\n",
+ oh->name);
return -EINVAL;
}

@@ -1559,8 +1568,8 @@ int omap_hwmod_init(struct omap_hwmod **ohs)
while (oh) {
if (omap_chip_is(oh->omap_chip)) {
r = omap_hwmod_register(oh);
- WARN(r, "omap_hwmod: %s: omap_hwmod_register returned "
- "%d\n", oh->name, r);
+ WARN(r, "omap_hwmod: %s: omap_hwmod_register returned %d\n",
+ oh->name, r);
}
oh = *++ohs;
}
@@ -1729,8 +1738,8 @@ void omap_hwmod_ocp_barrier(struct omap_hwmod *oh)
BUG_ON(!oh);

if (!oh->class->sysc || !oh->class->sysc->sysc_flags) {
- WARN(1, "omap_device: %s: OCP barrier impossible due to "
- "device configuration\n", oh->name);
+ WARN(1, "omap_device: %s: OCP barrier impossible due to device configuration\n",
+ oh->name);
return;
}

diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index ab0d57b..cc26651 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -283,12 +283,11 @@ static irqreturn_t prcm_interrupt_handler (int irq, void *dev_id)
* Is the MPU PRCM interrupt handler racing with the
* IVA2 PRCM interrupt handler ?
*/
- WARN(c == 0, "prcm: WARNING: PRCM indicated MPU wakeup "
- "but no wakeup sources are marked\n");
+ WARN(c == 0, "prcm: WARNING: PRCM indicated MPU wakeup but no wakeup sources are marked\n");
} else {
/* XXX we need to expand our PRCM interrupt handler */
- WARN(1, "prcm: WARNING: PRCM interrupt received, but "
- "no code to handle it (%08x)\n", irqstatus_mpu);
+ WARN(1, "prcm: WARNING: PRCM interrupt received, but no code to handle it (%08x)\n",
+ irqstatus_mpu);
}

prm_write_mod_reg(irqstatus_mpu, OCP_MOD,
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index 2282822..19a109d 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -800,7 +800,7 @@ void __init omap_serial_init_port(int port)
od = omap_device_build(name, uart->num, oh, pdata, pdata_size,
omap_uart_latency,
ARRAY_SIZE(omap_uart_latency), false);
- WARN(IS_ERR(od), "Could not build omap_device for %s: %s.\n",
+ WARN(IS_ERR(od), "Could not build omap_device for %s: %s\n",
name, oh->name);

uart->irq = oh->mpu_irqs[0].irq;
diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c
index f9052e1..24850bc 100644
--- a/arch/arm/mach-omap2/timer-gp.c
+++ b/arch/arm/mach-omap2/timer-gp.c
@@ -141,8 +141,7 @@ static void __init omap2_gp_clockevent_init(void)
src = OMAP_TIMER_SRC_32_KHZ;
#else
src = OMAP_TIMER_SRC_SYS_CLK;
- WARN(gptimer_id == 12, "WARNING: GPTIMER12 can only use the "
- "secure 32KiHz clock source\n");
+ WARN(gptimer_id == 12, "WARNING: GPTIMER12 can only use the secure 32KiHz clock source\n");
#endif

if (gptimer_id != 12)
diff --git a/arch/arm/mach-tegra/clock.c b/arch/arm/mach-tegra/clock.c
index 77948e0..6d42369 100644
--- a/arch/arm/mach-tegra/clock.c
+++ b/arch/arm/mach-tegra/clock.c
@@ -249,7 +249,8 @@ void clk_disable_locked(struct clk *c)
{
pr_debug("%s: %s\n", __func__, c->name);
if (c->refcnt == 0) {
- WARN(1, "Attempting to disable clock %s with refcnt 0", c->name);
+ WARN(1, "Attempting to disable clock %s with refcnt 0\n",
+ c->name);
return;
}
if (c->refcnt == 1) {
diff --git a/arch/arm/mach-tegra/timer.c b/arch/arm/mach-tegra/timer.c
index b49f2f5..637171d 100644
--- a/arch/arm/mach-tegra/timer.c
+++ b/arch/arm/mach-tegra/timer.c
@@ -154,7 +154,7 @@ static void __init tegra_init_timer(void)
timer_writel(0x0019, TIMERUS_USEC_CFG);
break;
default:
- WARN(1, "Unknown clock rate");
+ WARN(1, "Unknown clock rate\n");
}

if (clocksource_register_hz(&tegra_clocksource, 1000000)) {
diff --git a/arch/arm/mach-u300/padmux.c b/arch/arm/mach-u300/padmux.c
index 4c93c6c..b51b889 100644
--- a/arch/arm/mach-u300/padmux.c
+++ b/arch/arm/mach-u300/padmux.c
@@ -120,8 +120,7 @@ struct pmx *pmx_get(struct device *dev, enum pmx_settings setting)
if (setting == pmx_settings[i]->setting) {

if (pmx_settings[i]->dev != NULL) {
- WARN(1, "padmux: required setting "
- "in use by another consumer\n");
+ WARN(1, "padmux: required setting in use by another consumer\n");
} else {
pmx = pmx_settings[i];
pmx->dev = dev;
@@ -152,8 +151,7 @@ int pmx_put(struct device *dev, struct pmx *pmx)
if (pmx->setting == pmx_settings[i]->setting) {

if (dev != pmx->dev) {
- WARN(1, "padmux: cannot release handle as "
- "it is bound to another consumer\n");
+ WARN(1, "padmux: cannot release handle as it is bound to another consumer\n");
ret = -EINVAL;
break;
} else {
@@ -190,9 +188,7 @@ int pmx_activate(struct device *dev, struct pmx *pmx)
if (pmx_settings[i]->onmask[j].mask & pmx->
onmask[j].mask) {
/* More than one entry on the same bits */
- WARN(1, "padmux: cannot activate "
- "setting. Bit conflict with "
- "an active setting\n");
+ WARN(1, "padmux: cannot activate setting. Bit conflict with an active setting\n");

ret = -EUSERS;
goto exit;
@@ -227,9 +223,7 @@ int pmx_deactivate(struct device *dev, struct pmx *pmx)
if (pmx->setting == pmx_settings[i]->setting) {

if (dev != pmx->dev) {
- WARN(1, "padmux: cannot deactivate "
- "pmx setting as it was activated "
- "by another consumer\n");
+ WARN(1, "padmux: cannot deactivate pmx setting as it was activated by another consumer\n");

ret = -EBUSY;
continue;
diff --git a/arch/arm/plat-omap/omap-pm-noop.c b/arch/arm/plat-omap/omap-pm-noop.c
index e129ce8..94e82b5 100644
--- a/arch/arm/plat-omap/omap-pm-noop.c
+++ b/arch/arm/plat-omap/omap-pm-noop.c
@@ -37,7 +37,7 @@ struct omap_opp *l3_opps;
int omap_pm_set_max_mpu_wakeup_lat(struct device *dev, long t)
{
if (!dev || t < -1) {
- WARN(1, "OMAP PM: %s: invalid parameter(s)", __func__);
+ WARN(1, "OMAP PM: %s: invalid parameter(s)\n", __func__);
return -EINVAL;
};

@@ -66,7 +66,7 @@ int omap_pm_set_min_bus_tput(struct device *dev, u8 agent_id, unsigned long r)
{
if (!dev || (agent_id != OCP_INITIATOR_AGENT &&
agent_id != OCP_TARGET_AGENT)) {
- WARN(1, "OMAP PM: %s: invalid parameter(s)", __func__);
+ WARN(1, "OMAP PM: %s: invalid parameter(s)\n", __func__);
return -EINVAL;
};

@@ -93,7 +93,7 @@ int omap_pm_set_max_dev_wakeup_lat(struct device *req_dev, struct device *dev,
long t)
{
if (!req_dev || !dev || t < -1) {
- WARN(1, "OMAP PM: %s: invalid parameter(s)", __func__);
+ WARN(1, "OMAP PM: %s: invalid parameter(s)\n", __func__);
return -EINVAL;
};

@@ -123,7 +123,7 @@ int omap_pm_set_max_dev_wakeup_lat(struct device *req_dev, struct device *dev,
int omap_pm_set_max_sdma_lat(struct device *dev, long t)
{
if (!dev || t < -1) {
- WARN(1, "OMAP PM: %s: invalid parameter(s)", __func__);
+ WARN(1, "OMAP PM: %s: invalid parameter(s)\n", __func__);
return -EINVAL;
};

@@ -152,7 +152,7 @@ int omap_pm_set_max_sdma_lat(struct device *dev, long t)
int omap_pm_set_min_clk_rate(struct device *dev, struct clk *c, long r)
{
if (!dev || !c || r < 0) {
- WARN(1, "OMAP PM: %s: invalid parameter(s)", __func__);
+ WARN(1, "OMAP PM: %s: invalid parameter(s)\n", __func__);
return -EINVAL;
}

--
1.7.3.2.245.g03276.dirty

2010-12-07 11:43:50

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH 29/29] drivers/regulator: Update WARN uses

On Mon, Dec 06, 2010 at 02:05:19PM -0800, Joe Perches wrote:
> Align arguments.
>
> Signed-off-by: Joe Perches <[email protected]>

Acked-by: Mark Brown <[email protected]>

but please do remember to send patches to maintainers - trying to merge
patches without going through the maintainers means that people working
on the actual tree concerned may either replicate your work or introduce
conflicts with your patches, neither of which is good.

Not cutting the patch for Liam's benefit:

> ---
> drivers/regulator/core.c | 3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
> index a1b1237..5d07e5d 100644
> --- a/drivers/regulator/core.c
> +++ b/drivers/regulator/core.c
> @@ -1379,8 +1379,7 @@ static int _regulator_disable(struct regulator_dev *rdev,
> *supply_rdev_ptr = NULL;
>
> if (WARN(rdev->use_count <= 0,
> - "unbalanced disables for %s\n",
> - rdev_get_name(rdev)))
> + "unbalanced disables for %s\n", rdev_get_name(rdev)))
> return -EIO;
>
> /* are we the last user and permitted to disable ? */
> --
> 1.7.3.2.245.g03276.dirty
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>

--
"You grabbed my hand and we fell into it, like a daydream - or a fever."

2010-12-07 14:50:44

by Jiri Kosina

[permalink] [raw]
Subject: Re: [PATCH 29/29] drivers/regulator: Update WARN uses

On Tue, 7 Dec 2010, Mark Brown wrote:

> On Mon, Dec 06, 2010 at 02:05:19PM -0800, Joe Perches wrote:
> > Align arguments.
> >
> > Signed-off-by: Joe Perches <[email protected]>
>
> Acked-by: Mark Brown <[email protected]>
>
> but please do remember to send patches to maintainers - trying to merge
> patches without going through the maintainers means that people working
> on the actual tree concerned may either replicate your work or introduce
> conflicts with your patches, neither of which is good.

That happened here:

https://lkml.org/lkml/2010/11/1/107

but the patch is not in linux-next after more than one month. Which is why
Joe is resending it for inclusion through my queue.

--
Jiri Kosina
SUSE Labs, Novell Inc.

2010-12-07 15:16:17

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH 29/29] drivers/regulator: Update WARN uses

On Tue, Dec 07, 2010 at 03:50:32PM +0100, Jiri Kosina wrote:
> On Tue, 7 Dec 2010, Mark Brown wrote:

> > On Mon, Dec 06, 2010 at 02:05:19PM -0800, Joe Perches wrote:
> > > Align arguments.

> > > Signed-off-by: Joe Perches <[email protected]>

> > Acked-by: Mark Brown <[email protected]>

> > but please do remember to send patches to maintainers - trying to merge
> > patches without going through the maintainers means that people working
> > on the actual tree concerned may either replicate your work or introduce
> > conflicts with your patches, neither of which is good.

> That happened here:

> https://lkml.org/lkml/2010/11/1/107

> but the patch is not in linux-next after more than one month. Which is why
> Joe is resending it for inclusion through my queue.

That's not a reason to drop people from the CCs when reposting, and when
reposting it's always good to include any reviews you got previously.
Indeed, looking at the original posting you'll see he sent it directly
to you first time around as well as CCing the maintainers.

2010-12-07 15:31:14

by Jiri Kosina

[permalink] [raw]
Subject: Re: [PATCH 29/29] drivers/regulator: Update WARN uses

On Tue, 7 Dec 2010, Mark Brown wrote:

> > > > Align arguments.
>
> > > > Signed-off-by: Joe Perches <[email protected]>
>
> > > Acked-by: Mark Brown <[email protected]>
>
> > > but please do remember to send patches to maintainers - trying to merge
> > > patches without going through the maintainers means that people working
> > > on the actual tree concerned may either replicate your work or introduce
> > > conflicts with your patches, neither of which is good.
>
> > That happened here:
>
> > https://lkml.org/lkml/2010/11/1/107
>
> > but the patch is not in linux-next after more than one month. Which is why
> > Joe is resending it for inclusion through my queue.
>
> That's not a reason to drop people from the CCs when reposting, and when
> reposting it's always good to include any reviews you got previously.

Yes, collecting of the previously collected Acked-by: would definitely be
good. Joe, could you please include it next time?

> Indeed, looking at the original posting you'll see he sent it directly
> to you first time around as well as CCing the maintainers.

Yes, but I am not merging these large series which span gazillion of
subsystems at first. I only tend to act as a fallback for those parts of
the series which were not merged by maintainers.

--
Jiri Kosina
SUSE Labs, Novell Inc.

2010-12-07 15:44:16

by Liam Girdwood

[permalink] [raw]
Subject: Re: [PATCH 29/29] drivers/regulator: Update WARN uses

On Tue, 2010-12-07 at 16:31 +0100, Jiri Kosina wrote:
> On Tue, 7 Dec 2010, Mark Brown wrote:
>
> > > > > Align arguments.
> >
> > > > > Signed-off-by: Joe Perches <[email protected]>
> >
> > > > Acked-by: Mark Brown <[email protected]>
> >
> > > > but please do remember to send patches to maintainers - trying to merge
> > > > patches without going through the maintainers means that people working
> > > > on the actual tree concerned may either replicate your work or introduce
> > > > conflicts with your patches, neither of which is good.
> >
> > > That happened here:
> >
> > > https://lkml.org/lkml/2010/11/1/107
> >
> > > but the patch is not in linux-next after more than one month. Which is why
> > > Joe is resending it for inclusion through my queue.
> >
> > That's not a reason to drop people from the CCs when reposting, and when
> > reposting it's always good to include any reviews you got previously.
>
> Yes, collecting of the previously collected Acked-by: would definitely be
> good. Joe, could you please include it next time?
>
> > Indeed, looking at the original posting you'll see he sent it directly
> > to you first time around as well as CCing the maintainers.
>
> Yes, but I am not merging these large series which span gazillion of
> subsystems at first. I only tend to act as a fallback for those parts of
> the series which were not merged by maintainers.
>
Sorry, this is my fault. I've been very busy lately and this one slipped
through. I can take it now if you want ?

Thanks

Liam
--
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk

2010-12-09 09:10:39

by Liam Girdwood

[permalink] [raw]
Subject: Re: [PATCH 29/29] drivers/regulator: Update WARN uses

On Mon, 2010-12-06 at 14:05 -0800, Joe Perches wrote:
> Align arguments.
>
> Signed-off-by: Joe Perches <[email protected]>
> ---
> drivers/regulator/core.c | 3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
> index a1b1237..5d07e5d 100644
> --- a/drivers/regulator/core.c
> +++ b/drivers/regulator/core.c
> @@ -1379,8 +1379,7 @@ static int _regulator_disable(struct regulator_dev *rdev,
> *supply_rdev_ptr = NULL;
>
> if (WARN(rdev->use_count <= 0,
> - "unbalanced disables for %s\n",
> - rdev_get_name(rdev)))
> + "unbalanced disables for %s\n", rdev_get_name(rdev)))
> return -EIO;
>
> /* are we the last user and permitted to disable ? */

Applied.

Thanks

Liam
--
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk