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: <20101008185739.GA6098@opensource.wolfsonmicro.com>
Date:	Fri, 8 Oct 2010 11:57:40 -0700
From:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
To:	Jeffrey Carlyle <jeff.carlyle@...orola.com>
Cc:	Liam Girdwood <lrg@...mlogic.co.uk>,
	Lun Chang <L.chang@...orola.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] regulator: avoid deadlock when disabling regulator
 with supply

On Fri, Oct 08, 2010 at 01:43:54PM -0500, Jeffrey Carlyle wrote:

> I have a regulator A that sets regulator B as its supply. When I call
> set_supply to add B as the supply for A, regulator A gets added to the
> supply_list for regulator B.

Looks good, thanks!

Acked-by: Mark Brown <broonie@...nsource.wolfsonmicro.com>

but some stylistic things below:

> Change-Id: I769669452b9e1b59b252298d589738aabb03529c

Hrm?

>  static int _regulator_get_voltage(struct regulator_dev *rdev);
>  static int _regulator_get_current_limit(struct regulator_dev *rdev);
>  static unsigned int _regulator_get_mode(struct regulator_dev *rdev);
> @@ -1343,12 +1344,14 @@ int regulator_enable(struct regulator *regulator)
>  	mutex_lock(&rdev->mutex);
>  	ret = _regulator_enable(rdev);
>  	mutex_unlock(&rdev->mutex);
> +
>  	return ret;
>  }
>  EXPORT_SYMBOL_GPL(regulator_enable);

Random indentation change here.

> +
> +	if (supply_rdev)
> +		regulator_disable(
> +				get_device_regulator(rdev_get_dev(supply_rdev))
> +				);
> +

Eew, indentation!  In cases like this it's better to just ignore the
excesive line length.
--
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