lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150313105343.GA19614@kernel.org>
Date:	Fri, 13 Mar 2015 07:53:43 -0300
From:	Arnaldo Carvalho de Melo <acme@...nel.org>
To:	Ingo Molnar <mingo@...nel.org>
Cc:	linux-kernel@...r.kernel.org, Andi Kleen <ak@...ux.intel.com>,
	Jiri Olsa <jolsa@...hat.com>
Subject: Re: [PATCH 18/24] perf stat: Output running time and run/enabled
 ratio in CSV mode

Em Fri, Mar 13, 2015 at 08:34:41AM +0100, Ingo Molnar escreveu:
> * Arnaldo Carvalho de Melo <acme@...nel.org> wrote:
> > From: Andi Kleen <ak@...ux.intel.com>
> > +static void print_running(u64 run, u64 ena)
> > +{
> > +	if (csv_output) {
> > +		fprintf(output, "%s%" PRIu64 "%s%.2f",
> > +					csv_sep,
> > +					run,
> > +					csv_sep,
> > +					ena ? 100.0 * run / ena : 100.0);
> > +	} else if (run != ena)
> > +		fprintf(output, "  (%.2f%%)", 100.0 * run / ena);
 
> That's not the standard pattern for 'else if' branches, but:
> 
> 	} else {
> 		if ()
> 			...
> 	}
> 
> to make it stand apart more from a simple 'else' branch.

I think it is preferred to make it match the if branch if it uses curly
braces, i.e. make it look:

	} else if () {
	}


i.e switch like series of else if, to avoid too much indentation for such
constructs.

Fixed it and the other file, redid the perf-core-for-mingo tag, pushed.

- Arnaldo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ