From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751982AbcBWMOk (ORCPT ); Tue, 23 Feb 2016 07:14:40 -0500 Received: from e06smtp10.uk.ibm.com ([195.75.94.106]:34679 "EHLO e06smtp10.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751098AbcBWMOi (ORCPT ); Tue, 23 Feb 2016 07:14:38 -0500 X-IBM-Helo: d06dlp01.portsmouth.uk.ibm.com X-IBM-MailFrom: heiko.carstens@de.ibm.com X-IBM-RcptTo: linux-kernel@vger.kernel.org Date: Tue, 23 Feb 2016 13:14:21 +0100 From: Heiko Carstens To: Josh Poimboeuf Cc: Andrew Morton , linux-kernel@vger.kernel.org, Steven Rostedt , Prarit Bhargava Subject: Re: [PATCH] lib/bug.c: use common WARN helper Message-ID: <20160223121421.GA4024@osiris> References: <14cbeea6c0eb49dc17437b2b8f9448e9e8d40236.1456199584.git.jpoimboe@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <14cbeea6c0eb49dc17437b2b8f9448e9e8d40236.1456199584.git.jpoimboe@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16022312-0041-0000-0000-00000768C70C Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 22, 2016 at 09:54:17PM -0600, 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 > Signed-off-by: Josh Poimboeuf > --- > Based on linux-next/master. > > include/asm-generic/bug.h | 7 +++++++ > kernel/panic.c | 44 +++++++++++++++++++++++++------------------- > lib/bug.c | 27 +++------------------------ > 3 files changed, 35 insertions(+), 43 deletions(-) Nice! Just tested this on s390. Acked-by: Heiko Carstens