From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753723AbbCJPhL (ORCPT ); Tue, 10 Mar 2015 11:37:11 -0400 Received: from mga02.intel.com ([134.134.136.20]:60986 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753509AbbCJPhF (ORCPT ); Tue, 10 Mar 2015 11:37:05 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,375,1422950400"; d="scan'208";a="689856863" Date: Tue, 10 Mar 2015 08:37:04 -0700 From: Andi Kleen To: Namhyung Kim Cc: Andi Kleen , acme@kernel.org, jolsa@redhat.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/4] perf, tools: Output running time and run/enabled ratio in CSV mode Message-ID: <20150310153704.GH31334@tassilo.jf.intel.com> References: <1425858924-31414-1-git-send-email-andi@firstfloor.org> <1425858924-31414-2-git-send-email-andi@firstfloor.org> <20150310071518.GF943@sejong> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150310071518.GF943@sejong> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Why not handle both cases here? > > static void print_running(u64 run, u64 ena) > { > if (csv_output) > fprintf(output, ...); > else if (run != ena) > fprintf(output, ...); > } print_running has 6 callers. run != ena is only needed for two of them. So I don't think it makes sense to do. -Andi