Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DD54EC64ED8 for ; Mon, 27 Feb 2023 22:10:00 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1BE3F85B83; Mon, 27 Feb 2023 23:08:58 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="Fpf+raG0"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7D0428546E; Mon, 27 Feb 2023 23:08:48 +0100 (CET) Received: from mail-qt1-x833.google.com (mail-qt1-x833.google.com [IPv6:2607:f8b0:4864:20::833]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 97CEE85AA0 for ; Mon, 27 Feb 2023 23:08:44 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qt1-x833.google.com with SMTP id h19so8453047qtk.7 for ; Mon, 27 Feb 2023 14:08:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1677535724; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=6wY1FeCUbjisXke3c+GFUYblp4GrWcer0YDYDlRXiUQ=; b=Fpf+raG0T7R66hvSNIbd41q1CTNIjJyM81Cb60juGhp+iUG+oI33mUxpRhTr1y/+N/ B5SrzzPVL7jC9Q0VeWAl+uMnM8UKDfpUehaf01exiAhix9qHaO/NxLw7QocVyG7YchaU hz8m9B5kdbtBl18RUQcwLS+ahqMtIAG7ianZI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677535724; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6wY1FeCUbjisXke3c+GFUYblp4GrWcer0YDYDlRXiUQ=; b=fGClGHrYKr0jRXsRyPJ+VM7wwhDGqU9rySQiJk5P2O3iuTpxMqU+5+6MjRemCLksde BDXQwt/ZTGKSnjhfL3Aw13ZRBwNm3GqheCV7T+/2BoJEEl1gxILE5I6SSMh9Q5jOKUx2 tKjbEprGlJqgPYQ9bTd2y+6STMRfqyCNG62fghiXx79rwgakvbLMPc+RnRQqmIBF25+n 98z5z58/l/98h5mfR1oytZqkXZeFqnR/UAVkIULdCBJKxv0JlUoG8T5FCvFh1ROsQfSM zYuPc6iESWQwaRb+pEWId+t+ufEiAjxqI8j2N6kK/ASf3jXhqBvTplRb6hWICR3+P/mF jcHA== X-Gm-Message-State: AO0yUKXw8krPuFD/BBX6SHDZVT3AdPXcmjBd3JXJwU8wTpVQjV84TK4g e7u6IDZhiviAY6my4SJqLKlqoo2ESeGmNqS59UQ= X-Google-Smtp-Source: AK7set+RMp+hk2+gPWNhCu4eTSGJwkhmskriChtjZSQgmrUjEbdUHwZxTXZn+BKVCGn3lD5hivN6IQ== X-Received: by 2002:a05:622a:216:b0:3bf:b82d:1686 with SMTP id b22-20020a05622a021600b003bfb82d1686mr1378806qtx.40.1677535724160; Mon, 27 Feb 2023 14:08:44 -0800 (PST) Received: from bill-the-cat.lan (2603-6081-7b00-6400-0000-0000-0000-036b.res6.spectrum.com. [2603:6081:7b00:6400::36b]) by smtp.gmail.com with ESMTPSA id x2-20020ac86b42000000b003b635a5d56csm5375454qts.30.2023.02.27.14.08.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Feb 2023 14:08:43 -0800 (PST) From: Tom Rini To: u-boot@lists.denx.de Cc: Simon Glass Subject: [PATCH 6/7] proftool: Remove unused variables in make_flame_tree Date: Mon, 27 Feb 2023 17:08:38 -0500 Message-Id: <20230227220839.2519733-6-trini@konsulko.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227220839.2519733-1-trini@konsulko.com> References: <20230227220839.2519733-1-trini@konsulko.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean With clang-15 we now get reported that in the make_flame_tree function, neither the missing_count nor depth variables are used, only incremenete/decremented. Remove these. Signed-off-by: Tom Rini --- Cc: Simon Glass --- tools/proftool.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/tools/proftool.c b/tools/proftool.c index 089360428c2c..101bcb63334e 100644 --- a/tools/proftool.c +++ b/tools/proftool.c @@ -1713,18 +1713,11 @@ static int make_flame_tree(enum out_format_t out_format, struct flame_state state; struct flame_node *tree; struct trace_call *call; - int missing_count = 0; - int i, depth; + int i; /* maintain a stack of start times, etc. for 'calling' functions */ state.stack_ptr = 0; - /* - * The first thing in the trace may not be the top-level function, so - * set the initial depth so that no function goes below depth 0 - */ - depth = -calc_min_depth(); - tree = create_node("tree"); if (!tree) return -1; @@ -1736,16 +1729,10 @@ static int make_flame_tree(enum out_format_t out_format, ulong timestamp = call->flags & FUNCF_TIMESTAMP_MASK; struct func_info *func; - if (entry) - depth++; - else - depth--; - func = find_func_by_offset(call->func); if (!func) { warn("Cannot find function at %lx\n", text_offset + call->func); - missing_count++; continue; } -- 2.34.1