public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Cristian Marussi <cristian.marussi@arm.com>
To: Mark Brown <broonie@kernel.org>
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 18:49:56 +0000	[thread overview]
Message-ID: <20201123184956.GD56553@e120937-lin> (raw)
In-Reply-To: <20201123174941.GM6322@sirena.org.uk>

Hi Mark

On Mon, Nov 23, 2020 at 05:49:41PM +0000, Mark Brown wrote:
> 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.
> 

Yes this seems a bug, I'll fix.

> > +	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?
> 

In fact not reading information here could be due to a failure to
communicate with fw or to the fact that the underlying Voltage Domain
protocol during its initialization failed to validate the domain for
some reason (like getting garbage reads of implauusible out of spec
levels from the FW) and so VD decided not to expose the domain entry
identified by id.

I'll report a generic "Failure to get voltage domain" here at this
point if it's fine.

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

Ok

> > +	rinfo->num_doms = num_doms;
> > +	/*
> 
> Several places like this with missing blank lines.

What do you mean ? a blank before the comment ?
Sorry but checkpatch --strict does not complain, I was not aware of
this styling. I'll do (if you confirm that's what you want)

How do you prefer these changes (and the DT one) ? 
All as followup patches in a V7 series on top of
sudeep/for-next/scmi-voltage ?

Thanks

Cristian



  reply	other threads:[~2020-11-23 18: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
2020-11-23 18:49     ` Cristian Marussi [this message]
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=20201123184956.GD56553@e120937-lin \
    --to=cristian.marussi@arm.com \
    --cc=Jonathan.Cameron@Huawei.com \
    --cc=broonie@kernel.org \
    --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