Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp2026960pxb; Sun, 24 Apr 2022 02:23:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzGlT/dy8fR3IjdKHKtUDLYYmNOq1CEeQUEUy6yIwiLb02xtSm5Xvs6gXImr74DrHqTtRMV X-Received: by 2002:aa7:88d0:0:b0:50a:96a7:a502 with SMTP id k16-20020aa788d0000000b0050a96a7a502mr13689442pff.2.1650792183504; Sun, 24 Apr 2022 02:23:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1650792183; cv=pass; d=google.com; s=arc-20160816; b=yKLVKgT9Tbv/jYFBF5cPxDj6cAea2Jdfv6shs854+Y3hOkDMTtnyJHhRH9L2IozYgV bZcQt6m+J/q6oSOq4Ci3loYkls2A7PhYP/GtaANzLerNvgR4VxNEy+ywl9Y2kBx9VN1k FAEiSObMOZvLvcswOVQKtLkEJK82Zmif+6qb+b/HECJ1OBv3AiRxuP2rMO4HbAm25O1m xwVlmDBO+/S68Ml8e8+hZ8ho4uzczKotVH7WIhV35hB1dIufGVFRUa+ig3eI6QRwboNn OYPw4IvHDST/obU2qsUayZSupsPEHDplOzGuQkhjsqMkZ/DQ5vIBd+tHGnRFiczTMXaj GPgw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=hYCt2JSFWfUKiNHxmCSbd0+pqk+uxmyxEfWMM6fsc6U=; b=aLr7lvU84DhnEUdRv2zDnda4iK6m1Z1rpHUdwYF5iBBSZNGvnAdOcgWVuaIpW/ugiw SywzgJGu8d4vUU8u6AG2uxbwyYeg5Nf8ZL8r9gLgxlDchq3gcWKxrlPVm/9fx/F7WFHR PJkC+aHmCl09q9JO9tc2zokn7atEQ0BXNUdt+oI9dCH+h5ls5e+8aBcAohC3Ihebf1lf U3brxx4vfFCT4xVUx/KGVZsyDc3vPiqw+NLbbZC9gRfRWht/+BGjyA2h37dF53hIrTVP LqIYjh0pK16CzZDLZoRflYBZtL4RcbMWyNyfW8GcjVOpx646DSlBoa7fll3kVrX3BcP4 Ecbg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo0.onmicrosoft.com header.s=selector2-vivo0-onmicrosoft-com header.b=Q6sIYYqW; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l3-20020a056a0016c300b0050ab78f4b90si14292909pfc.250.2022.04.24.02.22.46; Sun, 24 Apr 2022 02:23:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo0.onmicrosoft.com header.s=selector2-vivo0-onmicrosoft-com header.b=Q6sIYYqW; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238785AbiDXJKr (ORCPT + 99 others); Sun, 24 Apr 2022 05:10:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232261AbiDXJKp (ORCPT ); Sun, 24 Apr 2022 05:10:45 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2120.outbound.protection.outlook.com [40.107.215.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4AC7B5E143; Sun, 24 Apr 2022 02:07:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hQdgLl/3pn15B+8hjK6AsG/VlFRJ9gkChdzdG81mg6kH9ZtWNDkyx/0OtJg52gRPb3CSPAuzfjhIQcnChtmB169B5cPothL63Cf3X0nhsq9FGstcPlglkMww/IvS60/GPTSTLVYKroKwTm3YuM6t+qiirpyP+xAPE1bgKvN4FO1B9NLoVjAQ0YA/6T7GuRhLFY71milGl1AvgFIap9I+2XtzbaRxbU5eETiixgqcJxvM2MyYGSRh1CU7sQ82p8iJvAFJD+raCkoZXo1vud7vFm9SM+CO1/sjV5lwLfhG3nj0uMHaiwQNUnLA2ePEBDQWWOFTrEA/9GqBYEdrKrpW0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=hYCt2JSFWfUKiNHxmCSbd0+pqk+uxmyxEfWMM6fsc6U=; b=iVG0JwhOdJvQmGrQJk8xfqyJ4s58iVPZbOue4oLjIMVQW3dBLb3X33244DlD/sEcdXFgCULm034vC73qV16puLQ2mT8TRf6hlMz9bWUVSd4X1SHONnDpIHvNBgI/Cvh78TwT76/ORNWPKuxJHeVZEGOoDyyo3EDGchA9kAKzFF/q1easxg9v7jzbFsJfLAVTV6TnjkJQOFfo/g38H49Yw5Enw08DxRtngp6rIUlWgBcPmBSCWXYC51nC1lCH20RED50KMclvq8dQA5PYYS2eOdOiKnMXD/5INJN/IgBzwpCq8nYJPZog/CydSAAVx9/zw7ScOmxAEKrxeQvFmW0MWw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo0.onmicrosoft.com; s=selector2-vivo0-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hYCt2JSFWfUKiNHxmCSbd0+pqk+uxmyxEfWMM6fsc6U=; b=Q6sIYYqW2wLP51Bsaqa+P0N7C0Cuzg5sI8LeD80TqLHapW0Hk+083MMV8llmUNE/Jl4DBsnJI3ZnXC16CWel/SYdjs2f2gSl16ZAA3xfRgmy4oFCmoL9wE1MlQ7yEuHRuGHtu3IvAqUid5pgQnW1elPKBKnZC36VR6YcNgjUTBE= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SG2PR06MB3367.apcprd06.prod.outlook.com (2603:1096:4:78::19) by KL1PR0601MB3921.apcprd06.prod.outlook.com (2603:1096:820:2d::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.13; Sun, 24 Apr 2022 09:07:40 +0000 Received: from SG2PR06MB3367.apcprd06.prod.outlook.com ([fe80::4591:4f3e:f951:6c8c]) by SG2PR06MB3367.apcprd06.prod.outlook.com ([fe80::4591:4f3e:f951:6c8c%7]) with mapi id 15.20.5186.019; Sun, 24 Apr 2022 09:07:39 +0000 From: Wan Jiabing To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Cc: kael_w@yeah.net, Wan Jiabing Subject: [PATCH] perf sched: simplify if-if to if-else Date: Sun, 24 Apr 2022 17:07:27 +0800 Message-Id: <20220424090727.97865-1-wanjiabing@vivo.com> X-Mailer: git-send-email 2.35.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: HK0PR01CA0066.apcprd01.prod.exchangelabs.com (2603:1096:203:a6::30) To SG2PR06MB3367.apcprd06.prod.outlook.com (2603:1096:4:78::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c73901e2-2328-46ce-843e-08da25d1e1c4 X-MS-TrafficTypeDiagnostic: KL1PR0601MB3921:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7rQefXzCVM6nRVdA2oonbL8QEmn/fMlhRze9+Fc1D5KMfWcJyvpHHzdZIVQ78KCNNBGTOJoH+bBXoqZVga3OsVC1lvKIa/DkD0zHRJOckKUiFKhJ8zDr+LbLCfLtb++NMdICF12zNowK/5JtFs6O+HTS9FQqInyN5Ssl7NnQ8hz5WoVyaAvDO/A4mawG3eI8LSw3XMkMwBq3Q56giul0xa2kXPmzFCIPdd5KqY6l6s61uXATYtX6XFuUpHOPu/zeO9beL8T9/JNwx4bS4owzHV+xKqxvhzTQCL/cK+zuxpJpXf1vJs0a7fG/7QPQvuM+pkVzU/z99nRjuaXQc2Xa2DxueCpn15Rj9RUIzOCog91bH8W5SmWbevMxdwjmAYhhnAIWciRT1ZQPZlBzX1sjAOr538QK44i2vcoOLkCHJvZzQXAtKlar1/BYzLr4zU5e9pdJMnUVfIEmeH3rMYIaYRo7kP5AHCGyIB4ntlEKSIQzOe0GiLkI5+0CPPyQjJnGnILnqeYiaHw4bzDkKjn+8PgxevQOR06oypqseNFleaPYCzJ9rjr/HOqWIDR9vsdqGmtb66ZyYg/1qvX9/gVIaV8iu6mAcQj0aBrrJKqF1xzeRHicvaBi9h0X5bGB15yRkWaQ3YRvfsv1i3FBLf1skDHpkMIoZ+rz6Bx0XMqIt6amUzCfIvgwv8oBIm/1Tqf209ReOo3KvGh3Vm2hlb2qiQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SG2PR06MB3367.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(66946007)(66476007)(66556008)(8676002)(4326008)(107886003)(38100700002)(316002)(83380400001)(508600001)(86362001)(26005)(6512007)(6506007)(52116002)(6666004)(186003)(110136005)(1076003)(6486002)(2616005)(7416002)(8936002)(2906002)(4744005)(36756003)(38350700002)(5660300002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?Jjl8g+Qu0vWjGNm4/CtI5s/YIO9wuaEjhUCy0bMAlUm19hl6yMBL21zSIteO?= =?us-ascii?Q?k5HRDHQ1YkpFWbcfARGgD4062HgKIinUkgJnDwUNBSUu/XqRLHU+d7mY59Bi?= =?us-ascii?Q?Bk4elm0jWgh+F6e1if7XDrC1LdlQcDbleiI591FdGwDUvkjxHUFm1/KrHnwb?= =?us-ascii?Q?3mQZFdkK6rp3C9rWSx5sGfPGl4vyLI8ZorEqBhaDPSBHraiwcetrcHoP9I+q?= =?us-ascii?Q?XItIUXGml6ow3JTalcuySTgaiNSLPQOvku7QSfXZU0dorBX5ks7VWPCI6SpI?= =?us-ascii?Q?7C4InlEnEyy8yfROc94MWSiWW2Hq+U8Lx9N2mtXnT3SPHSFZ0ZfS23LSfEI6?= =?us-ascii?Q?xvXb/+KchrkhluPfn2+3yUbqWjwx9L/4rhBuiaBkhKCxD5JXG4BWy0HUjmtR?= =?us-ascii?Q?a28K9SHjnfd1peQmi67ww/xqCIEEP1lJKYJgwmaM6k9x9G0LhMkLVHWnwKuU?= =?us-ascii?Q?fjENSt1JDpPqwTafeIflGhGwHELlV+XYX9ay/QJYFgAOR8G62mgHz+HjRhwG?= =?us-ascii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5e56RJc/SBIXpCJF8Xu+Cwyc9e9+?= =?us-ascii?Q?U4iIJx21tJurf7AUSaIeOU0SR2DsgB+KG6Q89faQpZGMxhUWsVtiDJechEEs?= =?us-ascii?Q?PByvOkiJZS3FIZ1Qwb8w8eDLL3TdZ+0EOb4yYZlCMRcL4RccTshbG1NUN5z1?= =?us-ascii?Q?QQdWueJSSA0zNDkA26EX8bwpR9OsJVC+Te/Fo6D3YmBZcR2mAEfkj7KA/Fwc?= =?us-ascii?Q?EC60LIH1i+iVv+N1THmoUHy0IZL7s2ZV0VFPiIiU1aLeoS7oq7hE/Pi+g1+a?= =?us-ascii?Q?pGk6vPYDfmJYbdbF7stW1Whatu2ey03Og6yfw4OZQGZQULNOolxvbYvfzAvT?= =?us-ascii?Q?+x2HD0FrOA=3D=3D?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: c73901e2-2328-46ce-843e-08da25d1e1c4 X-MS-Exchange-CrossTenant-AuthSource: SG2PR06MB3367.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Apr 2022 09:07:39.7022 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: jzxlMr4qLf8OjJjDmiF+Qn+3fOVqXNY9GngzHuk5U5z/HxtrC/7zAnhhGTU7q27h26ADq6ee2JwL3RV9iOgg6g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB3921 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use if and else instead of if(A) and if (!A). Signed-off-by: Wan Jiabing --- tools/perf/builtin-sched.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c index 646bd938927a..66f8e9318123 100644 --- a/tools/perf/builtin-sched.c +++ b/tools/perf/builtin-sched.c @@ -3070,8 +3070,7 @@ static int perf_sched__timehist(struct perf_sched *sched) /* summary_only implies summary option, but don't overwrite summary if set */ if (sched->summary_only) sched->summary = sched->summary_only; - - if (!sched->summary_only) + else timehist_header(sched); err = perf_session__process_events(session); -- 2.35.1