Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp538289ybb; Sat, 28 Mar 2020 05:01:55 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvCg5t6L+VQOGgK4BUDX6iMzBCBVCz2aEjW63KIw1lnCxvoMk23fAdu8SVkJuy3NRbinEWI X-Received: by 2002:a9d:5607:: with SMTP id e7mr2547216oti.196.1585396915436; Sat, 28 Mar 2020 05:01:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585396915; cv=none; d=google.com; s=arc-20160816; b=YcEhJQrvG2uJer5UNRhKeGn2CCDcFq5Q0PffGJYuR+Khg+g/8Fctd8OhMDVoHkS4DN Iaw5n8bU5EGK5qbdZAa48aFBpuyhujFFoPo91S+n+nhVBtSImxxApe1e4r3vPN0CvtQW f3cqlHU9+TeRNTZYnT7b41gzsfj1zwCdmjt2aACDepR2HKEx3cQm6+j49wUdYiBiLSdJ 7i9aujbzKtCva+5iudiPoW1X1qNQmDvk4Ra/KRAHJNXsml+uyhqSclU3kStiUfFlD843 q1ge8VqU12ybgbvknhZspxmo/z0/fsJuMvK0MwB7NzZtHdi6JLI+8G5+iXMIEBUYAQ6p jpvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:date:from:dkim-signature; bh=Rqn4yl76OrREiNZnQJmPD+oo2g6msHaIbhbXJHXi1Lw=; b=OUVtUfKAQfNDy6HIX3YZF0xjKtZk0cjaB9TBjGMX+JeNpIqRBm5TUrGSytwt2pAib+ WPuH2i1CCLml0Ghm8BGvxH7NDyghFOldoa/+vVzfO9yfdNV0/u2IrCNsPQ9D4r4mr6sv lDos+sfTbJn3TmMfjIZmy1XQY6LtHNYO3NO+ErTEMu+/WL3lfz5Qm1J2i6kIe18XNl1B RDPq9jhNiD/YYlzKqVVGyoR7csXv2VoFIYrOEd+tMfoNV5Ldi6bOX/x0tuK/DCi/ItUm 22E6UqCYkvz6G+PtN//yT+OgHOFS/3L2Ei3PosBc3K7YKZgBFX7dtn2+sqWrhNUmskEv p5Rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=W0wERdKV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p187si3805796oop.28.2020.03.28.05.01.42; Sat, 28 Mar 2020 05:01:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=W0wERdKV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726282AbgC1MA4 (ORCPT + 99 others); Sat, 28 Mar 2020 08:00:56 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:44521 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726045AbgC1MA4 (ORCPT ); Sat, 28 Mar 2020 08:00:56 -0400 Received: by mail-wr1-f67.google.com with SMTP id m17so14907690wrw.11 for ; Sat, 28 Mar 2020 05:00:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=Rqn4yl76OrREiNZnQJmPD+oo2g6msHaIbhbXJHXi1Lw=; b=W0wERdKVBixAngiGAQBPBAXwXdU9Mq3SR3umd3rubMrFchYhcFHkvj91+MRg+iNtia ylf88hvgi5mKBUN0baXXdM1UKCICIERrbNDfpkJ9omRtzC1oD27s94pO4rvvAxgk4tNd Mta8cz8608KkqnnoCWl1m1Ros8LLcnp25OKen4XskzJtHwB4MZQQ+UOnN4ccFW+FUJos CCOQ6Xhvg+lUOlgKXFjq+7vOlUwrqlVNEWArgrGcj0qu4/QcX9emIYVJRPvmisL/nY1S mi20iMS+IX2MJaZJUFnkxTofkNATjc0gG3rLru32zumJBPMqonzZ10XAXnBFPjNKgB6r TYUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=Rqn4yl76OrREiNZnQJmPD+oo2g6msHaIbhbXJHXi1Lw=; b=L4mu+YfpNJA9TsiEOrL/rodlrc792InmdoXWmlCmkJVkUEygThpsaTkQ3Pr68NZSTL ap67HsakyZIA7W6ITI/PiEdCJ5r2YdSFdf8zreN/zk0WlJ+rGyGujE1ojgB7tm1ew0fj YRaVqmDstwsMj/UuUEZHLCeV/UcAadO4E5vrh1MU8QdyL5sFk59EmsMkhQmxAkYy0/kb MHuTQ68trXVKW45vtIZjjI9awrsGF8Bg1xyTtsdDYZCBexO4IcaImKvudyIsnbBQZKXa SHP55wMSf68i5bvVn39nOY0dGeilSZr8OZlliMbWGX6CVO24qGWO1cc0VPsonIsXj2pV VpDA== X-Gm-Message-State: ANhLgQ2tnjMXA+ezKzbwszVhHWzwNMLWBfmQ6QuTJeRv04/Wn3tbOL/H uxdNAU1SH4KMBeoYY6cawA== X-Received: by 2002:a5d:4611:: with SMTP id t17mr4856100wrq.16.1585396854006; Sat, 28 Mar 2020 05:00:54 -0700 (PDT) Received: from ninjahost.lan (host-92-23-82-35.as13285.net. [92.23.82.35]) by smtp.gmail.com with ESMTPSA id l12sm12434087wrt.73.2020.03.28.05.00.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Mar 2020 05:00:53 -0700 (PDT) From: Jules Irenge X-Google-Original-From: Jules Irenge Date: Sat, 28 Mar 2020 12:00:32 +0000 (GMT) To: Steven Rostedt cc: Jules Irenge , julia.lawall@lip6.fr, boqun.feng@gmail.com, Ingo Molnar , open list Subject: Re: [PATCH 10/10] trace: Replace printk and WARN_ON with WARN In-Reply-To: <20200327185138.5e98e17b@gandalf.local.home> Message-ID: References: <0/10> <20200327212358.5752-1-jbi.octave@gmail.com> <20200327212358.5752-11-jbi.octave@gmail.com> <20200327185138.5e98e17b@gandalf.local.home> User-Agent: Alpine 2.21.1 (LNX 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 27 Mar 2020, Steven Rostedt wrote: > On Fri, 27 Mar 2020 21:23:57 +0000 > Jules Irenge wrote: > > > Coccinelle suggests replacing printk and WARN_ON with WARN > > > > SUGGESTION: printk + WARN_ON can be just WARN. > > Signed-off-by: Jules Irenge > > --- > > kernel/trace/trace.c | 4 +--- > > 1 file changed, 1 insertion(+), 3 deletions(-) > > > > diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c > > index 6b11e4e2150c..1fe31272ea73 100644 > > --- a/kernel/trace/trace.c > > +++ b/kernel/trace/trace.c > > @@ -1799,9 +1799,7 @@ static int run_tracer_selftest(struct tracer *type) > > /* the test is responsible for resetting too */ > > tr->current_trace = saved_tracer; > > if (ret) { > > - printk(KERN_CONT "FAILED!\n"); > > - /* Add the warning after printing 'FAILED' */ > > NACK! Did you not read the above comment. The FAILED goes with another > print and should NOT be part of the WARN_ON. > > -- Steve > > > - WARN_ON(1); > > + WARN(1, "FAILED!\n"); > > return -1; > > } > > /* Only reset on passing, to avoid touching corrupted buffers */ > > Thanks for the feedback, I will be more careful next time. Kind regards, Jules