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]
Date:	Mon, 6 Apr 2015 16:24:18 +0100
From:	Mark Brown <broonie@...nel.org>
To:	Heiko Stübner <heiko@...ech.de>
Cc:	Liam Girdwood <lgirdwood@...il.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] regulator: add a data summary tree in debugfs

On Mon, Apr 06, 2015 at 02:04:47AM +0200, Heiko Stübner wrote:

> +	switch (rdev->desc->type) {
> +	case REGULATOR_VOLTAGE:
> +		seq_printf(s, "%8dmV ",
> +			   _regulator_get_voltage(rdev) / 1000);
> +		break;
> +	case REGULATOR_CURRENT:
> +		seq_printf(s, "%8dmA ",
> +			   _regulator_get_current_limit(rdev) / 1000);
> +		break;
> +	}

We have current limits for voltage regulators too.

> +		if (rdev->desc->type == REGULATOR_VOLTAGE)
> +			seq_printf(s, "%35dmV %8dmV",
> +				   consumer->min_uV / 1000,
> +				   consumer->max_uV / 1000);

switch statements please.

> +	list_for_each_entry(child, list, list) {
> +		if (!child->supply || child->supply->rdev != rdev)
> +			continue;

Shouldn't we be complaining if the supply of a child isn't the parent?

> +static int regulator_summary_show(struct seq_file *s, void *data)
> +{
> +	struct list_head *list = s->private;
> +	struct regulator_dev *rdev;
> +
> +	seq_puts(s, " regulator                      use,open,bypass      value        min        max\n");

I can't help but think that this would look better with spaces rather
than commas both here and in the table itself.  We also seem to have too
much space for the voltages - we're unlikely to see voltages over 10V
but the space reserved looks to be enough for 10kV.  I think users with
such regulators can probably tolerate a little misformatting.

Download attachment "signature.asc" of type "application/pgp-signature" (474 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ