Cleanup WARN #defines
Subsystems (59)
cover Cleanup WARN #defines
WARN uses sometimes use KERN_<level> but mostly don't have any prefix.
Change the WARN macros and the warn_slowpath function to preface KERN_WARNING and remove all the KERN_<level> uses from WARN sites.
Neatening clean up of include/asm-generic/bug.h
Update WARN macros
Add KERN_WARNING to WARN output
Remove any KERN_<level> from WARN uses
Coalesce formats
Align WARN arguments
Add some missing newlines to WARN uses
Add some missing first test argument (1, fmt, args) to WARN uses
Joe Perches (39):
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/firewire: Update WARN uses
drivers/firmware: Update WARN uses
drivers/gpio: Update WARN uses
drivers/gpu/drm: Update WARN uses
drivers/media/video: Update WARN uses
drivers/mfd: Update WARN uses
drivers/net/can: Update WARN uses
drivers/net/usb: Update WARN uses
drivers/net/wireless/iwlwifi: Update WARN uses
drivers/regulator: Update WARN uses
drivers/scsi/fcoe: Update WARN uses
drivers/staging: 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/core/dev.c: Update WARN uses
net/ipv4/tcp.c: Update WARN uses
net/mac80211: Update WARN uses
net/rfkill/input.c: Update WARN uses
sound/soc/codecs/wm_hubs.c: 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/firewire/core-transaction.c | 6 +- drivers/firmware/dmi_scan.c | 2 +- drivers/gpio/gpiolib.c | 4 +- drivers/gpio/it8761e_gpio.c | 2 +- drivers/gpu/drm/drm_crtc_helper.c | 2 +- drivers/gpu/drm/i915/i915_gem.c | 3 +- drivers/gpu/drm/radeon/evergreen.c | 2 +- drivers/gpu/drm/radeon/r100.c | 4 +- drivers/gpu/drm/radeon/r300.c | 2 +- drivers/gpu/drm/radeon/r600.c | 4 +- drivers/gpu/drm/radeon/radeon_fence.c | 3 +- drivers/gpu/drm/radeon/radeon_ttm.c | 3 +- drivers/gpu/drm/radeon/rs400.c | 2 +- drivers/gpu/drm/radeon/rs600.c | 4 +- drivers/media/video/s5p-fimc/fimc-core.c | 2 +- drivers/media/video/sr030pc30.c | 2 +- drivers/mfd/ezx-pcap.c | 5 +- drivers/net/can/mscan/mscan.c | 2 +- drivers/net/usb/ipheth.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/staging/memrar/memrar_allocator.c | 2 +- drivers/staging/solo6x10/solo6010-v4l2-enc.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/core/dev.c | 3 +- net/ipv4/tcp.c | 16 ++--- 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 +- sound/soc/codecs/wm_hubs.c | 2 +- 99 files changed, 319 insertions(+), 330 deletions(-)
Signature · 1 line
1.7.3.1.g432b3.dirty
PATCH 1/39 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
--- include/asm-generic/bug.h | 101 +++++++++++++++++++++++++++------------------ 1 files changed, 61 insertions(+), 40 deletions(-)
include/asm-generic/bug.h +61 -40
@@ -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)
Signature · 1 line
1.7.3.1.g432b3.dirty
PATCH 2/39 arch/alpha: Update WARN uses
In reply to Joe PerchesCoalesce long formats.
Align arguments.
--- arch/alpha/kernel/pci-sysfs.c | 14 ++++++-------- 1 files changed, 6 insertions(+), 8 deletions(-)
arch/alpha/kernel/pci-sysfs.c +6 -8
@@ -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 ; }
Signature · 1 line
1.7.3.1.g432b3.dirty
Matt Turner
maintainerRe: [PATCH 02/39] arch/alpha: Update WARN uses
Quoted 41 lines · Joe Perches
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(-)arch/alpha/kernel/pci-sysfs.c +6
-9@@ -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; } --
Quoted 1 line
1.7.3.1.g432b3.dirty
What's accomplished here? It looks like you joined two strings (which were separated as to not overflow the 80-char limit) and spaced a couple lines over.
I don't see how this makes anything clearer.
Matt
Re: [PATCH 02/39] arch/alpha: Update WARN uses
Quoted 27 lines · Matt Turner
Quoted 15 lines · Joe Perches
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(-)arch/alpha/kernel/pci-sysfs.c +3
-4@@ -44,10 +44,9 @@ static int __pci_mmap_fits(struct pci_dev *pdev, int num, -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);arch/alpha/kernel/pci-sysfs.c static int __legacy_mmap_fits(struct pci_controller *hose, · line 262
Quoted 7 lines
arch/alpha/kernel/pci-sysfs.c +3
-4@@ -261,10 +260,9 @@ static int __legacy_mmap_fits(struct pci_controller *hose, -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);What's accomplished here? It looks like you joined two strings (which were separated as to not overflow the 80-char limit) and spaced a couple lines over.
Quoted 1 line
I don't see how this makes anything clearer.
Hi Matt.
This one is just a whitespace cleanup.
Ignore it or nack it if you want.
The patch was generated mostly by script to standardize the WARN uses.
Long formats are generally preferred for grep. In this case, there's no particular value in the format coalescing because the output isn't going to be found with a grep.
There were other patches that are actual defect fixes.
cheers, Joe
Re: [PATCH 02/39] arch/alpha: Update WARN uses
Quoted 28 lines · Joe Perches
Quoted 27 lines · Matt Turner
Quoted 15 lines · Joe Perches
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(-)arch/alpha/kernel/pci-sysfs.c +3
-4@@ -44,10 +44,9 @@ static int __pci_mmap_fits(struct pci_dev *pdev, int num, -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);arch/alpha/kernel/pci-sysfs.c static int __legacy_mmap_fits(struct pci_controller *hose, · line 262
Quoted 7 lines
arch/alpha/kernel/pci-sysfs.c +3
-4@@ -261,10 +260,9 @@ static int __legacy_mmap_fits(struct pci_controller *hose, -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);What's accomplished here? It looks like you joined two strings (which were separated as to not overflow the 80-char limit) and spaced a couple lines over.
Quoted 4 lines
Quoted 1 line
I don't see how this makes anything clearer.
This one is just a whitespace cleanup.
Ignore it or nack it if you want.
I prefer the original indenting as it clearly stands the `1' on its own thus emphasising that the warning will be printed everytime the WARN() statement is executed. I surmise that the original programmer thought it important to emphasise this as it might not be considered the "normal" usage of WARN().
I agree that, in general, coalesced strings aid grepping but this broken string isn't one that will benefit.
I recall the story that when someone pointed out parallel fifths (an absolute no-no according to the rules of classical harmony) in a composition of Beethoven's to Beethoven himself, Beethoven was so indignant that he proceeded to compose a set of variations on a theme where in each variation he extensively violated one of the rules of classical harmony, and wrote down the bottom of each variation "You Ass" to the authority who had made the rule.
The moral here is that when a _competent_ programmer breaks the "style guide" they are most likely doing so for a very good reason. Thus, those who would submit whitespace fix patches should take time to ask themselves why the original programmer has laid out the code in such a fashion and learn from it, before submitting so-called "fixes".
Cheers
Michael.
Re: [PATCH 02/39] arch/alpha: Update WARN uses
Quoted 8 lines · Michael Cree
Quoted 7 lines · Joe Perches
Quoted 6 lines · Matt Turner
Quoted 2 lines · Joe Perches
Coalesce long formats.
Align arguments.What's accomplished here? It looks like you joined two strings (which were separated as to not overflow the 80-char limit) and spaced a couple lines over.
Quoted 7 lines
Quoted 2 lines
This one is just a whitespace cleanup.
Ignore it or nack it if you want.I prefer the original indenting as it clearly stands the `1' on its own thus emphasising that the warning will be printed everytime the
WARN()statement is executed. I surmise that the original programmer thought it important to emphasise this as it might not be considered the "normal" usage ofWARN().
Actually, WARN(1, foo) is by far the most common use of WARN. More than half of all uses.
$ grep -rP --include=*.[ch] -oh "\bWARN\s*\(" * | wc -l
286
$ grep -rP --include=*.[ch] -oh "\bWARN\s*\(\w+" * | \
sort | uniq -c | sort -rn | head -5
173 WARN(1
8 WARN(IS_ERR
4 WARN(ret
4 WARN(priv
4 WARN(localQuoted 5 lines
The moral here is that when a _competent_ programmer breaks the "style guide" they are most likely doing so for a very good reason. Thus, those who would submit whitespace fix patches should take time to ask themselves why the original programmer has laid out the code in such a fashion and learn from it, before submitting so-called "fixes".
Code is decidedly not music.
This stuff is mostly craft not art and consistency in craft has value.
You might also note I didn't call it a fix, I called it a whitespace cleanup.
And again, I don't much care if it's applied to arch/alpha or not. I haven't had an alpha since I gave away my AlphaStation a decade ago.
PATCH 3/39 arch/arm: Update WARN uses
In reply to Joe PerchesCoalesce long formats.
Align arguments.
Add missing newlines.
--- 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(-)
arch/arm/mach-davinci/clock.c +2 -2
@@ -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);
arch/arm/mach-davinci/da830.c +1 -1
@@ -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" ); }
arch/arm/mach-davinci/da850.c +5 -7
@@ -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 ;/*
arch/arm/mach-omap2/clkt_clksel.c +6 -6
@@ -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 ; }
arch/arm/mach-omap2/clock.c +8 -8
@@ -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);
arch/arm/mach-omap2/devices.c +2 -2
@@ -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);
arch/arm/mach-omap2/omap_hwmod.c +28 -19
131 lines not on this page · raw message
arch/arm/mach-omap2/pm34xx.c +3 -4
@@ -282,12 +282,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,
arch/arm/mach-omap2/serial.c +1 -1
@@ -796,7 +796,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;
arch/arm/mach-omap2/timer-gp.c +1 -2
@@ -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 )
arch/arm/mach-tegra/clock.c +2 -1
@@ -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 ) {
arch/arm/mach-tegra/timer.c +1 -1
@@ -155,7 +155,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 )) {
arch/arm/mach-u300/padmux.c +4 -10
@@ -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 ;
arch/arm/plat-omap/omap-pm-noop.c +5 -5
@@ -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 ; }
Signature · 1 line
1.7.3.1.g432b3.dirty
PATCH 4/39 arch/powerpc: Update WARN uses
In reply to Joe PerchesCoalesce long formats.
Align arguments.
Add missing newlines.
--- arch/powerpc/kernel/hw_breakpoint.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
arch/powerpc/kernel/hw_breakpoint.c +2 -2
@@ -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; }
Signature · 1 line
1.7.3.1.g432b3.dirty
Re: [PATCH 04/39] arch/powerpc: Update WARN uses
Quoted 14 lines · Joe Perches
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(-)arch/powerpc/kernel/hw_breakpoint.c +0
-0
arch/powerpc/kernel/hw_breakpoint.c int __kprobes hw_breakpoint_handler(struct die_args *args) · line 274
Quoted 7 lines
arch/powerpc/kernel/hw_breakpoint.c +2
-2@@ -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);
That appears to have done nothing other than turn a short line into one that is now > 80 columns. Is that the latest fad?
cheers
Re: [PATCH 04/39] arch/powerpc: Update WARN uses
Quoted 10 lines · Michael Ellerman
Quoted 9 lines · Joe Perches
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(-)
Quoted 15 lines
arch/powerpc/kernel/hw_breakpoint.c int __kprobes hw_breakpoint_handler(struct die_args *args) · line 274
Quoted 12 lines
arch/powerpc/kernel/hw_breakpoint.c +2
-2@@ -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);That appears to have done nothing other than turn a short line into one that is now > 80 columns.
Added '\n'.
The series was done for a few reasons:
o to add missing newlines at the end of messages as was done here
o to convert a couple of misuses of WARN(msg) to WARN(1, msg)
o to remove KERN_ prefixes from WARN(test, KERN_<level> msg)
Quoted 1 line
Is that the latest fad?
Pretty much. Format coalescing is generally preferred for grep. Some consider it churn.
cheers, Joe
Re: [PATCH 04/39] arch/powerpc: Update WARN uses
Quoted 27 lines · Joe Perches
Quoted 10 lines · Michael Ellerman
Quoted 9 lines · Joe Perches
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(-)Quoted 15 lines
arch/powerpc/kernel/hw_breakpoint.c int __kprobes hw_breakpoint_handler(struct die_args *args) · line 274
Quoted 12 lines
arch/powerpc/kernel/hw_breakpoint.c +2
-2@@ -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);That appears to have done nothing other than turn a short line into one that is now > 80 columns.
Quoted 1 line
Added '\n'.
Right.
Quoted 5 lines
The series was done for a few reasons:
o to add missing newlines at the end of messages as was done here
o to convert a couple of misuses of WARN(msg) toWARN(1, msg)
o to removeKERN_prefixes fromWARN(test, KERN_<level> msg)
All fair enough.
Quoted 3 lines
Quoted 1 line
Is that the latest fad?
Pretty much. Format coalescing is generally preferred for grep.
Really? Grep doesn't work anyway because you have format specifiers, and although you can try and guess them .. good luck, 0x%lx, or 0x%llx, or %#lx or ..
cheers
Re: [PATCH 04/39] arch/powerpc: Update WARN uses
Quoted 5 lines · Michael Ellerman
Quoted 1 line · Joe Perches
Pretty much. Format coalescing is generally preferred for grep.
Really? Grep doesn't work anyway because you have format specifiers, and although you can try and guess them .. good luck, 0x%lx, or 0x%llx, or %#lx or ..
grep "Breakpoint at .* will be disabled"
Re: [PATCH 04/39] arch/powerpc: Update WARN uses
Quoted 8 lines · Joe Perches
Quoted 5 lines · Michael Ellerman
Quoted 1 line · Joe Perches
Pretty much. Format coalescing is generally preferred for grep.
Really? Grep doesn't work anyway because you have format specifiers, and although you can try and guess them .. good luck, 0x%lx, or 0x%llx, or %#lx or ..
grep "Breakpoint at .* will be disabled"
Sure. For more mundane and repeated error strings the .* can be a pain in that it matches too much.
But whatever, I'll start writing my code with uncollapsed string formats, and wait for the torrent of make-it-80-columns patches :)
cheers
PATCH 5/39 arch/x86: Update WARN uses
In reply to Joe PerchesCoalesce long formats.
Align arguments.
Add missing newlines.
Remove KERN_<level>.
--- 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(-)
arch/x86/kernel/acpi/boot.c +1 -1
@@ -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 ;
arch/x86/kernel/apic/apic.c +1 -1
@@ -2079,7 +2079,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; }
arch/x86/kernel/apic/es7000_32.c +1 -1
@@ -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 ; }
arch/x86/kernel/cpu/perf_event.c +2 -2
@@ -1378,14 +1378,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 ; }
arch/x86/kernel/pci-calgary_64.c +2 -2
@@ -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 ; }
arch/x86/kernel/tsc_sync.c +2 -2
@@ -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); }/*
arch/x86/kernel/xsave.c +1 -1
@@ -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 ; }
arch/x86/mm/ioremap.c +2 -3
@@ -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" );
arch/x86/mm/pageattr-test.c +1 -1
@@ -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)
arch/x86/mm/pageattr.c +2 -3
@@ -615,9 +615,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 ; }
arch/x86/platform/sfi/sfi.c +2 -2
@@ -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 ; }
Signature · 1 line
1.7.3.1.g432b3.dirty
Re: [PATCH 05/39] arch/x86: Update WARN uses
Quoted 4 lines · Joe Perches
Coalesce long formats.
Align arguments.
Add missing newlines.
Remove KERN_<level>.
I don't have objections.
Rafael
Quoted 179 lines
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(-)arch/x86/kernel/acpi/boot.c +1
-1@@ -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 ;arch/x86/kernel/apic/apic.c +1
-1@@ -2079,7 +2079,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; }arch/x86/kernel/apic/es7000_32.c +1
-1@@ -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 ; }arch/x86/kernel/cpu/perf_event.c +2
-2@@ -1378,14 +1378,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 ; }arch/x86/kernel/pci-calgary_64.c +2
-2@@ -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 ; }arch/x86/kernel/tsc_sync.c +2
-2@@ -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); }/* arch/x86/kernel/xsave.c +1
-1@@ -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 ; }arch/x86/mm/ioremap.c +2
-3@@ -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" );arch/x86/mm/pageattr-test.c +1
-1@@ -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)arch/x86/mm/pageattr.c +2
-3@@ -615,9 +615,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 ; }arch/x86/platform/sfi/sfi.c +2
-2@@ -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 ; }
Re: [PATCH 05/39] arch/x86: Update WARN uses
In reply to Joe PerchesQuoted 4 lines · Joe Perches
Coalesce long formats.
Align arguments.
Add missing newlines.
Remove KERN_<level>.
I don't have objections.
Rafael
Quoted 179 lines
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(-)arch/x86/kernel/acpi/boot.c +1
-1@@ -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 ;arch/x86/kernel/apic/apic.c +1
-1@@ -2079,7 +2079,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; }arch/x86/kernel/apic/es7000_32.c +1
-1@@ -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 ; }arch/x86/kernel/cpu/perf_event.c +2
-2@@ -1378,14 +1378,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 ; }arch/x86/kernel/pci-calgary_64.c +2
-2@@ -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 ; }arch/x86/kernel/tsc_sync.c +2
-2@@ -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); }/* arch/x86/kernel/xsave.c +1
-1@@ -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 ; }arch/x86/mm/ioremap.c +2
-3@@ -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" );arch/x86/mm/pageattr-test.c +1
-1@@ -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)arch/x86/mm/pageattr.c +2
-3@@ -615,9 +615,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 ; }arch/x86/platform/sfi/sfi.c +2
-2@@ -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 ; }
PATCH 6/39 drivers/acpi: Update WARN uses
In reply to Joe PerchesAdd missing newlines.
--- drivers/acpi/ec.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/acpi/ec.c +2 -2
@@ -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);
Signature · 1 line
1.7.3.1.g432b3.dirty
PATCH 7/39 drivers/base: Update WARN uses
In reply to Joe PerchesCoalesce long formats.
Align arguments.
Add missing newlines.
Remove KERN_<level>.
--- 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(-)
drivers/base/class.c +2 -2
@@ -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 ; }
drivers/base/core.c +2 -3
@@ -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); }
drivers/base/memory.c +2 -2
@@ -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 ; }
drivers/base/sys.c +4 -6
@@ -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;
Signature · 1 line
1.7.3.1.g432b3.dirty
PATCH 8/39 drivers/block: Update WARN uses
In reply to Joe PerchesFormat neatening.
--- drivers/block/floppy.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/block/floppy.c +1 -1
@@ -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);
Signature · 1 line
1.7.3.1.g432b3.dirty
PATCH 9/39 drivers/cpuidle: Update WARN uses
In reply to Joe PerchesAlign arguments.
--- drivers/cpuidle/driver.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/cpuidle/driver.c +1 -1
@@ -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 ; }
Signature · 1 line
1.7.3.1.g432b3.dirty
PATCH 10/39 drivers/firewire: Update WARN uses
In reply to Joe PerchesAdd missing newlines.
--- drivers/firewire/core-transaction.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/firewire/core-transaction.c +3 -3
@@ -250,7 +250,7 @@ static void fw_fill_request(struct fw_packet *packet, int tcode, int tlabel,break ;default : -WARN (1 ,"wrong tcode %d" , tcode); +WARN (1 ,"wrong tcode %d\n" , tcode); } common: packet->speed = speed;
@@ -638,7 +638,7 @@ int fw_get_response_length(struct fw_request *r) }default : -WARN (1 ,"wrong tcode %d" , tcode); +WARN (1 ,"wrong tcode %d\n" , tcode);return 0 ; } }
@@ -694,7 +694,7 @@ void fw_fill_response(struct fw_packet *response, u32 *request_header,break ;default : -WARN (1 ,"wrong tcode %d" , tcode); +WARN (1 ,"wrong tcode %d\n" , tcode); } response->payload_mapped = false;
Signature · 1 line
1.7.3.1.g432b3.dirty
Re: [PATCH 10/39] drivers/firewire: Update WARN uses
Quoted 6 lines · Joe Perches
Add missing newlines.
Signed-off-by Joe Perches <[email protected]>--- drivers/firewire/core-transaction.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
Committed to linux1394-2.6.git.
Signature · 3 lines
Stefan Richter -=====-==-=- =-=- ====- http://arcgraph.de/sr/
PATCH 11/39 drivers/firmware: Update WARN uses
In reply to Joe PerchesRemove KERN_<level>.
--- drivers/firmware/dmi_scan.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/firmware/dmi_scan.c +1 -1
@@ -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;
Signature · 1 line
1.7.3.1.g432b3.dirty
PATCH 12/39 drivers/gpio: Update WARN uses
In reply to Joe PerchesAlign arguments.
Remove a trailing space before a newline from pr_err
--- drivers/gpio/gpiolib.c | 4 ++-- drivers/gpio/it8761e_gpio.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/gpio/gpiolib.c +2 -2
@@ -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 ;
drivers/gpio/it8761e_gpio.c +1 -1
@@ -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 ;
Signature · 1 line
1.7.3.1.g432b3.dirty
PATCH 13/39 drivers/gpu/drm: Update WARN uses
In reply to Joe PerchesCoalesce long formats.
Align arguments.
Add missing newlines.
--- drivers/gpu/drm/drm_crtc_helper.c | 2 +- drivers/gpu/drm/i915/i915_gem.c | 3 +-- drivers/gpu/drm/radeon/evergreen.c | 2 +- drivers/gpu/drm/radeon/r100.c | 4 ++-- drivers/gpu/drm/radeon/r300.c | 2 +- drivers/gpu/drm/radeon/r600.c | 4 ++-- drivers/gpu/drm/radeon/radeon_fence.c | 3 ++- drivers/gpu/drm/radeon/radeon_ttm.c | 3 ++- drivers/gpu/drm/radeon/rs400.c | 2 +- drivers/gpu/drm/radeon/rs600.c | 4 ++-- 10 files changed, 15 insertions(+), 14 deletions(-)
drivers/gpu/drm/drm_crtc_helper.c +1 -1
@@ -276,7 +276,7 @@ static bool drm_encoder_crtc_ok(struct drm_encoder *encoder,struct drm_crtc *tmp;int crtc_mask =1 ; -WARN (!crtc,"checking null crtc?" ); +WARN (!crtc,"checking null crtc?\n" ); dev = crtc->dev;
drivers/gpu/drm/i915/i915_gem.c +1 -2
@@ -4043,8 +4043,7 @@ i915_gem_object_pin(struct drm_gem_object *obj, uint32_t alignment) alignment =i915_gem_get_gtt_alignment (obj);if (obj_priv->gtt_offset & (alignment -1 )) {WARN (obj_priv->pin_count, -"bo is already pinned with incorrect alignment:" -" offset=%x, req.alignment=%x\n" , +"bo is already pinned with incorrect alignment: offset=%x, req.alignment=%x\n" , obj_priv->gtt_offset, alignment); ret =i915_gem_object_unbind (obj);if (ret)
drivers/gpu/drm/radeon/evergreen.c +1 -1
@@ -2033,7 +2033,7 @@ int evergreen_irq_set(struct radeon_device *rdev)u32 grbm_int_cntl =0 ;if (!rdev->irq.installed) { -WARN (1 ,"Can't enable IRQ/MSI because no handler is installed.\n" ); +WARN (1 ,"Can't enable IRQ/MSI because no handler is installed\n" );return -EINVAL ; }/* don't enable anything if the ih is disabled */
drivers/gpu/drm/radeon/r100.c +2 -2
@@ -442,7 +442,7 @@ int r100_pci_gart_init(struct radeon_device *rdev)int r;if (rdev->gart.table.ram.ptr) { -WARN (1 ,"R100 PCI GART already initialized.\n" ); +WARN (1 ,"R100 PCI GART already initialized\n" );return 0 ; }/* Initialize common gart structure */
@@ -516,7 +516,7 @@ int r100_irq_set(struct radeon_device *rdev)uint32_t tmp =0 ;if (!rdev->irq.installed) { -WARN (1 ,"Can't enable IRQ/MSI because no handler is installed.\n" ); +WARN (1 ,"Can't enable IRQ/MSI because no handler is installed\n" );WREG32 (R_000040_GEN_INT_CNTL ,0 );return -EINVAL ; }
drivers/gpu/drm/radeon/r300.c +1 -1
@@ -91,7 +91,7 @@ int rv370_pcie_gart_init(struct radeon_device *rdev)int r;if (rdev->gart.table.vram.robj) { -WARN (1 ,"RV370 PCIE GART already initialized.\n" ); +WARN (1 ,"RV370 PCIE GART already initialized\n" );return 0 ; }/* Initialize common gart structure */
drivers/gpu/drm/radeon/r600.c +2 -2
@@ -919,7 +919,7 @@ int r600_pcie_gart_init(struct radeon_device *rdev)int r;if (rdev->gart.table.vram.robj) { -WARN (1 ,"R600 PCIE GART already initialized.\n" ); +WARN (1 ,"R600 PCIE GART already initialized\n" );return 0 ; }/* Initialize common gart structure */
@@ -2995,7 +2995,7 @@ int r600_irq_set(struct radeon_device *rdev)u32 hdmi1, hdmi2;if (!rdev->irq.installed) { -WARN (1 ,"Can't enable IRQ/MSI because no handler is installed.\n" ); +WARN (1 ,"Can't enable IRQ/MSI because no handler is installed\n" );return -EINVAL ; }/* don't enable anything if the ih is disabled */
drivers/gpu/drm/radeon/radeon_fence.c +2 -1
@@ -240,7 +240,8 @@ retry:*/ if (seq == rdev->fence_drv.last_seq &&radeon_gpu_is_lockup (rdev)) {/* good news we believe it's a lockup */ -WARN (1 ,"GPU lockup (waiting for 0x%08X last fence id 0x%08X)\n" , fence->seq, seq); +WARN (1 ,"GPU lockup (waiting for 0x%08X last fence id 0x%08X)\n" , + fence->seq, seq);/* FIXME: what should we do ? marking everyone * as signaled for now */
drivers/gpu/drm/radeon/radeon_ttm.c +2 -1
@@ -689,7 +689,8 @@ static int radeon_ttm_backend_bind(struct ttm_backend *backend, gtt = container_of(backend, struct radeon_ttm_backend, backend); gtt->offset = bo_mem->start <<PAGE_SHIFT ;if (!gtt->num_pages) { -WARN (1 ,"nothing to bind %lu pages for mreg %p back %p!\n" , gtt->num_pages, bo_mem, backend); +WARN (1 ,"nothing to bind %lu pages for mreg %p back %p!\n" , + gtt->num_pages, bo_mem, backend); } r =radeon_gart_bind (gtt->rdev, gtt->offset, gtt->num_pages, gtt->pages);
drivers/gpu/drm/radeon/rs400.c +1 -1
@@ -78,7 +78,7 @@ int rs400_gart_init(struct radeon_device *rdev)int r;if (rdev->gart.table.ram.ptr) { -WARN (1 ,"RS400 GART already initialized.\n" ); +WARN (1 ,"RS400 GART already initialized\n" );return 0 ; }/* Check gart size */
drivers/gpu/drm/radeon/rs600.c +2 -2
@@ -375,7 +375,7 @@ int rs600_gart_init(struct radeon_device *rdev)int r;if (rdev->gart.table.vram.robj) { -WARN (1 ,"RS600 GART already initialized.\n" ); +WARN (1 ,"RS600 GART already initialized\n" );return 0 ; }/* Initialize common gart structure */
@@ -505,7 +505,7 @@ int rs600_irq_set(struct radeon_device *rdev) ~S_007D18_DC_HOT_PLUG_DETECT2_INT_EN (1 );if (!rdev->irq.installed) { -WARN (1 ,"Can't enable IRQ/MSI because no handler is installed.\n" ); +WARN (1 ,"Can't enable IRQ/MSI because no handler is installed\n" );WREG32 (R_000040_GEN_INT_CNTL ,0 );return -EINVAL ; }
Signature · 1 line
1.7.3.1.g432b3.dirty
PATCH 14/39 drivers/media/video: Update WARN uses
In reply to Joe PerchesAdd missing newlines.
--- drivers/media/video/s5p-fimc/fimc-core.c | 2 +- drivers/media/video/sr030pc30.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/media/video/s5p-fimc/fimc-core.c +1 -1
@@ -543,7 +543,7 @@ static void fimc_dma_run(void *priv)unsigned long flags;u32 ret; -if (WARN (!ctx,"null hardware context" )) +if (WARN (!ctx,"null hardware context\n" ))return ; fimc = ctx->fimc_dev;
drivers/media/video/sr030pc30.c +1 -1
@@ -735,7 +735,7 @@ static int sr030pc30_s_power(struct v4l2_subdev *sd, int on)const struct sr030pc30_platform_data *pdata = info->pdata;int ret; -if (WARN (pdata ==NULL ,"No platform data!" )) +if (WARN (pdata ==NULL ,"No platform data!\n" ))return -ENOMEM ;/*
Signature · 1 line
1.7.3.1.g432b3.dirty
PATCH 15/39 drivers/mfd: Update WARN uses
In reply to Joe PerchesRemove KERN_<level>.
--- drivers/mfd/ezx-pcap.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-)
drivers/mfd/ezx-pcap.c +2 -3
@@ -199,8 +199,7 @@ static void pcap_isr_work(struct work_struct *work)if (service &1 ) {struct irq_desc *desc =irq_to_desc (irq); -if (WARN (!desc,KERN_WARNING -"Invalid PCAP IRQ %d\n" , irq)) +if (WARN (!desc,"Invalid PCAP IRQ %d\n" , irq))break ;if (desc->status &IRQ_DISABLED )
@@ -282,7 +281,7 @@ static irqreturn_t pcap_adc_irq(int irq, void *_pcap)mutex_lock (&pcap->adc_mutex); req = pcap->adc_queue[pcap->adc_head]; -if (WARN (!req,KERN_WARNING "adc irq without pending request\n" )) { +if (WARN (!req,"adc irq without pending request\n" )) {mutex_unlock (&pcap->adc_mutex);return IRQ_HANDLED ; }
Signature · 1 line
1.7.3.1.g432b3.dirty
Re: [PATCH 15/39] drivers/mfd: Update WARN uses
Hi Joe,
Quoted 3 lines · Joe Perches
Remove KERN_<level>.
Signed-off-by Joe Perches <[email protected]>
Thanks, patch applied to my for-next branch.
Cheers,
Samuel.
Quoted 30 lines
--- drivers/mfd/ezx-pcap.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-)drivers/mfd/ezx-pcap.c +2
-3@@ -199,8 +199,7 @@ static void pcap_isr_work(struct work_struct *work)if (service &1 ) {struct irq_desc *desc =irq_to_desc (irq); -if (WARN (!desc,KERN_WARNING -"Invalid PCAP IRQ %d\n" , irq)) +if (WARN (!desc,"Invalid PCAP IRQ %d\n" , irq))break ;if (desc->status &IRQ_DISABLED )@@ -282,7 +281,7 @@ static irqreturn_t pcap_adc_irq(int irq, void *_pcap)mutex_lock (&pcap->adc_mutex); req = pcap->adc_queue[pcap->adc_head]; -if (WARN (!req,KERN_WARNING "adc irq without pending request\n" )) { +if (WARN (!req,"adc irq without pending request\n" )) {mutex_unlock (&pcap->adc_mutex);return IRQ_HANDLED ; }Signature · 1 line
1.7.3.1.g432b3.dirty
Signature · 2 lines
Intel Open Source Technology Centre http://oss.intel.com/
PATCH 16/39 drivers/net/can: Update WARN uses
In reply to Joe PerchesAdd missing newlines.
--- drivers/net/can/mscan/mscan.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/can/mscan/mscan.c +1 -1
@@ -182,7 +182,7 @@ static int mscan_restart(struct net_device *dev) priv->can.state =CAN_STATE_ERROR_ACTIVE ;WARN (!(in_8 (®s->canmisc) &MSCAN_BOHOLD ), -"bus-off state expected" ); +"bus-off state expected\n" );out_8 (®s->canmisc,MSCAN_BOHOLD );/* Re-enable receive interrupts. */ out_8 (®s->canrier,MSCAN_RX_INTS_ENABLE );
Signature · 1 line
1.7.3.1.g432b3.dirty
Re: [PATCH 16/39] drivers/net/can: Update WARN uses
From: Joe Perches <[email protected]>
Date: Sat, 30 Oct 2010 14:08:33 -0700
Quoted 3 lines
Add missing newlines.
Signed-off-by Joe Perches <[email protected]>
Applied.
PATCH 17/39 drivers/net/usb: Update WARN uses
In reply to Joe PerchesAdd missing newlines.
--- drivers/net/usb/ipheth.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/usb/ipheth.c +1 -1
@@ -363,7 +363,7 @@ static int ipheth_tx(struct sk_buff *skb, struct net_device *net)/* Paranoid */ if (skb->len >IPHETH_BUF_SIZE ) { -WARN (1 ,"%s: skb too large: %d bytes" , __func__, skb->len); +WARN (1 ,"%s: skb too large: %d bytes\n" , __func__, skb->len); dev->net->stats.tx_dropped++;dev_kfree_skb_irq (skb);return NETDEV_TX_OK ;
Signature · 1 line
1.7.3.1.g432b3.dirty
Re: [PATCH 17/39] drivers/net/usb: Update WARN uses
From: Joe Perches <[email protected]>
Date: Sat, 30 Oct 2010 14:08:34 -0700
Quoted 3 lines
Add missing newlines.
Signed-off-by Joe Perches <[email protected]>
Applied.
PATCH 18/39 drivers/net/wireless/iwlwifi: Update WARN uses
In reply to Joe PerchesAlign arguments.
Add missing newlines.
--- 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(-)
drivers/net/wireless/iwlwifi/iwl-agn-lib.c +1 -2
@@ -2139,8 +2139,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; } }
drivers/net/wireless/iwlwifi/iwl-agn-sta.c +3 -3
@@ -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;
drivers/net/wireless/iwlwifi/iwl-tx.c +3 -3
@@ -594,9 +594,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 ; }
drivers/net/wireless/iwlwifi/iwl3945-base.c +1 -1
@@ -168,7 +168,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 ;
Signature · 1 line
1.7.3.1.g432b3.dirty
PATCH 19/39 drivers/regulator: Update WARN uses
In reply to Joe PerchesAlign arguments.
--- drivers/regulator/core.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/regulator/core.c +1 -2
@@ -1361,8 +1361,7 @@ static int _regulator_disable(struct regulator_dev *rdev,int ret =0 ;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 ? */
Signature · 1 line
1.7.3.1.g432b3.dirty
Re: [PATCH 19/39] drivers/regulator: Update WARN uses
Quoted 3 lines · Joe Perches
Align arguments.
Signed-off-by Joe Perches <[email protected]>
PATCH 20/39 drivers/scsi/fcoe: Update WARN uses
In reply to Joe PerchesAdd missing newlines.
--- drivers/scsi/fcoe/libfcoe.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/scsi/fcoe/libfcoe.c +1 -1
@@ -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);
Signature · 1 line
1.7.3.1.g432b3.dirty
PATCH 21/39 drivers/staging: Update WARN uses
In reply to Joe PerchesAdd missing newlines.
--- drivers/staging/memrar/memrar_allocator.c | 2 +- drivers/staging/solo6x10/solo6010-v4l2-enc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/staging/memrar/memrar_allocator.c +1 -1
@@ -74,7 +74,7 @@ struct memrar_allocator *memrar_create_allocator(unsigned long base,* and issue a diagnostic. */ WARN (capacity < block_size *2 , -"memrar: Only one block available to allocator.\n" ); +"memrar: Only one block available to allocator\n" ); allocator =kmalloc (sizeof (*allocator),GFP_KERNEL );
drivers/staging/solo6x10/solo6010-v4l2-enc.c +1 -1
@@ -184,7 +184,7 @@ static void solo_update_mode(struct solo_enc_dev *solo_enc) solo_enc->bw_weight <<=2 ;break ;default : -WARN (1 ,"mode is unknown" ); +WARN (1 ,"mode is unknown\n" ); } }
Signature · 1 line
1.7.3.1.g432b3.dirty
Re: [PATCH 21/39] drivers/staging: Update WARN uses
Quoted 13 lines · Joe Perches
Add missing newlines.
Signed-off-by Joe Perches <[email protected]>--- drivers/staging/memrar/memrar_allocator.c | 2 +- drivers/staging/solo6x10/solo6010-v4l2-enc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)drivers/staging/memrar/memrar_allocator.c +0
-0
drivers/staging/memrar/memrar_allocator.c struct memrar_allocator *memrar_create_allocator(unsigned long base, · line 77
Quoted 5 lines
drivers/staging/memrar/memrar_allocator.c +1
-1@@ -74,7 +74,7 @@ struct memrar_allocator *memrar_create_allocator(unsigned long base,* and issue a diagnostic. */ WARN (capacity < block_size *2 , -"memrar: Only one block available to allocator.\n" ); +"memrar: Only one block available to allocator\n" );
There already is a new line here. So I'll remove this part of the patch.
thanks,
greg k-h
PATCH 22/39 drivers/usb/musb: Update WARN uses
In reply to Joe PerchesAlign arguments.
--- drivers/usb/musb/musb_host.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/usb/musb/musb_host.c +3 -3
@@ -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 );
Signature · 1 line
1.7.3.1.g432b3.dirty
Re: [PATCH 22/39] drivers/usb/musb: Update WARN uses
Quoted 3 lines · Joe Perches
Align arguments.
Signed-off-by Joe Perches <[email protected]>
please re-send this when we get closer to .38 merge window. I'm only queueing fixes now.
Signature · 1 line
balbi
Re: [PATCH 22/39] drivers/usb/musb: Update WARN uses
Quoted 6 lines · Felipe Balbi
Quoted 3 lines
Align arguments.
Signed-off-by Joe Perches <[email protected]>please re-send this when we get closer to .38 merge window. I'm only queueing fixes now.
If you Ack the patch, I can take care of it in trivial queue.
Thanks,
Signature · 2 lines
Jiri Kosina SUSE Labs, Novell Inc.
Felipe Balbi
Acked-byRe: [PATCH 22/39] drivers/usb/musb: Update WARN uses
Quoted 10 lines · Jiri Kosina
Quoted 6 lines · Felipe Balbi
Quoted 3 lines
Align arguments.
Signed-off-by Joe Perches <[email protected]>please re-send this when we get closer to .38 merge window. I'm only queueing fixes now.
If you Ack the patch, I can take care of it in trivial queue.
Cool, thanks, here it goes:
Signature · 1 line
balbi
PATCH 23/39 drivers/video/omap2/dss: Update WARN uses
In reply to Joe PerchesAdd missing initial argument.
Coalesce long formats.
--- drivers/video/omap2/dss/core.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/video/omap2/dss/core.c +1 -2
@@ -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 ; }
Signature · 1 line
1.7.3.1.g432b3.dirty
PATCH 24/39 fs/nfsd: Update WARN uses
In reply to Joe PerchesAdd missing 1 as first argument.
Align arguments.
--- fs/nfsd/nfs4state.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
fs/nfsd/nfs4state.c +2 -1
@@ -1235,7 +1235,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 ; }
Signature · 1 line
1.7.3.1.g432b3.dirty
PATCH 25/39 fs/notify/inotify: Update WARN uses
In reply to Joe PerchesCoalesce long formats.
Align arguments.
--- fs/notify/inotify/inotify_fsnotify.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
fs/notify/inotify/inotify_fsnotify.c +2 -2
@@ -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
Signature · 1 line
1.7.3.1.g432b3.dirty
PATCH 26/39 fs/sysfs: Update WARN uses
In reply to Joe PerchesCoalesce long formats.
Align arguments.
Remove KERN_<level>.
--- 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(-)
fs/sysfs/dir.c +1 -2
@@ -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));
fs/sysfs/file.c +2 -2
@@ -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; }
fs/sysfs/group.c +2 -2
@@ -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
fs/sysfs/symlink.c +4 -6
@@ -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);
Signature · 1 line
1.7.3.1.g432b3.dirty
PATCH 27/39 fs/proc: Update WARN uses
In reply to Joe PerchesCoalesce long formats.
Align arguments.
Remove KERN_<level>.
--- fs/proc/generic.c | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-)
fs/proc/generic.c +4 -5
@@ -585,8 +585,8 @@ static int proc_register(struct proc_dir_entry * dir, struct proc_dir_entry * dpfor (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);
Signature · 1 line
1.7.3.1.g432b3.dirty
PATCH 28/39 fs: Update WARN uses
In reply to Joe PerchesCoalesce long formats.
Align arguments.
Remove KERN_<level>.
--- fs/bio.c | 2 +- fs/buffer.c | 2 +- fs/super.c | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-)
fs/bio.c +1 -1
@@ -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);
fs/buffer.c +1 -1
@@ -1186,7 +1186,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);
fs/super.c +3 -2
@@ -1009,8 +1009,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;
Signature · 1 line
1.7.3.1.g432b3.dirty
PATCH 29/39 include/linux/device.h: Update WARN uses
In reply to Joe PerchesMacro argument neatening.
--- include/linux/device.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
include/linux/device.h +1 -1
@@ -744,7 +744,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) \
Signature · 1 line
1.7.3.1.g432b3.dirty
PATCH 30/39 kernel/irq: Update WARN uses
In reply to Joe PerchesRemove KERN_<level>.
--- kernel/irq/chip.c | 2 +- kernel/irq/manage.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
kernel/irq/chip.c +1 -1
@@ -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 ; }
kernel/irq/manage.c +1 -1
@@ -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 ;
Signature · 1 line
1.7.3.1.g432b3.dirty
PATCH 31/39 kernel/panic.c: Update warn_slowpath to use %pV
In reply to Joe PerchesReplace struct slowpath_args with struct va_format. Add KERN_WARNING to output.
Remove space after pointer in panic declaration.
--- kernel/panic.c | 40 ++++++++++++++++++---------------------- 1 files changed, 18 insertions(+), 22 deletions(-)
kernel/panic.c +18 -22
@@ -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);
Signature · 1 line
1.7.3.1.g432b3.dirty
PATCH 32/39 kernel: Update WARN uses
In reply to Joe PerchesAlign arguments.
Add missing newlines.
Remove KERN_<level>.
--- kernel/notifier.c | 2 +- kernel/pm_qos_params.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)
kernel/notifier.c +1 -1
@@ -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 ; }
kernel/pm_qos_params.c +3 -3
@@ -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 ; }
Signature · 1 line
1.7.3.1.g432b3.dirty
PATCH 33/39 lib: Update WARN uses
In reply to Joe PerchesCoalesce long formats.
Align arguments.
Remove KERN_<level>.
Use %s, __func__
--- 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(-)
lib/debugobjects.c +10 -11
@@ -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 ;
lib/iomap.c +1 -1
@@ -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); } }
lib/kobject.c +4 -5
@@ -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); } }
lib/kobject_uevent.c +2 -2
@@ -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 ; }
lib/list_debug.c +10 -14
@@ -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 ;
lib/plist.c +6 -6
@@ -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)
Signature · 1 line
1.7.3.1.g432b3.dirty
PATCH 34/39 mm: Update WARN uses
In reply to Joe PerchesCoalesce long formats.
Align arguments.
Remove KERN_<level>.
--- mm/percpu.c | 4 ++-- mm/vmalloc.c | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-)
mm/percpu.c +2 -2
@@ -715,8 +715,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 ; }
mm/vmalloc.c +2 -3
@@ -1371,14 +1371,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 ; }
Signature · 7 lines
1.7.3.1.g432b3.dirty -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [PATCH 34/39] mm: Update WARN uses
mm/percpu.c static void __percpu *pcpu_alloc(size_t size, size_t align, bool reserved) · line 720
Quoted 10 lines · Joe Perches
mm/percpu.c +2
-2@@ -715,8 +715,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 ; }
The above is a bit grep-unfriendly though. Just my 0.02 PLN.
Signature · 11 lines
Best regards, _ _ | Humble Liege of Serenely Enlightened Majesty of o' \,=./ `o | Computer Science, Michał "mina86" Nazarewicz (o o) +----[mina86*mina86.com]---[mina86*jabber.org]----ooO--(_)--Ooo-- -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/ Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
PATCH 35/39 net/core/dev.c: Update WARN uses
In reply to Joe PerchesCoalesce long formats.
Add missing newlines.
--- net/core/dev.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
net/core/dev.c +1 -2
@@ -1817,8 +1817,7 @@ struct sk_buff *skb_gso_segment(struct sk_buff *skb, int features)if (dev && dev->ethtool_ops && dev->ethtool_ops->get_drvinfo) dev->ethtool_ops->get_drvinfo (dev, &info); -WARN (1 ,"%s: caps=(0x%lx, 0x%lx) len=%d data_len=%d " -"ip_summed=%d" , +WARN (1 ,"%s: caps=(0x%lx, 0x%lx) len=%d data_len=%d ip_summed=%d\n" , info.driver, dev ? dev->features :0L , skb->sk ? skb->sk->sk_route_caps :0L , skb->len, skb->data_len, skb->ip_summed);
Signature · 1 line
1.7.3.1.g432b3.dirty
Re: [PATCH 35/39] net/core/dev.c: Update WARN uses
From: Joe Perches <[email protected]>
Date: Sat, 30 Oct 2010 14:08:52 -0700
Quoted 4 lines
Coalesce long formats.
Add missing newlines.Signed-off-by Joe Perches <[email protected]>
Applied.
PATCH 36/39 net/ipv4/tcp.c: Update WARN uses
In reply to Joe PerchesCoalesce long formats.
Align arguments.
Remove KERN_<level>.
--- net/ipv4/tcp.c | 16 +++++++--------- 1 files changed, 7 insertions(+), 9 deletions(-)
net/ipv4/tcp.c +7 -9
@@ -1193,7 +1193,7 @@ void tcp_cleanup_rbuf(struct sock *sk, int copied)struct sk_buff *skb =skb_peek (&sk->sk_receive_queue);WARN (skb && !before (tp->copied_seq,TCP_SKB_CB (skb)->end_seq), -KERN_INFO "cleanup rbuf bug: copied %X seq %X rcvnxt %X\n" , +"cleanup rbuf bug: copied %X seq %X rcvnxt %X\n" , tp->copied_seq,TCP_SKB_CB (skb)->end_seq, tp->rcv_nxt);#endif
@@ -1477,10 +1477,9 @@ int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,* shouldn't happen. */ if (WARN (before (*seq,TCP_SKB_CB (skb)->seq), -KERN_INFO "recvmsg bug: copied %X " -"seq %X rcvnxt %X fl %X\n" , *seq, -TCP_SKB_CB (skb)->seq, tp->rcv_nxt, - flags)) +"recvmsg bug: copied %X seq %X rcvnxt %X fl %X\n" , + *seq,TCP_SKB_CB (skb)->seq, tp->rcv_nxt, + flags))break ; offset = *seq -TCP_SKB_CB (skb)->seq;
@@ -1490,10 +1489,9 @@ int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, goto found_ok_skb;if (tcp_hdr (skb)->fin) goto found_fin_ok; -WARN (!(flags &MSG_PEEK ),KERN_INFO "recvmsg bug 2: " -"copied %X seq %X rcvnxt %X fl %X\n" , - *seq,TCP_SKB_CB (skb)->seq, - tp->rcv_nxt, flags); +WARN (!(flags &MSG_PEEK ), +"recvmsg bug 2: copied %X seq %X rcvnxt %X fl %X\n" , + *seq,TCP_SKB_CB (skb)->seq, tp->rcv_nxt, flags); }/* Well, if we have backlog, try to process it now yet. */
Signature · 1 line
1.7.3.1.g432b3.dirty
Re: [PATCH 36/39] net/ipv4/tcp.c: Update WARN uses
From: Joe Perches <[email protected]>
Date: Sat, 30 Oct 2010 14:08:53 -0700
Quoted 5 lines
Coalesce long formats.
Align arguments.
Remove KERN_<level>.Signed-off-by Joe Perches <[email protected]>
Applied.
PATCH 37/39 net/mac80211: Update WARN uses
In reply to Joe PerchesCoalesce long formats.
Add missing newlines.
--- 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(-)
net/mac80211/agg-tx.c +3 -2
@@ -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)) {
net/mac80211/iface.c +2 -2
@@ -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; }
net/mac80211/mlme.c +1 -1
@@ -1780,7 +1780,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 ; }
net/mac80211/rx.c +1 -3
@@ -2840,9 +2840,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;
net/mac80211/tx.c +1 -3
@@ -649,9 +649,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 ;
net/mac80211/util.c +1 -3
@@ -1120,9 +1120,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; }
net/mac80211/work.c +2 -2
@@ -830,7 +830,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);
@@ -973,7 +973,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); } }
Signature · 6 lines
1.7.3.1.g432b3.dirty -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Johannes Berg
maintainerRe: [PATCH 37/39] net/mac80211: Update WARN uses
net/mac80211/iface.c static void ieee80211_iface_work(struct work_struct *work) · line 823
Quoted 5 lines · Joe Perches
Coalesce long formats.
Add missing newlines.net/mac80211/iface.c +1
-1-WARN (1 ,"frame for unexpected interface type" ); +WARN (1 ,"frame for unexpected interface type\n" );
But I thought WARN() added a newline...
johannes
PATCH 38/39 net/rfkill/input.c: Update WARN uses
In reply to Joe PerchesCoalesce long formats.
Align arguments.
--- net/rfkill/input.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-)
net/rfkill/input.c +2 -3
@@ -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); } }
Signature · 1 line
1.7.3.1.g432b3.dirty
PATCH 39/39 sound/soc/codecs/wm_hubs.c: Update WARN uses
In reply to Joe PerchesAdd missing newlines.
--- sound/soc/codecs/wm_hubs.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
sound/soc/codecs/wm_hubs.c +1 -1
@@ -123,7 +123,7 @@ static void calibrate_dc_servo(struct snd_soc_codec *codec) reg_r = reg &WM8993_DCS_DAC_WR_VAL_0_MASK ;break ;default : -WARN (1 ,"Unknown DCS readback method" ); +WARN (1 ,"Unknown DCS readback method\n" );break ; }
Signature · 1 line
1.7.3.1.g432b3.dirty
Mark Brown
AppliedRe: [PATCH 39/39] sound/soc/codecs/wm_hubs.c: Update WARN uses
Quoted 3 lines · Joe Perches
Add missing newlines.
Signed-off-by Joe Perches <[email protected]>
Applied, thanks.