Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp2711086pxb; Mon, 25 Apr 2022 00:10:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJ/WZVxtCTZiCkcjYsf/tBlcKLVJyMKADMkD4BrR1pGIPes68zz3ZeoXXDbPXFwAqFg7Dt X-Received: by 2002:a17:902:cec5:b0:15d:1e53:6f1a with SMTP id d5-20020a170902cec500b0015d1e536f1amr1927869plg.2.1650870628759; Mon, 25 Apr 2022 00:10:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650870628; cv=none; d=google.com; s=arc-20160816; b=jAHnvpmwhnGuTRqzcvGrxmY/WYZuURWebpK+GZTcETADitbcytCVgbyr/SQeoUYEwB iUnL8XJaldzPS67WcFZ4fUPm76NGrsh3Gv4IcPnb8YuAiXFLhfTds9eEWXwB2PFx28lr ZNiqyNFHsAS4takG3ogUBj0vreEpYX1vyzjQmZMxRCfRCQ8yZRVqd4biADKhzlZxVtLo 2L1tSQUlrX/Vip+hpLjGfFMcdbGzDq9riqwXC/mmcdsKJDXiMMZhV+JktDxPaHw3t/wm LqmUcnhRHWrcwm36y0WXEsHMd+orZ38Y+YOqpEYoa9o0UMYP0Z49mfa4ONVOFPNG7hB9 wYOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=isZFRIfqKLP1AybeKUbrHLeOEZ1MpdVCG7KKzzpYSGI=; b=fKYBV+knwA5XtDN0FA9RQ8KFhU909/hZDrf6mrvLhqpPQSDUDd8dxl/OAbtryvpj9h NWb4nfG8MUsKnrabeHGHIUJIFaLVtG8VnBOGz7jIVKEpByOo78lfYnmYKQ742jnl35Os cm+KnL9plXvY4aKpnEtWnIBrCDsf0AOG3BEzTe999d8awFsfHepD507qyUMz9QwzFUHo z3kdssde9U+MWcrPGCNF++I21JsHymU39MU3laNvzSbJFZ9wjAgQp0wrRVsMbl6AVGA4 rT80P/71dQxXy69shoAd/ixhtqPxkmCJwpTNAAh7t+bsiJXLgzppoV7xO+R/DwNw86V0 77vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BBhmBoJD; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i23-20020a63e917000000b00381facb2ec6si16233260pgh.728.2022.04.25.00.10.14; Mon, 25 Apr 2022 00:10:28 -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=@kernel.org header.s=k20201202 header.b=BBhmBoJD; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239960AbiDYAEo (ORCPT + 99 others); Sun, 24 Apr 2022 20:04:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232565AbiDYAEm (ORCPT ); Sun, 24 Apr 2022 20:04:42 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3BAEB13FA1; Sun, 24 Apr 2022 17:01:41 -0700 (PDT) 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 dfw.source.kernel.org (Postfix) with ESMTPS id D55A861445; Mon, 25 Apr 2022 00:01:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 10875C385A7; Mon, 25 Apr 2022 00:01:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1650844900; bh=AXUSPHv7THGMSpb2syDr1mXuJfo2LnfUvKNKQYDoZUw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=BBhmBoJD+fiMgPEAjaDIpXNT0ADVaiysGclLJpwWol0yylWb5BaGrkeE3NSAyED4u LEafhR6+Og+08Iv7EW3STyfOommREqkxUt9j04ev9Xxzsy0tabQgVZAgepVz/Bf7Tq LVzHm0RK+011aeLOLAoEsh0O98v5NxIWAp2EcEa2+w2MYJHV6S+RKZklflRcXEHCWm iJSTacMF1FtERzNvV5ZoW6w844ZoUXt04WRPtFDsnlZdKViX+mPFCVuXtxof7nGXJC BPiyz/svatS3Yy6HQGvEYQI5fVkzh8KsbVEDsg+OWaTVe7kmd3XRwySzTCxdYUzmBw A/x87m4k60Wgg== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 31F56400B1; Sun, 24 Apr 2022 21:01:36 -0300 (-03) Date: Sun, 24 Apr 2022 21:01:36 -0300 From: Arnaldo Carvalho de Melo To: Wan Jiabing Cc: Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, kael_w@yeah.net Subject: Re: [PATCH] perf sched: simplify if-if to if-else Message-ID: References: <20220424090727.97865-1-wanjiabing@vivo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220424090727.97865-1-wanjiabing@vivo.com> X-Url: http://acmel.wordpress.com X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,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 Em Sun, Apr 24, 2022 at 05:07:27PM +0800, Wan Jiabing escreveu: > Use if and else instead of if(A) and if (!A). I'm now looking for a brown paper bag... There is some hope, but I'm not in a mood, will check tomorrow, but certainly this should go in, thanks! - Arnaldo > 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 -- - Arnaldo