Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1263771pxb; Fri, 26 Feb 2021 06:44:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJz2pCosHlcM/ht0P3awdQSPtULqKdrm8IyfS0SYUs9gFMjEewIVusJUbsspYM4zn8oDaqB1 X-Received: by 2002:a17:906:38d7:: with SMTP id r23mr3740855ejd.127.1614350657317; Fri, 26 Feb 2021 06:44:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614350657; cv=none; d=google.com; s=arc-20160816; b=B/i4TG1YFcajz3pk9nxLifUTduBLAm53k3EzIongfHvYLO5xgOGQgEfoaEkK6yD46a NXT3HEEkA22/L/yvkuRbITi11X8JichfHb4mavSK0g3eiPeLhxTXMwUDnSwqOFWvmgpR w6HdGahVsEL2Fy/SgwDHueUXs55wU0VwtW01mCzUl73zEAq9EHYpUHqzvvvUMlQZSO2y khPJPo2rQyxGP+1s+Or4WPh4+9D/OYn3fCEW5R4wmRL2SmGkZ7n6tzUamOTpsiEsy06x 0zmdPCl4pkCtAq9YOwamf8eGjgryhqUroVz3DchTWf5WSgr8WDBLFFTenRtcH9ZMbnZV LVow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=HeYFDHvUizKqPppD4/V59zr4z9TCZyf03fqwXFYmiuo=; b=tSgtVr7Ws44SCJBzob7DhauQByrE3DiZV7wRK89M+lV799vpa7ueMf5NmgmlupN5t4 VfZZcgssxTk/dVNkh4YbV86Lj+MPfnazyCGCVlM9OCBXycMy9/T7io1M8+ZUnJY2lYJ8 6LwRZQ9A++duQqFGuJEGBJgNcQWtAdpdXoROYedyuQIWePRgrBB7jU7vNhKELhZQKSJP Pxq81AlHKvD+N069iN646BEToBYCYBxz6B9oFwx9qhPLytujihQqs0ILjFMLCx3puISj N5zs9j5Ny1n7JsACtwDtnP170aDEWIaSQB9lP2NZ8/p5K/BGQ2SfRou0Wwcbt5v8X7K3 AQ4g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x24si4660193ejs.293.2021.02.26.06.43.53; Fri, 26 Feb 2021 06:44:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229598AbhBZOlR (ORCPT + 99 others); Fri, 26 Feb 2021 09:41:17 -0500 Received: from mail.kernel.org ([198.145.29.99]:47888 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229554AbhBZOlO (ORCPT ); Fri, 26 Feb 2021 09:41:14 -0500 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C375F64E20; Fri, 26 Feb 2021 14:40:33 +0000 (UTC) Date: Fri, 26 Feb 2021 09:40:32 -0500 From: Steven Rostedt To: Xu Wang Cc: mingo@redhat.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] tracing: Use WARN(1,...) Message-ID: <20210226094032.49ac56d7@gandalf.local.home> In-Reply-To: <20210226094426.49016-1-vulab@iscas.ac.cn> References: <20210226094426.49016-1-vulab@iscas.ac.cn> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 26 Feb 2021 09:44:26 +0000 Xu Wang wrote: > Use WARN(1,...) rather than printk followed by WARN_ON(1). Why? > > Signed-off-by: Xu Wang > --- > kernel/trace/trace.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c > index 526fd5ac2ba8..a556b8c00a9f 100644 > --- a/kernel/trace/trace.c > +++ b/kernel/trace/trace.c > @@ -1957,7 +1957,7 @@ static int run_tracer_selftest(struct tracer *type) > tr->current_trace = saved_tracer; > if (ret) { > /* Add the warning after printing 'FAILED' */ > - WARN(1, KERN_CONT "FAILED!\n"); > + WARN(1, "FAILED!\n"); The above isn't even in my tree. Anyway, look at the code around it, and then tell that this patch makes sense. NAK. -- Steve > return -1; > } > /* Only reset on passing, to avoid touching corrupted buffers */