LKML Archive on
help / color / mirror / Atom feed
From: Mark Brown <>
To: Gregory CLEMENT <>
Cc: Liam Girdwood <>,,
	Thomas Petazzoni <>,
	Ezequiel Garcia <>,
	Maxime Ripard <>,
	Boris BREZILLON <>,
	Lior Amsalem <>,
	Tawfik Bayouk <>,
	Nadav Haklai <>,
Subject: Re: [PATCH 1/2] regulator: core: Add a sanity check on the regulator_ enable/disable functions
Date: Mon, 29 Dec 2014 15:40:30 +0000	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

[-- Attachment #1: Type: text/plain, Size: 730 bytes --]

On Fri, Dec 26, 2014 at 06:26:38PM +0100, Gregory CLEMENT wrote:
> These two functions use the pointer passed in parameter without any
> check. By adding a NULL pointer check, it allows using those functions
> from a driver in a more generic way. It is useful especially for the
> disable case if the regulator is optional.

No, especially in the case of regulator_enable() this is deliberate -
we're trying to ensure that if people are using regulators they're being
careful about it, checking error codes and so on.  I'd really want to
see some persuasive use case for this.  What you're saying here sounds
like the consumer shouldn't be treating the regulator as optional at
all but should instead be using a normal regulator.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2014-12-29 15:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-26 17:26 Gregory CLEMENT
2014-12-26 17:26 ` [PATCH 1/2] regulator: core: Add a sanity check on the regulator_ enable/disable functions Gregory CLEMENT
2014-12-29 15:40   ` Mark Brown [this message]
2015-01-06 11:36     ` Gregory CLEMENT
2015-01-06 12:00       ` Mark Brown
2015-01-06 12:26         ` Gregory CLEMENT
2015-01-06 16:03           ` Mark Brown
2014-12-26 17:26 ` [PATCH 2/2] regulator: core: Add the device tree version to the regulator_get family Gregory CLEMENT
2014-12-29 15:49   ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \ \ \ \ \
    --subject='Re: [PATCH 1/2] regulator: core: Add a sanity check on the regulator_ enable/disable functions' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).