Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1340600
| From | Prarit Bhargava <prarit@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] lib/bug.c: use common WARN helper |
| Date | 2016-02-23 14:20 +0100 |
| Message-ID | <r5l2G-5VT-13@gated-at.bofh.it> (permalink) |
| References | <r5ciL-7X0-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 02/22/2016 10:54 PM, Josh Poimboeuf wrote: > The traceoff_on_warning option doesn't have any effect on s390, powerpc, > arm64, parisc, and sh because there are two different types of WARN > implementations: > > 1) The above mentioned architectures treat WARN() as a special case of a > BUG() exception. They handle warnings in report_bug() in lib/bug.c. > > 2) All other architectures just call warn_slowpath_*() directly. Their > warnings are handled in warn_slowpath_common() in kernel/panic.c. > > Support traceoff_on_warning on all architectures and prevent any future > divergence by using a single common function to emit the warning. > > Also remove the '()' from '%pS()', because the parentheses look funky: > > [ 45.607629] WARNING: at /root/warn_mod/warn_mod.c:17 .init_dummy+0x20/0x40 [warn_mod]() > > Reported-by: Chunyu Hu <chuhu@redhat.com> > Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> <snip> > - > - print_modules(); > - show_regs(regs); > - print_oops_end_marker(); > - /* Just a warning, don't kill lockdep. */ > - add_taint(BUG_GET_TAINT(bug), LOCKDEP_STILL_OK); > + __warn(file, line, (void *)bugaddr, BUG_GET_TAINT(bug), regs, > + NULL); > + ^^^ minor minor minor nit: extra line here. Not a big deal but change it if anyone else complains. Other than that ... Acked-and-tested-by: Prarit Bhargava <prarit@redhat.com> P. > return BUG_TRAP_TYPE_WARN; > } > >
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] lib/bug.c: use common WARN helper Josh Poimboeuf <jpoimboe@redhat.com> - 2016-02-23 05:00 +0100 Re: [PATCH] lib/bug.c: use common WARN helper Heiko Carstens <heiko.carstens@de.ibm.com> - 2016-02-23 13:20 +0100 Re: [PATCH] lib/bug.c: use common WARN helper Prarit Bhargava <prarit@redhat.com> - 2016-02-23 14:20 +0100 Re: [PATCH] lib/bug.c: use common WARN helper Steven Rostedt <rostedt@goodmis.org> - 2016-02-23 14:40 +0100
csiph-web