public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Cristian Marussi <cristian.marussi@arm.com>
Cc: linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	sudeep.holla@arm.com, lukasz.luba@arm.com,
	james.quinlan@broadcom.com, Jonathan.Cameron@Huawei.com,
	robh@kernel.org, satyakim@qti.qualcomm.com,
	etienne.carriere@linaro.org, f.fainelli@gmail.com,
	vincent.guittot@linaro.org, souvik.chakravarty@arm.com
Subject: Re: [PATCH v6 5/5] regulator: add SCMI driver
Date: Mon, 23 Nov 2020 17:49:41 +0000	[thread overview]
Message-ID: <20201123174941.GM6322@sirena.org.uk> (raw)
In-Reply-To: <20201119191051.46363-6-cristian.marussi@arm.com>

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

On Thu, Nov 19, 2020 at 07:10:51PM +0000, Cristian Marussi wrote:

> +	ret = handle->voltage_ops->config_get(handle, sreg->id,
> +					      &config);
> +	if (ret) {
> +		dev_err(&sreg->sdev->dev,
> +			"Error %d reading regulator %s status.\n",
> +			ret, sreg->desc.name);
> +		return 0;
> +	}

If we failed to read the status we should return an error rather than
claim the regulator is off, other functions return errors so I'm not
sure why this one would be different.

> +	vinfo = handle->voltage_ops->info_get(handle, sreg->id);
> +	if (!vinfo) {
> +		dev_warn(dev, "Skipping invalid voltage domain %d\n",
> +			 sreg->id);
> +		return -ENODEV;

I'm not sure that this error message is the most informative - the issue
is that we failed to read information, we don't know if that information
would have been valid or not.  Same for some of the other enumeration,
it's a failure to read not a lack of validity isn't it?

> +	/* Allocate pointers' array for all possible domains */

No '

> +	rinfo->num_doms = num_doms;
> +	/*

Several places like this with missing blank lines.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2020-11-23 17:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-19 19:10 [PATCH v6 0/5] Add support for SCMIv3.0 Voltage Domain Protocol and SCMI-Regulator Cristian Marussi
2020-11-19 19:10 ` [PATCH v6 1/5] firmware: arm_scmi: Add Voltage Domain Support Cristian Marussi
2020-11-19 19:10 ` [PATCH v6 2/5] firmware: arm_scmi: add SCMI Voltage Domain devname Cristian Marussi
2020-11-19 19:10 ` [PATCH v6 3/5] regulator: core: add of_match_full_name boolean flag Cristian Marussi
2020-11-19 19:10 ` [PATCH v6 4/5] dt-bindings: arm: add support for SCMI Regulators Cristian Marussi
2020-11-23 17:30   ` Mark Brown
2020-11-23 18:52     ` Cristian Marussi
2020-11-19 19:10 ` [PATCH v6 5/5] regulator: add SCMI driver Cristian Marussi
2020-11-23 17:49   ` Mark Brown [this message]
2020-11-23 18:49     ` Cristian Marussi
2020-11-23 19:10       ` Mark Brown
2020-11-23 10:18 ` [PATCH v6 0/5] Add support for SCMIv3.0 Voltage Domain Protocol and SCMI-Regulator Sudeep Holla
2020-11-23 20:38 ` 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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=20201123174941.GM6322@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=Jonathan.Cameron@Huawei.com \
    --cc=cristian.marussi@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=etienne.carriere@linaro.org \
    --cc=f.fainelli@gmail.com \
    --cc=james.quinlan@broadcom.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukasz.luba@arm.com \
    --cc=robh@kernel.org \
    --cc=satyakim@qti.qualcomm.com \
    --cc=souvik.chakravarty@arm.com \
    --cc=sudeep.holla@arm.com \
    --cc=vincent.guittot@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox