Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp50207ybb; Fri, 27 Mar 2020 15:53:25 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsgSfu5PL9dbNePSu1ZW6CyBsVkBUr8vpWAfUux6ildmbgYMn7I3Kqt2HySX+v++9Cg1mp7 X-Received: by 2002:a05:6830:1495:: with SMTP id s21mr835752otq.35.1585349605195; Fri, 27 Mar 2020 15:53:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585349605; cv=none; d=google.com; s=arc-20160816; b=F9yRGH0TPQIFMASuSRoCy5j130jpCu5ajJ6noZzQDZO8fJbIv02oTSTyqcKn4G0LNS AJ8llvTj+pSQphoqbnhmJCyKy24xG6Ny/c5A7/5i0iA8oPgZO3sHvXnLpvyVHuntLRod oEmRjqs1oOMtY2jhGAD2U9E2w52Pv4PnBFr3qUZrU9OoVwBPzZkSC/fQSPkWBRvQghS6 Er0+yodsF7TEqRmzKa4wPJKzWn/g0Qbk//JViaCC7tkThHZpDfgEQvT9lOTmIpPV35HU pO+T2V0mB4tVB2IjhNJGUPJvwB3DnUpIw/sYxlhowVxPlRq0kdDfwYaP6KXZNotm+XPx z/lQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=Mub8tvXO1kOzeosd7DsxbHB9S1k081+R4jMvUl+z6w4=; b=X7NBXUkALZ9wGhr+3U60Z+cgEYbiE8icZuq1cYC4joxmkcD3Zmaozo4iJDeTgPgItj awS0Ap/qcuZSQIOsrTFx6ti+eHn/eQmQ7sBsA+InFDBU/bY4tzNqu8iMH9Di9l+yk+nw jaJpTFbEW2fDyG1Gt+lOvDN4FH8wBFfjZBUheobgX3OjjdsJKPcalX4GVr1BJFBVDVFp aYaIk+qdQZWZTG51xgWCMuy/9vPOFgoC12XoOZQQVKVKpqvWppu5+YjpYSgjaNqWt3J/ xfNq/6Fat9iSACpOK0apHsynG/LlBscQqcXI/l2SMqRK/SvKJFWFfGk9IG1RKplreEMu 8m2Q== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y3si2772502oof.81.2020.03.27.15.53.12; Fri, 27 Mar 2020 15:53:25 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727892AbgC0Wvm (ORCPT + 99 others); Fri, 27 Mar 2020 18:51:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:49318 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727800AbgC0Wvl (ORCPT ); Fri, 27 Mar 2020 18:51:41 -0400 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 3019820787; Fri, 27 Mar 2020 22:51:40 +0000 (UTC) Date: Fri, 27 Mar 2020 18:51:38 -0400 From: Steven Rostedt To: Jules Irenge Cc: julia.lawall@lip6.fr, boqun.feng@gmail.com, Ingo Molnar , linux-kernel@vger.kernel.org (open list) Subject: Re: [PATCH 10/10] trace: Replace printk and WARN_ON with WARN Message-ID: <20200327185138.5e98e17b@gandalf.local.home> In-Reply-To: <20200327212358.5752-11-jbi.octave@gmail.com> References: <0/10> <20200327212358.5752-1-jbi.octave@gmail.com> <20200327212358.5752-11-jbi.octave@gmail.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 */