Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp879321pxb; Fri, 28 Jan 2022 12:09:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJyVNbaD3F4mAYte3wBm+P8pEScQvE5jsUr89TpYk6uc9nU94B4/PGTXijj4y5HrH7+8SMtL X-Received: by 2002:a17:906:2a08:: with SMTP id j8mr8189039eje.431.1643400540711; Fri, 28 Jan 2022 12:09:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643400540; cv=none; d=google.com; s=arc-20160816; b=xG5+8V9JBe648zGltJ3Z+vN+B/ET1PCiPx9z9Tn1hCp9Ojmwr8TKEZ30ceCmxTKi/C jKxx5iJBU6Tzp3JP/mlH27Z2advyKukQ7IuCy6KSjvWMhGLgTKNGxholt5LoL/PizRZN k9NcvKPMtGU8qldN35tyDX/Yz5qQG8/tJw/l8s78q0Q478SfYkhpai7l46EMfatOqBYV OG0x+xII10CFVRdS5SNh28i9Zv6dJ9lscPmjCQlkVj0bfXZo+cPM3uwCDRAiCg7gnhuR 3JRPOiwcYs8QA1Gu6BYTcp+CjYMI9sgL0IqYkIyIWXI1DZmOxevSkz45MeZJRvKlUG70 GUQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=WgLuXidAXuUwL2PXQ/bVdzQbHLuBMoL0TslOpbpP3jw=; b=HsM36Xapl2k4DXqAkgjD/D9k+OMMv5XjkrkCgBf07QBNWAVpGiJYASNOrSQRMiwMDr lntC8xKiYOl6qDHAJHrGt/1v0FFiaQLJyB2EoWyZbsMwrzbaN4bzq7RmLOV9NPAkr03O ZIKBWIghzVc/nK8+eC75k4QUNWXEHPj/ddQ07CHpYqKRX1Z8ydYeNVq8yrfqu5i3b9p9 uHXmuH3MiW+pVnkEKjOzx7oAVt0xxOQDp6QtLCKT11Gv2TTCCzkl7lrmXUIET7fd6beI QU7UpWguLRsHb2H9P4zCXYHR7/yP+taup5HujEAbv/rALT3wnytQ/PeMPALNOTUS2gUk reVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PuiV9uH6; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i17si4276706edc.591.2022.01.28.12.08.36; Fri, 28 Jan 2022 12:09:00 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PuiV9uH6; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344456AbiA0Vof (ORCPT + 99 others); Thu, 27 Jan 2022 16:44:35 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:41256 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344445AbiA0Voc (ORCPT ); Thu, 27 Jan 2022 16:44:32 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id D652BB823BC for ; Thu, 27 Jan 2022 21:44:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 47EFCC36AE5; Thu, 27 Jan 2022 21:44:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643319870; bh=dXyvj+UOzqsnuv2jFkIooa+KgNI/r1Unhz4tJnUXJuo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:In-Reply-To: References:From; b=PuiV9uH6NEYXCZlVxiAH1G3gBs51PNIuYNUOU/0Ci2GQ2tgrQk+WCpKWoGupUpvMB uv7rVKbVJKNaGyevTnNgk7zxyIIRuIUl8cSj/sLcNqUVSdkt6dP4qu5BW5JYdPM607 3OXikBpP2ZkSAcAubBQGExvJgXb1xrQGbHmXZGlMKrThzOulUwqkZguxtwuNzo4NHw JzTE5S//dG+nncQyOIqV4bFXyVSd2CtynnHtFi//p5Z7y3huklcRg7DTiT6AGK9VSQ UPhGqRZ58kFKUmJLSse0BqN40+BqmXy9OQwWb1Co8WT72lXbxsGV3vG2petdauMl/y uZM7abVi1xvSQ== From: Tom Zanussi To: rostedt@goodmis.org Cc: mhiramat@kernel.org, linux-kernel@vger.kernel.org, Tom Zanussi Subject: [PATCH 2/7] tracing: Fix smatch warning for do while check in event_hist_trigger_parse() Date: Thu, 27 Jan 2022 15:44:16 -0600 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The patch ec5ce0987541: "tracing: Allow whitespace to surround hist trigger filter" from Jan 15, 2018, leads to the following Smatch static checker warning: kernel/trace/trace_events_hist.c:6199 event_hist_trigger_parse() warn: 'p' can't be NULL. Since p is always checked for a NULL value at the top of loop and nothing in the rest of the loop will set it to NULL, the warning is correct and might as well be 1 to silence the warning. Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Tom Zanussi --- kernel/trace/trace_events_hist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c index e0860146dd39..b894d68082ea 100644 --- a/kernel/trace/trace_events_hist.c +++ b/kernel/trace/trace_events_hist.c @@ -6199,7 +6199,7 @@ static int event_hist_trigger_parse(struct event_command *cmd_ops, continue; } break; - } while (p); + } while (1); if (!p) param = NULL; -- 2.17.1